conversations
listlengths
2
6
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `SyncSaw` that runs as it is." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n(\n// send a synth def to server\nSynthDef(\"tpulse\", { arg out=0,freq=700,sawFreq=440.0;\n Out.ar(out, SyncSaw.ar(fre...
[ { "role": "user", "content": "What does `MonitorGui.playBut` do?" }, { "role": "assistant", "content": "a play button. Shift-click opens a dialog window for playN output routing by" } ]
[ { "role": "user", "content": "What does `Pen.addWedge` do?" }, { "role": "assistant", "content": "Draw a wedge around the Point center, at radius number of pixels. startAngle and sweepLength refer to the starting angle and the extent of the arc, and are in radians" } ]
[ { "role": "user", "content": "What is `EnvFollow` in SuperCollider?" }, { "role": "assistant", "content": "EnvFollow — Envelope Follower Envelope follower from Hoffmann and Cook 2008 DAFx paper. Category: UGens > Analysis //SLUGens released under the GNU GPL as extensions for SuperCollider 3, by...
[ { "role": "user", "content": "What does `ScurryableInstrGateSpawner.scurry` do? What arguments does it take?" }, { "role": "assistant", "content": "a Pbind-like spawner that plays an Instr with streams supplied to its inputs. this one scurries Arguments: by." } ]
[ { "role": "user", "content": "What does `EaseOutInExpo.value` do? What arguments does it take?" }, { "role": "assistant", "content": "Exponential ease-out/in Arguments: t — a Float between 0.0 and 1.0.." } ]
[ { "role": "user", "content": "Give me a Pbind with pluck voices and a 0.25 rhythm. (scale majorPentatonic, seq Pseq, dur 0.25, octave 5, instr pluck, 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 `Plprand.new` do? What arguments does it take?" }, { "role": "assistant", "content": "random values that tend toward lo Arguments: lo — lower boundary of values.; hi — upper boundary of values.; length — number of values produced.." } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `FBSineC`." }, { "role": "assistant", "content": "```supercollider\n// default initial params\n{ FBSineC.ar(SampleRate.ir/4) * 0.2 }.play(s);\n```" } ]
[ { "role": "user", "content": "Write an Ndef with a sine source and a 2400 Hz low-pass. (ugens sine, cutoff 2400, lfo 0.3, freq 110, amp 0.12)" }, { "role": "assistant", "content": "`Ndef` holds the synth and the environment, so you can edit it live:\n\n```supercollider\n// Ndef drone: sine sourc...
[ { "role": "user", "content": "What does `View.mouseMoveAction` do?" }, { "role": "assistant", "content": "The object to be evaluated whenever the mouse pointer moves after a mouse button was pressed on the view. The following arguments are passed at evaluation: view, x, y, modifiers. See #Mouse ...
[ { "role": "user", "content": "What does `MultiSliderView.fillColor` do? What arguments does it take?" }, { "role": "assistant", "content": "The color used to visualize the areas described in Arguments: A Color.." } ]
[ { "role": "user", "content": "Give me an Ndef with an LFO at 0.3 Hz. (ugens tri, cutoff 800, lfo 0.3, freq 82.5, 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-pass\n(\...
[ { "role": "user", "content": "What does `RedMixerChannel.hiFreq` do?" }, { "role": "assistant", "content": "Get and set channel equalizer high band frequency (in Hz). Note: activate band first with `eqHi=" } ]
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `Resonz` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n// 1st, evaluate a synthdef\n(\nSynthDef(\"pitchFromNoise\", { arg out = 0;\n Out.ar(\n out,\n Resonz.ar(\n WhiteNoise...
[ { "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 kick drum with a 0.5 s decay. (osc sine, sweep 0.06, decay 0.5, f0 150, f1 40, amp 0.6, rev 0)" }, { "role": "assistant", "content": "Start with a swept sine, then shorten the decay to taste:\n\n```supercollider\n// kick drum: sine oscillator, 0.06 s pitch s...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{\n var w, x, y, p, a, b, c, d;\n\n p = PinkNoise.ar; // source\n\n // B-format encode\n #w, x, y = PanB2.ar(p, MouseX.kr(-1, 1), 0.1);\n\n // B-format decode to quad\n ...
[ { "role": "user", "content": "Explain this SuperCollider patch.\n```supercollider\n// (thor magnusson) (2006)\n\n// An instrumentalist inside a synthdef.\n\n(\nSynthDef(\\drummer, { arg out=0, tempo=4;\n var snare, base, hihat;\n tempo = Impulse.ar(tempo); // for a drunk drummer replace Impulse with Dust ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `UnaryOpUGen`." }, { "role": "assistant", "content": "```supercollider\na = WhiteNoise.ar; // a WhiteNoise\nb = a.squared; // a UnaryOpUGen.\nb.operator; // squared\n\n// sound example\n\n{ var a = LFSaw.ar(300).range(...
[ { "role": "user", "content": "What is `PLFNoise0` in SuperCollider?" }, { "role": "assistant", "content": "PLFNoise0 — UGenPatterns quark library Based on LFNoise0 Category: Streams-Patterns-Events > UGenPatterns > Generators." } ]
[ { "role": "user", "content": "What does `MultiSplineFr.savePoint` do?" }, { "role": "assistant", "content": "Multi dimensional spline frame rate device" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// randomly modulate params\n(\n{ LorenzL.ar(\n SampleRate.ir,\n LFNoise0.kr(1, 2, 10),\n LFNoise0.kr(1, 20, 38),\n LFNoise0.kr(1, 1.5, 2)\n) * 0.2 }.play(s);\n```" }, { ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\na = {LFTri.ar(50+(1000*Maths2.ar(10, 10, 0.5, 1)[0]), 0, 0.1)}.play //notice how I am taking the [0]th channel of the Maths and ignoring the [1st channel.\n```" }, { "rol...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.boot;\n(\nx = SynthDef(\"help-node-set\", { |freq = 440, out = 0|\n Out.ar(out, SinOsc.ar(freq, 0, 0.1))\n}).play\n);\nx.set(\\freq, 880, \\out, 1); // two pairs\nx.set(0, 660...
[ { "role": "user", "content": "What is the correct way to stop everything?" }, { "role": "assistant", "content": "Depends on what is playing, and they are different layers:\n\n- `s.freeAll` — frees every node on the server (all sound stops, definitions survive).\n- `CmdPeriod.run` — stops everyth...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `NdefGui`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n(\np = ProxySpace.push(s.boot);\n\nl = NdefGui(nil, 3).moveTo(10, 120);\nm = NdefGui(nil, 3).moveTo(10, 240);\nn = ...
[ { "role": "user", "content": "What does `MxUnit.register` do? What arguments does it take?" }, { "role": "assistant", "content": "Container for a musical object (Instr, NDef, Spline etc); this is a single unit that has inlets and outlets which can be connected to other units Arguments: classname...
[ { "role": "user", "content": "What does `MxCable.inlet` do?" }, { "role": "assistant", "content": "the inlet where the cable goes Returns: MxInlet" } ]
[ { "role": "user", "content": "What does `Integer.factors` do?" }, { "role": "assistant", "content": "32-bit Integer number Returns: the prime factors as array." } ]
[ { "role": "user", "content": "Explain `CutBit1` in SuperCollider briefly." }, { "role": "assistant", "content": "CutBit1 — BBCut2 bitcrusher and decimator CutBit1 adds a bitcrusher and sample rate reducer effect to BBCut2. The number of bits is given by an arithmetic series for each block, and t...
[ { "role": "user", "content": "What is `LPZ1` in SuperCollider?" }, { "role": "assistant", "content": "LPZ1 — Two point average filter A special case fixed filter. Implements the formula: `out(i) = 0.5 * (in(i) + in(i-1))` which is a two point averager. Category: UGens > Filters > Linear." } ]
[ { "role": "user", "content": "What does `PV_JensenAndersen.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "FFT feature detector for onset detection. Arguments: buffer — FFT buffer.; propsc — Proportion of spectral centroid feature.; prophfe — Proportion of high freque...
[ { "role": "user", "content": "What does this SuperCollider code do?\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(LocalBuf(2048), in);\n IFFT.ar(chain) * -20.d...
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n// every other note of the diatonic cluster: stacked thirds\n(degree: (0..12), amp: [0, 0.1]).play;\n\n// every other note of the semitone cluster: a wholetone cluster again\n(note: (0..12), amp: [0, 0.1]).play;\n\n// every th...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// Initial values - system state y0 at time t0: y(t0) = y0 - are essential for an ODE solution.\n// In this example with the MSD model (and constant f !) time isn't explicit,\n// therefore it makes no difference if we sta...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// as a frequency control\n{ SinOsc.ar(Lag.ar(LorenzL.ar(MouseX.kr(1, 200)), 3e-3)*800+900)*0.4 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracke...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// crossfading a mono source between two outs\n\n(\nx = {\n DXFan.ar(\n Dseq([0, 1], inf),\n PinkNoise.ar(0.05),\n fadeTime: 1\n )\n}.play\n);\n\nx.release\n\n\n// Crossfading a stereo source between two outs,\...
[ { "role": "user", "content": "Give me an Ndef with an LFO at 0.1 Hz. (ugens tri, cutoff 3200, lfo 0.1, freq 220, amp 0.12)" }, { "role": "assistant", "content": "`Ndef` holds the synth and the environment, so you can edit it live:\n\n```supercollider\n// Ndef drone: tri source through a 3200 Hz ...
[ { "role": "user", "content": "Write an Ndef at 55 Hz I can retune while it plays. (ugens tri, cutoff 1400, lfo 0.3, freq 55, 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 1400 Hz...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n// By Bjørn Houdorf March 2013, Play your (short) soundfiles with some delay.\n\nb = SoundFile.collectIntoBuffers(\"yourSoundFileFolder/*\"); // 1. rund this\n\n( // 2. and then run this\nt = Task({\n({\n var num=...
[ { "role": "user", "content": "How do I granulate a sample with 0.04 s grains? (rate 20, dur 0.04, interp 2, mode noise1, rev 1)" }, { "role": "assistant", "content": "Granulation is `GrainBuf` plus a trigger rate; the position can move:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns....
[ { "role": "user", "content": "Add gverb to a bell patch at room 0.85. (verb gverb, room 0.85, damp 0.2, mix 0.45, source bell)" }, { "role": "assistant", "content": "`FreeVerb` is in the core library; the room and damp arguments do the work:\n\n```supercollider\n// reverb: gverb on a bell\n(\nSy...
[ { "role": "user", "content": "What does `SimpleTrigger.action` do?" }, { "role": "assistant", "content": "a player that emits a trigger on button push or .trig" } ]
[ { "role": "user", "content": "Write a kick drum with a 0.18 s decay. (osc sine, sweep 0.06, decay 0.18, f0 180, f1 48, amp 0.6, rev 1)" }, { "role": "assistant", "content": "A kick is a sine with a fast pitch drop and a short amplitude envelope:\n\n```supercollider\n// kick drum: sine oscillator...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{\n var a = SinOsc.ar(1).round(0.1);\n var b = SinOsc.ar(1.2).round(0.1);\n BinaryOpUGen('==', a, b) * 0.1\n}.play;\n```" }, { "role": "assistant", "conte...
[ { "role": "user", "content": "Explain `BelaScopeOut` in SuperCollider briefly." }, { "role": "assistant", "content": "BelaScopeOut — Bela's Oscilloscope interface Category: UGens > Bela." } ]
[ { "role": "user", "content": "How should I organise a SuperCollider project on disk?" }, { "role": "assistant", "content": "One folder per piece, with a fixed shape:\n\n```text\nmy-piece/\n synthdefs.scd // only SynthDef(...).add, loaded first\n material.scd // buffers, samples, scales\n ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{var n= 1024; WaveletDaub.ar(SoundIn.ar, n, MouseX.kr(0,n))}.play\n\n{var n= 1024; WaveletDaub.ar(Saw.ar(MouseY.kr(50,10000, 'exponential'),0.5), n, MouseX.kr(0,n)}.play\n```" ...
[ { "role": "user", "content": "Show another SuperCollider example using `Warp1`." }, { "role": "assistant", "content": "```supercollider\n(\nb.free;\nb = Buffer.read(s, ExampleFiles.apollo11);\n{\n var pointer = Phasor.ar(0, SampleDur.ir / BufDur.ir(b) * XLine.kr(1, 0.25, 20));\n var sound = Wa...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\nNdef(\\bitshift, {\n var t = PulseCount.ar(Impulse.ar(8e3));\n var sig = HPF.ar(\n ( \n ((t * 15) & (t >> 5)) |\n ((t * 5) & (t >> [3, 4])) |\n ((t * 2) & (t >> 9)) |\n ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nx = SynthDef(\\test, {\n Out.ar(0, \n Formants.ar(420, Vowel(\\a).addControls(3)) * 0.01\n )\n}).play\n);\n\nx.inspect\n\nx.setn(*Vowel(\\i).asKeyValuePairs(3);\n```" }...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `QuadL` that runs as it is." }, { "role": "assistant", "content": "```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...
[ { "role": "user", "content": "Write a GrainBuf synth at 10 grains per second. (rate 10, dur 0.07, interp 2, mode noise1, rev 1)" }, { "role": "assistant", "content": "A working granular patch, with the buffer loaded before the synth starts:\n\n```supercollider\n// granular synth with GrainBuf\n(...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.boot;\n(\nb = Buffer.alloc(s, 512, 1);\nb.sine2([1.0, 3], [1, 0.5]);\nx = { Osc.ar(b, 200, 0, 0.5) }.play;\n;\nx.free; b.free;\n```" }, { "role": "assistant", "cont...
[ { "role": "user", "content": "What is `SequenceableCollection`?" }, { "role": "assistant", "content": "SequenceableCollection — Abstract superclass of indexable collections" }, { "role": "user", "content": "What does `SequenceableCollection.series` do?" }, { "role": "assistan...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\n// trig with MouseY crossing center of screen\n{\n var in, chain;\n in = Mix.ar(SinOsc.ar(200 * (1..10), 0, Array.fill(10, { rrand(0.1, 0.2) })));\n chain = FFT(LocalBuf(2048), in);\n chain = PV_Diffuser(chain, Mou...
[ { "role": "user", "content": "What does `QtGUI.style` do?" }, { "role": "assistant", "content": "Gets or sets the current GUI style. The given style must be a String" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{\n var a, freq, trig;\n a = Dxrand([1, 3, 2, 7, 8], inf);\n trig = Impulse.kr(MouseX.kr(1, 400, 1));\n freq = Demand.kr(trig, 0, a) * 30 + 340;\n SinOsc.ar(freq) * 0.1\n...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `EnvGate`." }, { "role": "assistant", "content": "```supercollider\na = { LPF.ar(Saw.ar(200), 600) * EnvGate.new }.play;\na.set(\\fadeTime, 2);\na.release;\n\n// the same as:\na.set(\\gate, 0);\n\n// several env gates ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `PanB2`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var w, x, y, p, a, b, c, d;\n\n p = PinkNoise.ar; // source\n\n // B-format encode\n #w, x, y = PanB2.ar(p, MouseX.kr(-1, 1), 0.1);\n\n // B...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// Add two NodeProxies\nNdef(\\x, { SinOsc.ar(440, 0, 0.2) });\nNdef(\\y, { PinkNoise.ar(0.1) });\nNdef(\\z, Ndef(\\x) + Ndef(\\y).play;\n```" }, { "role": "assistant", ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.boot;\ns.scope;\na = { Hilbert.ar(SinOsc.ar(100) * -20.dbamp }.play;\na.release;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the paren...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\n// Dust randomly triggers Decay to create an exponential\n// decay envelope for the WhiteNoise input source\n{\nz = Decay.ar(Dust.ar(1, 0.5), 0.3, WhiteNoise.ar);\nDelayN.ar(z, 0.2, 0.2, 1, z); // input is mixed with d...
[ { "role": "user", "content": "Write a kick at amp 0.6 with a click. (osc sine, sweep 0.06, decay 0.25, f0 180, f1 55, amp 0.6, rev 1)" }, { "role": "assistant", "content": "The pitch envelope is what makes it read as a drum, not the oscillator:\n\n```supercollider\n// kick drum: sine oscillator,...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `MantissaMask`." }, { "role": "assistant", "content": "```supercollider\n// preserve only 3 bits of mantissa.\n{ MantissaMask.ar(SinOsc.ar(SinOsc.kr(0.2, 0, 400, 500), 0, 0.4), 3) }.play\n\n// the original\n{ SinOsc.ar...
[ { "role": "user", "content": "What does `SoundFile.openWrite` do? What arguments does it take?" }, { "role": "assistant", "content": "Try to create an audio file at the given path. Note that there is no `numFrames` argument: the number of frames is counted after writing data into the Arguments: ...
[ { "role": "user", "content": "Give me an Ndef with an LFO at 0.8 Hz. (ugens sine, cutoff 800, lfo 0.8, freq 220, amp 0.12)" }, { "role": "assistant", "content": "Use `Ndef` when the patch has to change without stopping:\n\n```supercollider\n// Ndef drone: sine source through a 800 Hz low-pass\n(...
[ { "role": "user", "content": "Write an Ndef at 110 Hz I can retune while it plays. (ugens sine, cutoff 1400, lfo 0.3, freq 110, amp 0.12)" }, { "role": "assistant", "content": "Use `Ndef` when the patch has to change without stopping:\n\n```supercollider\n// Ndef drone: sine source through a 140...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\n{\n var freqs = [200, 600, 400, 450, 150, 20, 800];\n var amps = Saw.ar(freq: [2,3, 5]).range(1, 0.5, 0.3, 0.8);\n var snd = LFTri.ar(freq: freqs, mul: amps);\n Mix.ar(snd)\n}.play;\n)\n```" }, { "role": "...
[ { "role": "user", "content": "What does `Mx.disconnectOutlet` do? What arguments does it take?" }, { "role": "assistant", "content": "A mixer and dynamic patching Arguments: outlet." } ]
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n// Now to demonstrate language-side classification, we'll iterate over a grid and classify:\n(\n(0, 0.1 .. 1).collect{|y|\n(0, 0.1 .. 1).collect{|x|\nPlaneTree.classify([x,y], ~treedata)\n}\n}.do(_.postln);\"\"\n);\n\n// Serve...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Vibrato`." }, { "role": "assistant", "content": "```supercollider\n// vibrato at 1 Hz, note the use of DC.ar UGen; a constant of 400.0 doesn't work\n{ SinOsc.ar(Vibrato.ar(DC.ar(400.0), 1, 0.02)) }.play\n\n// compare:...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `FBSineL`." }, { "role": "assistant", "content": "```supercollider\n// default initial params\n{ FBSineL.ar(SampleRate.ir/4) * 0.2 }.play(s);\n```" } ]
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `Compander` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var z;\n\n // signal (clean)\n z = Decay2.ar(\n Impulse.ar(8, 0, LFSaw.kr(0.3, 1, -0.3, 0.3)),\n 0.001,\n 0....
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Blip.ar(Latch.ar(WhiteNoise.ar, Impulse.ar(9)) * 400 + 500, 4, 0.2 }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis...
[ { "role": "user", "content": "Explain `SInstruments` in SuperCollider briefly." }, { "role": "assistant", "content": "SInstruments — InstrumentS see sInstrumentsOverview. Category: SInstruments." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// increase feedback\n{ FBSineC.ar(SampleRate.ir, 1, Line.kr(0.01, 4, 10), 1, 0.1) * 0.2 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracket is mi...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Limiter`." }, { "role": "assistant", "content": "```supercollider\n(\n// example signal to process\n{\n var z;\n z = Decay2.ar(\n Impulse.ar(8, LFSaw.kr(0.25, -0.6, 0.7)),\n 0.001, 0.3, FSinOsc.ar(500));\n z ...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `Drand`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a, freq, trig;\n a = Drand([1, 3, 2, 7, 8], inf);\n trig = Impulse.kr(MouseX.kr(1, 400, 1));\n freq = ...
[ { "role": "user", "content": "Write a kick drum with a 0.25 s decay. (osc sine, sweep 0.06, decay 0.25, f0 150, f1 55, 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// kick drum: sine oscillator...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// modulate frequency\n{ Blip.ar(XLine.kr(20000, 200, 6), 100, 0.2) }.play;\n\n// modulate numharmonics\n{ Blip.ar(200, Line.kr(1, 100, 20), 0.2 }.play;\n```" }, { "role"...
[ { "role": "user", "content": "What does `PV_XFade.new` do? What arguments does it take?" }, { "role": "assistant", "content": "one kind of spectral morphing Arguments: bufferA — fft buffer A.; bufferB — fft buffer B.; fade — 0-1." } ]
[ { "role": "user", "content": "Explain `FoaMu` in SuperCollider briefly." }, { "role": "assistant", "content": "FoaMu — First Order Ambisonic (FOA) Soundfield Active Admittance Balance Return the Active Admittance Balance of a first order ambisonic (B-format) signal, in radians. Category: Librari...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{\n var a, freq, trig;\n a = Dibrown(0, 15, 1, inf);\n trig = Impulse.kr(MouseX.kr(1, 40, 1));\n freq = Demand.kr(trig, 0, a) * 30 + 340;\n SinOsc.ar(freq) * 0.1\n\n}.pla...
[ { "role": "user", "content": "How do I granulate a sample with 0.1 s grains? (rate 10, dur 0.1, 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 with GrainBuf\n(\ns.wa...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `LFNoise1`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\nb = Bus.control(s, 1);\n\na = {\n var freq;\n freq = LFNoise1.kr(2, 600, 800);\n Out.kr(b, freq); // no need ...
[ { "role": "user", "content": "What is `List`?" }, { "role": "assistant", "content": "List — list of items of variable size" }, { "role": "user", "content": "What does `List.new` do?" }, { "role": "assistant", "content": "Creates a List with the initial capacity given by s...
[ { "role": "user", "content": "How do I make a kick that starts at 220 Hz and falls to 40 Hz? (osc saw, sweep 0.06, decay 0.25, f0 220, f1 40, amp 0.6, rev 0)" }, { "role": "assistant", "content": "A kick is a sine with a fast pitch drop and a short amplitude envelope:\n\n```supercollider\n// kic...
[ { "role": "user", "content": "Show another SuperCollider example using `List`." }, { "role": "assistant", "content": "```supercollider\n(\n// Create a new empty List with size: 3\nx = List.new(3);\n\nx.postln; // -> List[ ]\n\n// Add numbers 0 to 4 to the List\n5.do({ |i| x.add(i) });\n\n// The ...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `WrapIndex`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n// indexing into a table\n(\n{\n var buf = LocalBuf.newFrom([200, 300, 400, 500, 600, 800]);\n var freq = WrapInd...
[ { "role": "user", "content": "What is `Main`?" }, { "role": "assistant", "content": "Main — The concrete instance of Process" }, { "role": "user", "content": "What does `Main.thisProcess` do?" }, { "role": "assistant", "content": "The singleton instance of Main is availab...
[ { "role": "user", "content": "Explain this SuperCollider patch.\n```supercollider\n// for the members of the cult of q\n// who don't want to ~tilde\n\n\n//-- INIT\nq = q ? ();\n\nq.local = currentEnvironment;\n\nq.local.pattern = Pbind(\\note, Pbrown(0, { 17.rand + 1 } ! 12), \\dur, 0.05, \\amp, 0.01);\n\n\...
[ { "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": "What does `RedOscillator2.update` do?" }, { "role": "assistant", "content": "Calculate new phases (phase and phase2) as well as speeds (delta and delta2). Always call LINK#-couple before" } ]
[ { "role": "user", "content": "I edited a SynthDef and the running sound did not change." }, { "role": "assistant", "content": "Redefining a SynthDef only affects Synths created after the new definition reaches the server; existing instances keep the graph they were built with. Free and recreate ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nNdef(\\maus, { MouseX.kr });\nNdef(\\haus, { Pan2.ar(Blip.ar(Ndef.kr(\\maus, 1) * 70), SinOsc.kr(Ndef.ar(\\maus, 1) * 5)) }.play;\n```" }, { "role": "assistant", "con...
[ { "role": "user", "content": "Show another SuperCollider example using `BinaryOpUGen`." }, { "role": "assistant", "content": "```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....
[ { "role": "user", "content": "Explain `Ddup` in SuperCollider briefly." }, { "role": "assistant", "content": "Ddup — Demand rate input replicator Category: UGens > Demand." } ]
[ { "role": "user", "content": "What is `BLowPass`?" }, { "role": "assistant", "content": "BLowPass — 12db/oct rolloff - 2nd order resonant Low Pass Filter" }, { "role": "user", "content": "What does `BLowPass.sc` do?" }, { "role": "assistant", "content": "calculate filter ...