conversations
listlengths
2
6
[ { "role": "user", "content": "Show another SuperCollider example using `Scale`." }, { "role": "assistant", "content": "```supercollider\n(\nr = {\n var scale = Scale.choose.postln;\n SinOsc.ar(\n (\n DegreeToKey.kr(\n scale.as(LocalBuf),\n MouseX.kr(0, 15), // mouse index...
[ { "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": "What does this SuperCollider code do?\n```supercollider\n(\n// connect a MIDI device, allNotesOff with CmdPeriod useful\n\nMIDIClient.init;\nm = MIDIOut(0);\ng = { 16.do({ |i| m.allNotesOff(i) }) };\nCmdPeriod.add(g); \n\n\np = Pbind(\n \\type, \\midi,\n \\midiout, m, \n ...
[ { "role": "user", "content": "Explain this code:\n```supercollider\nPbind(\\degree, Pseq([0, 2, 4, 7], inf), \\dur, 0.25).play;\n```" }, { "role": "assistant", "content": "It plays a four-note major arpeggio in a loop, one note every 250 ms.\n\n`Pbind` builds an event stream: each event is the c...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `ProxySpace`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\np = ProxySpace.new;\np.fadeTime = 2; // fadeTime specifies crossfade\np[\\out].play; // monitor an em...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\ns.boot;\n\n// excitation signal is WhiteNoise, triggered twice a second with varying OnePole coef\n(\n { Pluck.ar(WhiteNoise.ar(0.1), Impulse.kr(2), 440.reciprocal, 440.reciprocal, 10,\n coef: MouseX.kr(-0.999, 0.999)...
[ { "role": "user", "content": "What does `MIDIFunc.songSelect` do?" }, { "role": "assistant", "content": "A convenience method to create a new MIDIFunc which responds to MIDI song select messages. See #*new for argument descriptions. The responding `func` will be passed the arguments song and Ret...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `Duty`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n// this is useful when two UGens need to be called, but only one of their outputs is needed\n(\n{\n var a, b, c;\n a =...
[ { "role": "user", "content": "What does `BusPlug.asUGenInput` do?" }, { "role": "assistant", "content": "Returns the appropriate output to read from the BusPlug bus (an InBus UGen) `b =" } ]
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nb = NodeProxy.new.play;\nb.source = { PinkNoise.ar(0.2.dup) };\n// now I want to filter b through a new proxy.\na = NodeProxy.new;\na <-- b; a.source = { HPF.ar(b.ar, 7000) };\na...
[ { "role": "user", "content": "Give me a complete SuperCollider patch for Nested ifs in a SynthDef: bind everything it needs before it is used." }, { "role": "assistant", "content": "```supercollider\n(\n{\nvar noise, out;\nnoise = LFNoise0.kr(8);\n\nout = if( noise > 0.0,\n if(noise > 0.5, \n ...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\na = Synth(\\MoaningDialogue)\n\n//COOL TWEAKS\n//AngryTweak\na.set(\\feedback, 29,\\freq, 6)\n//CalmTweak\na.set(\\feedback, 60, \\freq, 0.8)\n//WeirdTweak\na.set(\\feedback, 2.8, \\freq, 2)\n\n(\nSynthDef(\\MoaningDialo...
[ { "role": "user", "content": "Show another SuperCollider example using `FBSineC`." }, { "role": "assistant", "content": "```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": "user", "content": "Write a minimal SuperCollider example that uses `CoinGate`." }, { "role": "assistant", "content": "```supercollider\n(\na = SynthDef(\"help-TCoin\", { |out = 0, prob = 0.5|\n var trig;\n trig = CoinGate.kr(prob, Impulse.kr(10));\n Out.ar(out,\n SinOsc.ar(\n ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `PV_BinScramble`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\nb = Buffer.read(s, ExampleFiles.child);\n\n(\n// trig with MouseY\nSynthDef(\"help-binScramble\", { |out = 0, soundBufnum = 2|\n var ...
[ { "role": "user", "content": "Write a kick at amp 0.6 with a click. (osc sine, sweep 0.06, decay 0.18, f0 220, f1 55, 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": "What does this SuperCollider patch do?\n```supercollider\n(SynthDef(\\x, {|midi = 60, amp = 0.8| Out.ar(0, Pan2.ar(SinOsc.ar(midi.midicps, mul: EnvGen.kr(Env.perc(0, 0.5), timeScale: 0.5, levelScale: 0.3)), Rand(-1, 1)) * EnvGen.kr(Env.perc(0, 0.5), timeScale: 1.3*0.5, levelSca...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n//run one line at a time\nf= BBCutBuffer(Platform.resourceDir +/+ \"sounds/break.aiff\",8);\n\nPost << [\\length,f.length, \\beatlength, f.beatlength, \\events, f.eventstarts] << nl;\n\n\nf= BBCutBuffer.array([Platform.re...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `BusPlug` and actually plays. Assume nothing about the session." }, { "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{ ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LFDClipNoise`." }, { "role": "assistant", "content": "```supercollider\n// try wiggling the mouse quickly;\n// LFNoise frequently seems stuck, LFDNoise changes smoothly.\n\n{ LFClipNoise.ar(MouseX.kr(0.1, 1000, 1), 0....
[ { "role": "user", "content": "What is `VBAPSpeaker` in SuperCollider?" }, { "role": "assistant", "content": "VBAPSpeaker — Vector Base Amplitude Panning Speaker VBAPSpeaker represents a speaker in a VBAPSpeakerArray. Its instance variables are populated by VBAPSpeakerArray, and generally you sho...
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Lorenz2DL.ar(11025, 44100) }.play(s);\n\n// randomly modulate params\n(\n{ Lorenz2DL.ar(\n 11025, 44100,\n LFNoise0.kr(1, 2, 10),\n 20,\n LFNoise0.kr(1, 1.5, 2),\n 0.02\n)...
[ { "role": "user", "content": "What is `Latency`?" }, { "role": "assistant", "content": "Latency — Measure audio latency for multiple channels" }, { "role": "user", "content": "What does `Latency.testAudio` do?" }, { "role": "assistant", "content": "main method to measure ...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `Dust2` that runs as it is." }, { "role": "assistant", "content": "```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\", { ...
[ { "role": "user", "content": "How do I granulate a sample with 0.15 s grains? (rate 16, dur 0.15, interp 4, mode sweep, rev 0)" }, { "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": "What does `Sample.storeArgs` do?" }, { "role": "assistant", "content": "a soundfile small enough to be loaded in memory" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ ClipNoise.ar(0.2 }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never closed, so the expression...
[ { "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": "What does this SuperCollider patch do?\n```supercollider\n// derived from an answer by Sergio Luque to a mail to the sc-users SuperCollider mailing list on 2013/03/22\n\n(\nvar registerSize = 16;\nvar min =\"C2\".namemidi.asInteger;\nvar max = \"C6\".namemidi.asInteger;\nvar wa...
[ { "role": "user", "content": "Write a GrainBuf synth at 20 grains per second. (rate 20, dur 0.2, 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.w...
[ { "role": "user", "content": "How do I build a live drone with Ndef at 165 Hz? (ugens tri, cutoff 2400, lfo 0.8, 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 2400 Hz l...
[ { "role": "user", "content": "Write a Pbind in minorPentatonic using Pwalk for the degrees. (scale minorPentatonic, seq Pwalk, dur 0.4, 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```sup...
[ { "role": "user", "content": "What is `XLine` in SuperCollider?" }, { "role": "assistant", "content": "XLine — Exponential line generator. Generates an exponential curve from the start value to the end value. Both the start and end values must be non-zero and have the same sign. Category: UGens ...
[ { "role": "user", "content": "What does `InstrSynthDef.loadCacheFromDir` do? What arguments does it take?" }, { "role": "assistant", "content": "Extends SynthDef enabling the extra capabilities of Instr with Patch Arguments: server; dir." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// logistic map as frequency control\n(\n{ var r;\n r = MouseX.kr(3.5441, 4); // stable range\n SinOsc.ar(QuadC.ar(40, r.neg, r, 0, 0.1, 800, 900)) * 0.4;\n}.play(s);\n```" ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// constant source (72), max deviation +/- 3\n// no repetition within 5 pitches\n\n(\nx = {\n var trig = Impulse.ar(5);\n var midi = Demand.ar(trig, 0, DIdev(72, 2, -1, 2));\n ...
[ { "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": "Explain this SuperCollider code.\n```supercollider\n// another example\n\n(\n// must have power of two framesize- FFT size will be sorted by Convolution2 to be double this\n// maximum is currently a = 8192 for FFT of size 16384\na = 2048;\n// kernel buffer\ng = Buffer.alloc(s, ...
[ { "role": "user", "content": "How do I play a random majorPentatonic scale at octave 5? (scale majorPentatonic, seq Pshuf, dur 0.25, octave 5, instr pluck, root 0)" }, { "role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```superco...
[ { "role": "user", "content": "Explain `EaseInExpo` in SuperCollider briefly." }, { "role": "assistant", "content": "EaseInExpo — Exponential ease-in Easing equation for an exponential (2^t) ease-in, accelerating from zero velocity. Category: Ease." } ]
[ { "role": "user", "content": "Show another SuperCollider example using `StandardL`." }, { "role": "assistant", "content": "```supercollider\n// mouse-controlled param\n{ StandardL.ar(SampleRate.ir/2, MouseX.kr(0.9, 4)) * 0.3 }.play(s);\n```" } ]
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `LFPulse` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n4.insp;\n[1,2,3].insp;\nPageLayout.insp;\nSynthDef(\"yawn\",{ arg freq=100;\n Out.ar(0,Saw.ar * LFPulse.kr(3))\n}).insp;\n```"...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\n// Three nodes in this data. First is always the root.\n// So the first is applied to decide whether to branch down to the second or third.\n// Then those nodes decide whether to classify the datum as 1/2/3/4.\n~treeda...
[ { "role": "user", "content": "What does `ServerLogGui.guiEvent` do? What arguments does it take?" }, { "role": "assistant", "content": "the interface for display and searching the ServerLog Arguments: ev; layout — the parent view, FlowView or window. Returns: (returnvalue)" } ]
[ { "role": "user", "content": "What is `AbstractConsole` in SuperCollider?" }, { "role": "assistant", "content": "AbstractConsole — abstract parent class for the console widgets Category: Libraries > crucial > GUI > abstract." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nVowel(); // defaults to A bass\nVowel(\\a, \\bass); \nVowel(\\e, \\tenor); \nVowel(\\i, \\counterTenor); \nVowel(\\o, \\alto); \nVowel(\\u, \\soprano); \n\n{Formants.ar(100, Vowe...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `MultiTap` that runs as it is." }, { "role": "assistant", "content": "```supercollider\ns.boot;\nb = Buffer.alloc(s, s.sampleRate);\n(\n{\n MultiTap.ar(`[0.1, 0.2, 0.3, 0.4], `[0.1, 0.2, 0.4, 0.8],\n Decay.ar(Dus...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `Ball` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var f, sf;\n sf = K2A.ar(MouseX.kr > 0.5) > 0;\n f = Ball.ar(sf, MouseY.kr(0.01, 20, 1), 0.01);\n f...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `AbstractFunction`." }, { "role": "assistant", "content": "```supercollider\na = { |x, root = 60| x + root }; b = a.midicps; [a.value(9), b.value(9)];\na = Pseries(60, 1, inf).midicps; a.asStream.nextN(12);\n{ a = LFNo...
[ { "role": "user", "content": "What does `HasPatchIns.mapInputToBus` do? What arguments does it take?" }, { "role": "assistant", "content": "parent class for Players that have PatchIns such as Patch Arguments: i; bus." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// this does not work:\n(\n{\n var trig = Dust.ar(4);\n Trig.kr(trig, 0.1) * SinOsc.ar(800) * 0.1\n}.play;\n);\n\n// this works:\n(\n{\n var trig = T2K.kr(Dust.ar(4));\n Trig...
[ { "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;\n a = [\n SinOsc.ar,\n Saw.ar,\n Pulse.ar\n ];\n TChoose.ar(Dust.ar(MouseX.kr(1, 1000, 1)), a) * 0.2\n\n}.play;\n```" }, { "role": "ass...
[ { "role": "user", "content": "What is `ScopeOut` in SuperCollider?" }, { "role": "assistant", "content": "ScopeOut — FIXME: ScopeOut purpose. FIXME: ScopeOut description. Category: UGens > Buffer, UGens > Undocumented." } ]
[ { "role": "user", "content": "Write a SuperCollider patch that uses `QuadN` and actually plays. Assume nothing about the session." }, { "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\...
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n// The driven pendulum is interesting as it's a quite simple model\n// that includes parameter zones of chaotic behaviour:\n// http://lampx.tugraz.at/~hadley/physikm/apps/numerical_integration/pendulum.en.php\n\n// y here deno...
[ { "role": "user", "content": "Write an Ndef with a saw source and a 2400 Hz low-pass. (ugens saw, cutoff 2400, lfo 0.3, freq 110, amp 0.12)" }, { "role": "assistant", "content": "`Ndef` is a named proxy you can redefine while it is playing:\n\n```supercollider\n// Ndef drone: saw source through ...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `PV_BrickWall`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\n(\n{\n var in, chain;\n in = WhiteNoise.ar(0.2);\n chain = FFT(LocalBuf(2048), in);\n chain = P...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `PackFFT` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n// Reminder: This isn't the intended typical usage! It's OK to do this though.\n(\nx = {\n var mags, phase...
[ { "role": "user", "content": "Show another SuperCollider example using `RunningSum`." }, { "role": "assistant", "content": "```supercollider\n// RMS Power\n(\n{\n var input, numsamp;\n\n input = LFSaw.ar;\n numsamp = 30;\n\n (RunningSum.ar(input.squared, numsamp) / numsamp).sqrt\n}.p...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// write a sine oscillator's output to a pin, and read the pin value at other times\n\n(\nSynthDef(\"help-DigitalIO\", { |out = 0|\n DigitalIO.ar(0, SinOsc.ar(10), LFPulse.kr(...
[ { "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 `PV_MagDiv` in SuperCollider?" }, { "role": "assistant", "content": "PV_MagDiv — Division of magnitudes Divides magnitudes of two inputs and keeps the phases of the first input. Category: UGens > FFT." } ]
[ { "role": "user", "content": "What does `PlayerInputProxy.makePatchOut` do? What arguments does it take?" }, { "role": "assistant", "content": "placeholder for Patch inputs for a player that will be supplied later Arguments: agroup; private; bus; bundle." } ]
[ { "role": "user", "content": "Give me a complete SuperCollider patch for Will nobody switch the damn thing off?: bind everything it needs before it is used." }, { "role": "assistant", "content": "```supercollider\n(\n\n{\nvar dseq, trig;\n\ndseq = Dseq([SinOsc.ar(45).range(-5, 12), SinOsc.ar(Sin...
[ { "role": "user", "content": "What does `String.drawCenteredIn` do?" }, { "role": "assistant", "content": "Draws the String into the given Rect using the Font and Color specified." } ]
[ { "role": "user", "content": "What is `Plotter`?" }, { "role": "assistant", "content": "Plotter — Plot numerical data on a window or view" }, { "role": "user", "content": "What does `Plotter.plotGraph` do?" }, { "role": "assistant", "content": "`{ |x| sin(x) }.plotGraph(3...
[ { "role": "user", "content": "What is `Chromagram` in SuperCollider?" }, { "role": "assistant", "content": "Chromagram — Octave chroma band based representation of energy in a signal; Chromagram for nTET tuning systems with any base reference A chromagram, measuring the energy at particular chro...
[ { "role": "user", "content": "What are you good at?" }, { "role": "assistant", "content": "SuperCollider. I can explain its classes and UGens, write SynthDefs and patches, read a patch back to you, and tell you why one does not compile. I am 198M parameters; I am not a general assistant." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ RLPFD.ar(Mix(LFSaw.ar([120, 180], 0, 0.33)), LinExp.kr(LFCub.kr(0.1, 0.5*pi), -1, 1, 280, 1500), 0.6, 0.5, mul:3.dup }.play\n```" }, { "role": "assistant", "content...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n// Handy code for quick class demonstrations.\n// Comparing a few intervals - Just Intonation versus 12-tone Equal Tempered\n\n// Major third (just)\nNdef(\\a, { Saw.ar(freq: [60.midicps, 60.midicps * 5/4], mul: 0.1) })....
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Lorenz2DC.ar(8800, 16000) }.play(s);\n\n// randomly modulate params\n(\n{ Lorenz2DC.ar(\n 110, 22050,\n LFNoise2.kr(1, 2, 10),\n 20,\n LFNoise2.kr(1, 1.5, 2),\n 0.01\n) * ...
[ { "role": "user", "content": "What does `InstrAt.name` do?" }, { "role": "assistant", "content": "a reference to an Instr by name. obsolete" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nr = Recorder(s);\n{ GVerb.ar(Dust.ar(4)) }.play; // play on bus 64\nr.record(numChannels: 2;\nr.stopRecording;\n```" }, { "role": "assistant", "content": "A closing b...
[ { "role": "user", "content": "Explain `ControlFile` in SuperCollider briefly." }, { "role": "assistant", "content": "ControlFile — Write specs into File A tool for reading and writing spec files. Category: Libraries > Radicles." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nNdef(\\x, { SinOsc.ar(Rand(500, 900)) * 0.1 }).play;\nNdef(\\x).copy(\\y);\nNdef(\\y.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: t...
[ { "role": "user", "content": "What does `PSVdif_oi.new` do? What arguments does it take?" }, { "role": "assistant", "content": "Creates a new PSVdif_oi Arguments: genList — An array of generators and corresponding offsets. Allowed generators: Integers, Streams or Patterns producing intervals or ...
[ { "role": "user", "content": "What does `Pdef.removeAll` do?" }, { "role": "assistant", "content": "Remove all proxies from the global dictionary" } ]
[ { "role": "user", "content": "Write an Ndef with a saw source and a 2400 Hz low-pass." }, { "role": "assistant", "content": "`Ndef` is a named proxy you can redefine while it is playing:\n\n```supercollider\n// Ndef drone: saw source through a 2400 Hz low-pass\n(\nNdef(\\nd_saw_55_2400, { |freq ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{LPCError.ar(AudioIn.ar, MouseX.kr(1,64))}.play\n\n{LPCError.ar(SinOsc.ar(LFNoise0.kr(0.2,400,500)), MouseX.kr(1,64))}.play\n\n{LPCError.ar(Resonz.ar(Mix(Saw.ar(100*[1,0.9,0.8,0....
[ { "role": "user", "content": "Explain `RedFood` in SuperCollider briefly." }, { "role": "assistant", "content": "RedFood — an object with energy Category: Red > redUniverse." } ]
[ { "role": "user", "content": "How do I build a live drone with Ndef at 55 Hz? (ugens saw, cutoff 800, lfo 0.3, freq 55, 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: saw source through a 8...
[ { "role": "user", "content": "Write a SuperCollider patch for Server-side sequencing (a SuperCollider snippet) that runs as it is, with nothing assumed about the session." }, { "role": "assistant", "content": "```supercollider\n(\nf = { |f0=200, rate=4|\n {\n var seq = Dseq(f0*[1/2,3/4, Dstu...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `CoinGate`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n(\na = SynthDef(\"help-TCoin\", { |out = 0, prob = 0.5|\n var trig;\n trig = CoinGate.kr(prob, Impulse.kr(10));\...
[ { "role": "user", "content": "Write an Ndef at 165 Hz I can retune while it plays. (ugens blip, cutoff 3200, lfo 0.1, freq 165, 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: blip source th...
[ { "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": "What does this SuperCollider patch do?\n```supercollider\n(\n{\n var saw, bpf;\n saw = Saw.ar(\n freq: [1700,2000],\n mul: LFPulse.kr(\n freq: [2,7],\n width: 0.115));\n bpf = LPF.ar(in: saw, freq: SinOsc.kr(1/3).range(250, 4000)); \n}.play;\n)\n```" }, {...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// ControlSpec-map can also be used to map ugens\n(\nvar spec;\nspec = [100, 18000, \\exp].asSpec;\n{\n var freq, osc;\n osc = SinOsc.kr(0.1).range(0, 1);\n freq = spec.map(os...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `OnePole`." }, { "role": "assistant", "content": "```supercollider\n{ OnePole.ar(WhiteNoise.ar(0.5), 0.95) }.play\n\n{ OnePole.ar(WhiteNoise.ar(0.5), -0.95) }.play\n\n{ OnePole.ar(WhiteNoise.ar(0.5), Line.kr(-0.99, 0.9...
[ { "role": "user", "content": "What is `IdentitySet`?" }, { "role": "assistant", "content": "IdentitySet — a set according to identity" }, { "role": "user", "content": "What does `IdentitySet.add` do?" }, { "role": "assistant", "content": "Add anObject to the IdentitySet. ...
[ { "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": "Write a minimal SuperCollider example that uses `PV_MagFreeze`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\nb = Buffer.read(s, ExampleFiles.child);\n\n\n(\nSynthDef(\"help-magFreeze\", { |out = 0|\n var in, chain;\n in = SinOsc.ar(LFNoise1.kr...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Streson.ar(LFSaw.ar([220, 180], 0, mul:EnvGen.kr(Env.asr(0.5, 1, 0.02), 1.0) * 0.2), LinExp.kr(LFCub.kr(0.1, 0.5*pi), -1, 1, 280, 377).reciprocal, 0.9, 0.3 }.play\n```" }, ...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `FoldIndex`. 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 = FoldInd...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ SinOsc.ar(SinOsc.ar(0.3).curverange(440, 660, -3), 0, 0.5 * 0.1 }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis op...
[ { "role": "user", "content": "Explain this SuperCollider code:\n```supercollider\n{ SinOsc.ar(440) * EnvGen.kr(Env.perc(0.01, 1), doneAction: 2) }.play;\n```" }, { "role": "assistant", "content": "It plays a 440 Hz sine with a percussive envelope, and the Synth frees itself when the envelope\nen...
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n// another example\n\n(\n// must have power of two framesize- FFT size will be sorted by Convolution2 to be double this\n// maximum is currently a = 8192 for FFT of size 16384\na = 2048;\n// kernel buffer\ng = Buffer.alloc(s, ...
[ { "role": "user", "content": "What are the arguments of PlayBuf.ar?" }, { "role": "assistant", "content": "`PlayBuf.ar(numChannels, bufnum, rate, trigger, startPos, loop)`. numChannels must match what is in the buffer, or you get a channel mismatch; bufnum is the Buffer's integer number; rate is...
[ { "role": "user", "content": "What is `MxDocument` in SuperCollider?" }, { "role": "assistant", "content": "MxDocument — a wrapper for placing code Documents onto the Mx grid This is for adding code documents to an Mx. Category: Mx." } ]