conversations
listlengths
2
6
[ { "role": "user", "content": "What is `Interpreter`?" }, { "role": "assistant", "content": "Interpreter — The interpreter defines a context in which interactive commands are compiled and executed." }, { "role": "user", "content": "What does `Interpreter.clearAll` do?" }, { "r...
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n(\nx = {\n |loDev = -6, hiDev = 5, lookBack = 2|\n var trig = Impulse.ar(5);\n // define maxLookBack, minLoDev and maxHiDev\n var midi = Demand.ar(trig, 0, DIdev(72, 11, -6, 5, lookBack, loDev, hiDev));\n midi.poll(5, lab...
[ { "role": "user", "content": "Write a kick at amp 0.8 with a click. (osc saw, sweep 0.06, decay 0.5, f0 180, f1 40, amp 0.8, rev 1)" }, { "role": "assistant", "content": "Start with a swept sine, then shorten the decay to taste:\n\n```supercollider\n// kick drum: saw oscillator, 0.06 s pitch swe...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `PV_MagSquared`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\n(\nb = Buffer.alloc(s, 2048, 1);\nc = Buffer.read(s, ExampleFiles.child);\n);\n\n(\nSynthDef(\"help-magSquared\", { |out = 0, bufnum ...
[ { "role": "user", "content": "What does `History.indicesFor` do?" }, { "role": "assistant", "content": "find line indices created by keys and containing string. used for" } ]
[ { "role": "user", "content": "Explain `RedMatrixMixerGUI` in SuperCollider briefly." }, { "role": "assistant", "content": "RedMatrixMixerGUI — gui for RedMatrixMixer Category: Red > redMatrixMixer." } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `BusPlug`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\nz = Bus.control(s, 16);\nz.setn({ |i| (i * 5).nthPrime } ! 16 * 5 + 100);\na = BusPlug.for(z);\n{ Splay.ar(SinOsc.ar(a.kr(3, MouseX.kr(0, 25)...
[ { "role": "user", "content": "How do I make a kick that starts at 220 Hz and falls to 48 Hz? (osc saw, sweep 0.06, decay 0.35, f0 220, f1 48, amp 0.8, rev 0)" }, { "role": "assistant", "content": "The pitch envelope is what makes it read as a drum, not the oscillator:\n\n```supercollider\n// kic...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// a stereo signal, both channels at 0dB\n{ [SinOsc.ar(440), SinOsc.ar(440)] }.play\n\n// using Balance on a stereo signal with the position parameter at 0, effectively the same sound but both channels at -3dB\n{ Balance2...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `InFeedback`." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-InFeedback\", { |out = 0, in = 0|\n var input, sound;\n input = InFeedback.ar(in, 1);\n sound = SinOsc.ar(input * 1300 + ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ OneZero.ar(WhiteNoise.ar(0.5), 0.5) }.play\n\n{ OneZero.ar(WhiteNoise.ar(0.5), -0.5) }.play\n\n{ OneZero.ar(WhiteNoise.ar(0.5), Line.kr(-0.5, 0.5, 10) }.play\n```" }, { ...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n~x.play;\n\n~x = { var alpha,beta; alpha = rrand(99,399); beta = alpha = rrand(99,399);Pan2.ar(LeakDC.ar(Normalizer.ar(BPeakEQ.ar(BPeakEQ.ar(BPeakEQ.ar(BPeakEQ.ar(\nFreeVerb.ar(Formant.ar(TRand.kr(alpha,alpha+(rrand(5,20...
[ { "role": "user", "content": "What is `Lag2` in SuperCollider?" }, { "role": "assistant", "content": "Lag2 — Exponential lag Lag2 is equivalent to `Lag.kr(Lag.kr(in, time), time)`, thus resulting in a smoother transition. This saves on CPU as you only have to calculate the decay factor once inst...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.quit;\nf = { Group.new(s.defaultGroup); \"Other code can be evaluated too\".postln };\nServerTree.add(f);\ns.boot;\ns.queryAllNodes; // note the group within the default group\...
[ { "role": "user", "content": "Explain `FoaMagIa` in SuperCollider briefly." }, { "role": "assistant", "content": "FoaMagIa — First Order Ambisonic (FOA) Magnitude of Soundfield Active Intensity Vector Return the Magnitude of Active Intensity Vector, ||Ia||, of a first order ambisonic (B-format) ...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\n// Simple amplitude tracker sending values to sclang\nSynthDef(\\ampTracker, { |in|\n var freq = 30; // num of values per second\n SendReply.kr(Impulse.kr(freq), '/amp', Amplitude.kr(SoundIn.ar(in)));\n}).add;\n);\n...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `In`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\n(\nSynthDef(\"help-PinkNoise\", { |out = 0|\n Out.ar(out, PinkNoise.ar(0.1))\n}).add;\n\nSynthDef(\"help-In\", { |out = 0, in = 0|\n var input...
[ { "role": "user", "content": "Show another SuperCollider example using `FBSineN`." }, { "role": "assistant", "content": "```supercollider\n// increase feedback\n{ FBSineN.ar(SampleRate.ir, 1, Line.kr(0.01, 4, 10), 1, 0.1) * 0.2 }.play(s);\n```" } ]
[ { "role": "user", "content": "What does `FoaMFreqOsc.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "First Order Ambisonic (FOA) monofrequent soundfield generator Arguments: freq — Frequency in Hertz. Sampled at audio-rate.; phase — Phase offset or modulator in radian...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-Dust2\", { |out = 0|\n Out.ar(out,\n Dust2.ar(200, 0.5)\n )\n}).play;\n);\n\n(\nSynthDef(\"help-Dust2\", { |out = 0|\n Out.ar(out,\n Dust2.ar(XLine.kr...
[ { "role": "user", "content": "Are you an AI?" }, { "role": "assistant", "content": "Yes. I am a small language model specialised in SuperCollider. I generate text; I cannot hear audio, run sclang, or check whether a patch sounds the way you want." } ]
[ { "role": "user", "content": "Write a SuperCollider patch that uses `BinaryOpUGen` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\na = WhiteNoise.ar; // a WhiteNoise\nb = a + 2; // a BinaryOpUGen.\nb.operator; // +\n\n// sound exampl...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nd = { |freq = 440| SinOsc.ar(LastValue.ar(freq, 20), 0, 0.2) }.play;\n\nd.set(\\freq, 400);\nd.set(\\freq, 200);\nd.set(\\freq, 670);\nd.set(\\freq, 680);\nd.set(\\freq, 695;\nd....
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nx = {\n SinOsc.ar([0.1, 0.2], 0).poll * 0.1\n}.play;\n;\nx.trace; // By tracing the Synth you can see the two Poll units we created\nx.free\n```" }, { "role": "assist...
[ { "role": "user", "content": "What does `SCDoc.findHelpFile` do?" }, { "role": "assistant", "content": "Find help for a given string. Tries to be Returns: the URL for help on given string" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-WhiteNoise\", { |out = 0|\n Out.ar(out,\n WhiteNoise.ar(0.25)\n )\n}).play;\n```" }, { "role": "assistant", "content": "A closing bracket is m...
[ { "role": "user", "content": "What does `Instr.plot` do? What arguments does it take?" }, { "role": "assistant", "content": "creates a Patch and plays it for {duration} seconds and plots Arguments: args — array or dict; duration." } ]
[ { "role": "user", "content": "Write a GrainBuf synth at 28 grains per second. (rate 28, dur 0.15, interp 2, mode sweep, rev 1)" }, { "role": "assistant", "content": "`GrainBuf` needs a buffer, a trigger and a grain duration:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.waitForBoot ...
[ { "role": "user", "content": "How do I play a random majorPentatonic scale at octave 6? (scale majorPentatonic, seq Pwalk, dur 0.2, octave 6, instr fm, root 0)" }, { "role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```supercollid...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\nNdef(\\nodeTest, {\n // the input\n var input = Impulse.ar([1, 3, 5].reciprocal, phase: [0, 0.133, 0.5]).sum;\n\n // the nodes, each takes its predecessor as input and estimates the duration between two events. \n...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Compander`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n Decay2.ar(\n Impulse.ar(8, 0, LFSaw.kr(0.3, 1, -0.3, 0.3)),\n 0.001,\n 0.3\n )\n * Mix.ar(Pulse.ar([80, 81], 0.3))\n}.play;\n)\n`...
[ { "role": "user", "content": "Give me a kick with damping 0.2 on the reverb. (verb freeverb2, room 0.85, damp 0.2, mix 0.45, source kick)" }, { "role": "assistant", "content": "`FreeVerb` is in the core library; the room and damp arguments do the work:\n\n```supercollider\n// reverb: freeverb2 o...
[ { "role": "user", "content": "Write a Pbind in minorPentatonic using Prand for the degrees. (scale minorPentatonic, seq Prand, dur 0.25, octave 6, instr pluck, root 0)" }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\...
[ { "role": "user", "content": "What is `Nil`?" }, { "role": "assistant", "content": "Nil — Represents uninitialized data" }, { "role": "user", "content": "What does `Nil.isNil` do?" }, { "role": "assistant", "content": "Answers true because this is nil. In class Object thi...
[ { "role": "user", "content": "How do I build a live drone with Ndef at 165 Hz? (ugens tri, cutoff 800, lfo 0.3, freq 165, amp 0.12)" }, { "role": "assistant", "content": "Use `Ndef` when the patch has to change without stopping:\n\n```supercollider\n// Ndef drone: tri source through a 800 Hz low...
[ { "role": "user", "content": "What does `MxUnitApp.copyBy` do? What arguments does it take?" }, { "role": "assistant", "content": "Copies the unit by a channel@slot offset, overwriting anything that might be Arguments: vector — channel@slot offset Point. Returns: new unit" } ]
[ { "role": "user", "content": "Write a granular texture, dry. (rate 28, dur 0.07, interp 2, mode noise1, rev 0)" }, { "role": "assistant", "content": "Granulation is `GrainBuf` plus a trigger rate; the position can move:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.waitForBoot {\n ...
[ { "role": "user", "content": "Write a SuperCollider patch for Play your (short) soundfiles with some delay that runs as it is, with nothing assumed about the session." }, { "role": "assistant", "content": "```supercollider\n// By Bjørn Houdorf March 2013, Play your (short) soundfiles with some d...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `PulseCount`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\nSynthDef(\"help-PulseCount\", { |out = 0|\n Out.ar(out,\n SinOsc.ar(\n PulseCount.ar(Impulse.ar(10), Im...
[ { "role": "user", "content": "Write a Pbind in minorPentatonic using Prand for the degrees. (scale minorPentatonic, seq Prand, dur 0.4, octave 4, instr sine, root 0)" }, { "role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```super...
[ { "role": "user", "content": "What is `RedComb` in SuperCollider?" }, { "role": "assistant", "content": "RedComb — comb delay line with crossfade When delaytime is changed, a quick crossfade is performed. Category: Red > redUGens." } ]
[ { "role": "user", "content": "Explain `Slider2D` in SuperCollider briefly." }, { "role": "assistant", "content": "Slider2D — A view with a handle movable in two dimensions. A view that allows setting two numerical values represented by the horizontal and vertical position of a handle movable in ...
[ { "role": "user", "content": "Explain this code:\n```supercollider\nNdef(\\x, { Saw.ar(110) * 0.1 }).play;\nNdef(\\x)[1] = \\filter -> { |in| RLPF.ar(in, 800, 0.4) };\n```" }, { "role": "assistant", "content": "Two nodes in one named proxy: a saw source, then a resonant low-pass filter fed by it...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\n{\n var time = 0.23;\n var freq = (55).midicps;\n var a = VarSaw.ar(freq/2, width: XLine.ar(0.5,1,time)).range(0,XLine.ar(0.666,1/666,time));\n var tone = SinOsc.ar(freq).fold(-0.23*a,a) * EnvGen.ar(Env([1,0],[tim...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `NodeProxy` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\na = NodeProxy.new.play; // play to hardware output.\na.fadeTime = 2; // fadeTime specifies cro...
[ { "role": "user", "content": "Add freeverb2 to a pluck patch at room 0.7." }, { "role": "assistant", "content": "`FreeVerb` is in the core library; the room and damp arguments do the work:\n\n```supercollider\n// reverb: freeverb2 on a pluck\n(\nSynthDef(\\reverb_synth, { |out = 0, freq = 330, a...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{ SinOsc.ar(\n SinOsc.ar(\n XLine.kr(1, 100, 5)).exprange(*XLine.kr([20, 800], [7000, 200], 10)\n )\n ) * 0.1\n\n}.play;\ns.record(duration: 10);\n```" }, { "...
[ { "role": "user", "content": "Give me a Pbind with pluck voices and a 0.25 rhythm." }, { "role": "assistant", "content": "Put the scale and the degree pattern in the `Pbind` and it will pick notes for you:\n\n```supercollider\n(\nSynthDef(\\pluck, { |out = 0, freq = 440, amp = 0.2|\n var env ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nSynthDef(\"mini\",{\n Out.ar( 0,\n Instr.ar(\"minimoog.two\", SinOsc.kr(1.0).range(300,500) )\n )\n}).send(s;\n```" }, { "role": "assistant", "content": "A closi...
[ { "role": "user", "content": "What does `SimpleNumber.<!` do?" }, { "role": "assistant", "content": "one-dimensional value Returns: the receiver. aNumber is ignored." } ]
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\nt = TempoClock(120/60).permanent_(true);\n\n(\n~change_clock_tempo = {|clock, tempo, beats=1|\n beats.do {|beat|\n var stepTempo = beat.linexp(0, beats-1, clock.tempo, tempo);\n clock.schedAbs(clock.next...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// trigger an envelope\n(\n{\n var trig;\n trig = SinOsc.ar(1) > 0.1;\n EnvGen.kr(Env.perc, trig, doneAction: Done.none) * SinOsc.ar(440, 0, 0.1)\n}.play\n // > outputs ...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `Pmulp` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n// sound example\n(\nSynthDef(\\sinegrain,\n { |out = 0, freq = 440, sustain = 0.02|\n var env;\n env = EnvGen.kr(Env.perc(0...
[ { "role": "user", "content": "Explain `LADSPA` in SuperCollider briefly." }, { "role": "assistant", "content": "LADSPA — Run any LADSPA plugin inside SuperCollider This UGen lets you run any LADSPA foot See http://www.ladspa.org/ for more information about LADSPA plugin inside SuperCollider. Cat...
[ { "role": "user", "content": "What does `AbstractFunction.asin` do?" }, { "role": "assistant", "content": "An object which responds to a set of messages that represent mathematical functions" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-Dust\", { |out = 0|\n Out.ar(out,\n Dust.ar(200, 0.5)\n )\n}).play;\n);\n\n(\nSynthDef(\"help-Dust\", { |out = 0|\n Out.ar(out,\n Dust.ar(XLine.kr(200...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Standard2DN.ar(220, 11025, mul:0.3) }.play(s);\n\n// mouse-controlled param\n{ Standard2DN.ar(SampleRate.ir/2, SampleRate.ir, MouseX.kr(0.9,4), mul:0.3) }.play(s);\n\n// as a f...
[ { "role": "user", "content": "Show another SuperCollider example using `Monitor`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\ns.scope(16);\n\n{ Out.ar(87, SinOsc.ar(MouseX.kr(40, 10000, 1) * [1, 2, 3], 0, 0.2)) }.play;\nx = Monitor.new;\nx.play(87, 3, 1, 2);\nx.out = 0;\nx....
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Synth`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n// create a Synth at the head of the default Server's default group\n// based on the SynthDef \"default\"\nx = Synth.new(\"default\");\ns.query...
[ { "role": "user", "content": "How do I put a pluck in a reverb at mix 0.3? (verb freeverb, room 0.5, damp 0.5, mix 0.3, source pluck)" }, { "role": "assistant", "content": "A send-style patch: dry signal plus the reverb on the tail:\n\n```supercollider\n// reverb: freeverb on a pluck\n(\nSynthDe...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `BufWr` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n(\n// allocate a buffer for writinig into\ns = Server.local;\ns.sendMsg(\"/b_alloc\", 0, 44100 * 2);\n);\n\n\n// write into the buf...
[ { "role": "user", "content": "Give me a Pbind with fm voices and a 0.2 rhythm. (scale minorPentatonic, seq Prand, dur 0.2, octave 4, instr fm, root 0)" }, { "role": "assistant", "content": "Put the scale and the degree pattern in the `Pbind` and it will pick notes for you:\n\n```supercollider\n(...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nd = { |gate = 1| { BrownNoise.ar }.dup * EnvGen.kr(Env.asr, gate, doneAction: Done.freeSelf) }.play;\nd.release(3;\n```" }, { "role": "assistant", "content": "A closi...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `Mix`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var n;\n n = 8; // number of 'voices'\n Mix.new( // mix all stereo pairs down.\n Pan2.ar( // pan the voice t...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// vary frequency\n{ StandardL.ar(MouseX.kr(20, SampleRate.ir)) * 0.3 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthe...
[ { "role": "user", "content": "What is `UGen`?" }, { "role": "assistant", "content": "UGen — Abstract superclass of all unit generators" }, { "role": "user", "content": "What does `UGen.multiNew` do?" }, { "role": "assistant", "content": "These methods are responsible for ...
[ { "role": "user", "content": "I get 'Buffer UGen: no buffer data'. What does it mean?" }, { "role": "assistant", "content": "The UGen got a bufnum that the server has no data for. `Buffer.read` is asynchronous: the Buffer object exists immediately but the samples arrive later, so a Synth created...
[ { "role": "user", "content": "What is `Event`?" }, { "role": "assistant", "content": "Event — an environment that represents an action" }, { "role": "user", "content": "What does `Event.parentEvents` do?" }, { "role": "assistant", "content": "An extendible IdentityDiction...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Saw`." }, { "role": "assistant", "content": "```supercollider\n// modulating the frequency\n\n{ Saw.ar(XLine.kr(40, 4000, 6), 0.2) }.play;\n\n// two band limited sawtooth waves through a resonant low pass filter\n\n{ ...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `Pmulpre` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n// sound example\n(\nSynthDef(\\sinegrain,\n { |out = 0, freq = 440, sustain = 0.02|\n var env;\n env = EnvGen.kr(Env.perc...
[ { "role": "user", "content": "Give me a granular patch with noise1 grain position and interp 4. (rate 10, dur 0.04, interp 4, mode noise1, rev 0)" }, { "role": "assistant", "content": "Granulation is `GrainBuf` plus a trigger rate; the position can move:\n\n```supercollider\n// granular synth wi...
[ { "role": "user", "content": "What is `Pitch` in SuperCollider?" }, { "role": "assistant", "content": "Pitch — Autocorrelation pitch follower This is a better pitch follower than ZeroCrossing, but more costly of CPU. For most purposes the default settings can be used and only `in` needs to be su...
[ { "role": "user", "content": "Why does every UGen have mul and add arguments?" }, { "role": "assistant", "content": "They are a convenience applied to the UGen's output: the result is `ugens_result * mul + add`. So `SinOsc.ar(440, 0, 0.2)` is the same as `SinOsc.ar(440) * 0.2`, and `SinOsc.ar(44...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\n{\n\nvar in, fft, entropy;\n\n//in = SinOsc.ar(MouseX.kr(100,1000),0,0.1);\n//in = Mix(SinOsc.ar([440,MouseX.kr(440,880)],0,0.1)); \nin= SoundIn.ar; \n\nfft = FFT(LocalBuf(2048), in);\n\nentropy=SpectralEntropy.kr(fft...
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\ns.boot;\n(\n// send a synth def to server\nSynthDef(\"tpulse\", { |out = 0, freq = 700, sawFreq = 440.0|\n Out.ar(out, SyncSaw.ar(freq, sawFreq, 0.1));\n}).add;\n);\n\n// Here the defaults for *new will result in a Synth at t...
[ { "role": "user", "content": "What does `MIDIdef.freeAll` do?" }, { "role": "assistant", "content": "Clears and deactivates all MIDIdefs from the global" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// logistic map\n// equation: x1 = -r*x0^2 + r*x0\n(\n{ var r;\n r = MouseX.kr(3.5441, 4); // stable range\n QuadL.ar(SampleRate.ir/4, r.neg, r, 0, 0.1) * 0.4;\n}.play(s);\n``...
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n(\nSynthDef(\"help-InFeedback\", { |out = 0, in = 0|\n Out.ar(out,\n InFeedback.ar(in, 1)\n );\n}).add;\nSynthDef(\"help-SinOsc\", { |out = 0, freq = 440|\n Out.ar(out, SinOsc.ar(freq, 0, 0.1))\n}).add;\n);\n\nx = Bus.au...
[ { "role": "user", "content": "What is `BinaryOpUGen`?" }, { "role": "assistant", "content": "BinaryOpUGen — Apply a binary operation to the values of an input UGen" }, { "role": "user", "content": "What does `BinaryOpUGen.new` do?" }, { "role": "assistant", "content": "re...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Impulse.ar(800, 0.0, 0.5, 0) }.play\n\n{ Impulse.ar(XLine.kr(800, 100, 5), 0.0, 0.5, 0 }.play\n```" }, { "role": "assistant", "content": "A closing bracket is missi...
[ { "role": "user", "content": "Write a kick whose tail uses gverb." }, { "role": "assistant", "content": "Put the reverb inside the `SynthDef` so it is part of the voice:\n\n```supercollider\n// reverb: gverb on a kick\n(\nSynthDef(\\reverb_synth, { |out = 0, freq = 330, amp = 0.2|\n var env =...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch for radio static with tuning noise (a SuperCollider snippet). Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"radiostatic\", {arg out=0;\n var hum, sineSweep, tuning, dust...
[ { "role": "user", "content": "Write a Pbind whose degrees repeat every Prand cycle. (scale majorPentatonic, seq Prand, dur 0.25, octave 5, instr sine, root 0)" }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nSynthDef...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\nthis.preProcessor = PreProcessor.new;\n\n// prepare an event\ne = (\n lang: \\minimouse,\n languages:\n (\n minimouse: {|code, event|\n var output;\n output = Pbind(\\degree, Pseq(code.ascii).trace % 24...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `ControlSpec`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n// ControlSpec-map can also be used to map ugens\n(\nvar spec;\nspec = [100, 18000, \\exp].asSpec;\n{\n var freq...
[ { "role": "user", "content": "What is `Order` in SuperCollider?" }, { "role": "assistant", "content": "Order — an order of elements with a numerical index Keeps elements in an order and allows to put them at arbitrary slots without having to allocate a large array. Category: Collections > Ordere...
[ { "role": "user", "content": "What does `MxChannel.groupForIndex` do? What arguments does it take?" }, { "role": "assistant", "content": "a group of MxUnits Arguments: index; bundle." } ]
[ { "role": "user", "content": "What does `PLFClipNoise.new` do? What arguments does it take?" }, { "role": "assistant", "content": "UGenPatterns quark library Arguments: freq; mul; add; length — Number of values produced.." } ]
[ { "role": "user", "content": "What is a UGen graph in SuperCollider?" }, { "role": "assistant", "content": "A UGen graph is the directed acyclic graph of unit generators that a SynthDef describes: sources (SinOsc, WhiteNoise) feed processors (LPF, EnvGen, Pan2) and end at an output such as Out.a...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// without any modification, convert FFT chain (frequency domain signal) back to audio (time domain signal)\n(\n{ var in, chain;\n in = WhiteNoise.ar;\n chain = FFT(Local...
[ { "role": "user", "content": "What is `TraerAttraction` in SuperCollider?" }, { "role": "assistant", "content": "TraerAttraction — act on two particles Attractions or repulsions (negative attraction) act on 2 particles and either constantly pull them together or constantly pull them apart by app...
[ { "role": "user", "content": "Write a GrainBuf synth at 16 grains per second." }, { "role": "assistant", "content": "Granulation is `GrainBuf` plus a trigger rate; the position can move:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.waitForBoot {\n var buf = Buffer.read(s, Platfo...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `BufSampleRate`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\nb = Buffer.read(s, ExampleFiles.child);\n\n// compares a 1102.5 Hz sine tone (11025 * 0.1, left) with a 1100 ...
[ { "role": "user", "content": "How do I play a random minorPentatonic scale at octave 6? (scale minorPentatonic, seq Pseq, dur 0.3, octave 6, instr fm, root 0)" }, { "role": "assistant", "content": "Put the scale and the degree pattern in the `Pbind` and it will pick notes for you:\n\n```supercol...
[ { "role": "user", "content": "Explain `TwoTube` in SuperCollider briefly." }, { "role": "assistant", "content": "TwoTube — physical modeling simulation; two tubes Physical model; two tube sections with scattering junction inbetween; their relative areas determine k. Category: UGens > PhysicalMod...
[ { "role": "user", "content": "What does `NumberBox.defaultGetDrag` do?" }, { "role": "assistant", "content": "A view displaying a modifiable numerical value. Returns: The #-value." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{\n# x,y,z = RosslerL.ar(MouseX.kr(1, 200));\nPan2.ar(Pulse.ar(x.range(100,1000), y.range(0,1), 0.3), z)\n}.play(s)\n```" }, { "role": "assistant", "content": "A c...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\nServer.local.quit; // If server running, need to stop it for this example\n\n// We'll modify the server boot procedure to set our env var...\n~realserverprogram = Server.program;\nServer.program = \"export PANCREAS=220;\"...
[ { "role": "user", "content": "How do I add reverb with FreeVerb?" }, { "role": "assistant", "content": "`FreeVerb.ar(in, mix, room, damp)` — mix 0..1 is dry/wet, room 0..1 is the size (0.5 is a small room, 0.9 is a hall), damp 0..1 rolls off the high end of the tail. Put it after your sound: `Fr...
[ { "role": "user", "content": "What is a SynthDef?" }, { "role": "assistant", "content": "A SynthDef is a named, compiled server-side instrument: a UGen graph plus named controls. You build one with SynthDef(\\name, { |args| ... }).add, and then play instances with Synth(\\name)." } ]