conversations
listlengths
2
6
[ { "role": "user", "content": "How do I play a random minorPentatonic scale at octave 6? (scale minorPentatonic, seq Pseq, dur 0.4, octave 6, instr sine, root 0)" }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nSynthD...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `Scale` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\nr = {\n var scale = Scale.choose.postln;\n SinOsc.ar(\n (\n DegreeToKey.kr(\n scale.as(Lo...
[ { "role": "user", "content": "Write a SuperCollider patch for We all could use a little more that runs as it is, with nothing assumed about the session." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\\cowbell, {\n | out=0, amp=0.3, gate=1, fund_freq=540, pan=0.0 |\n ...
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ LFNoise0.ar(1000, 0.25) }.play;\n\n// modulate frequency\n\n{ LFNoise0.ar(XLine.kr(1000, 10000, 10), 0.25) }.play;\n\n// as frequency modulator\n(\n{ SinOsc.ar(\n LFNoise0.a...
[ { "role": "user", "content": "Write a GrainBuf synth at 14 grains per second. (rate 14, dur 0.04, interp 4, mode noise, rev 0)" }, { "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\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": "What does `AudioMulchClock.startAction` do?" }, { "role": "assistant", "content": "A Function that is evaluated when the external clock is started (a `\\t_start` is" } ]
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// play SinOscs silently and wait for granulation envelopes\n\n(\na = Bus.audio(s, 10);\nx = { Splay.ar(In.ar(a, 10) * SinOsc.ar((3..12) * 100, 0, 0.05)) }.play\n);\n\n\n// send envelopes to buses\n\n(\nz = {\n DXEnvFa...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nb = Buffer.alloc(s, 1);\n{\nvar x, y, rate, a, c, m;\n rate = MouseX.kr(100, SampleRate.ir);\n a = 1.1;\n c = 0.13;\n m = 1.0;\n x = Dbufrd(b); // read from buffer\n x =...
[ { "role": "user", "content": "Write an Ndef at 82.5 Hz I can retune while it plays. (ugens tri, cutoff 1400, lfo 0.8, 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 140...
[ { "role": "user", "content": "What does `SimpleNumber.airyBi` do?" }, { "role": "assistant", "content": "Returns the result of the Airy function Bi at" } ]
[ { "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": "How do I granulate a sample with 0.1 s grains? (rate 6, dur 0.1, interp 2, mode sweep, 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.wait...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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```" }, { "role": "assista...
[ { "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 is `HiliteGradient` in SuperCollider?" }, { "role": "assistant", "content": "HiliteGradient — A linear color fade between an outside and an inside color A linear color fade between an outside and an inside color. Category: GUI > Accessories." } ]
[ { "role": "user", "content": "What is `Stethoscope` in SuperCollider?" }, { "role": "assistant", "content": "Stethoscope — An oscilloscope Stethoscope provides a complete oscilloscope GUI. It displays a window containing a bus-plotting ScopeView and an interface to configure the plotting and cho...
[ { "role": "user", "content": "GrainBuf complains about too many grains." }, { "role": "assistant", "content": "The number of simultaneous grains is `density × dur` in seconds, and it exceeds maxGrains (512 by default). Either lower the trigger rate, shorten the grains, or raise the limit: `Grain...
[ { "role": "user", "content": "Explain `ICepstrum` in SuperCollider briefly." }, { "role": "assistant", "content": "ICepstrum — Transform a cepstrum back to a spectrum See Cepstrum. Category: UGens > FFT." } ]
[ { "role": "user", "content": "The server stopped responding. What do I do?" }, { "role": "assistant", "content": "In order: `Ctrl+.` (CmdPeriod) to reset scheduling, then `s.reboot` if the server itself is wedged.\nA reboot drops every SynthDef and buffer, so re-add them — which is why real proj...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n Patch.new(\n [ 'help', 'Sample' ], [ Sample.new(\"a11wlk01.wav\", 1.6347258775994),\n 0.46511627906977, 0.17441860465116 ]\n ).play\n```" }, { "role": "assi...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `Recorder`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\nr = Recorder(s);\n{ GVerb.ar(Dust.ar(4)) }.play; // play on bus 64\nr.record(numChannels: 2);\nr.stopRecording;\n`...
[ { "role": "user", "content": "What is the difference between ~foo and a local variable?" }, { "role": "assistant", "content": "`var foo` is a local: it exists only inside the function or file block that declares it. `~foo` is an environment variable: it lives in the current Environment, survives...
[ { "role": "user", "content": "Explain `TBrownRand` in SuperCollider briefly." }, { "role": "assistant", "content": "TBrownRand — triggered random walk generator Generates a random walk from lo to hi with a Gendyn distribution each time the trig signal changes from nonpositive to positive values....
[ { "role": "user", "content": "Show another SuperCollider example using `LinExp`." }, { "role": "assistant", "content": "```supercollider\n// linexp\n(\n{\n var mod = LFNoise2.ar(80);\n SinOsc.ar(mod.linexp(-1, 1, MouseX.kr(200, 8000, 1), MouseY.kr(200, 8000, 1))) * 0.1\n}.play;\n);\n\n// expra...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `LFSaw`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n(\nfork {\n ~group = Group();\n\n 2.wait;\n\n SynthDef(\\buzz, {\n |out = 0, freq = 300, amp = 0.1, filter = 1....
[ { "role": "user", "content": "Write a Pbind whose degrees repeat every Prand cycle. (scale minorPentatonic, seq Prand, dur 0.3, octave 6, instr pluck, 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": "Write a minimal SuperCollider example that uses `Rand`." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-Rand\", { |out = 0|\n Out.ar(out,\n FSinOsc.ar(\n Rand(200.0, 400.0),\n 0, Line.kr(0.2, 0, 1, doneAction: Done.freeSelf)...
[ { "role": "user", "content": "Explain `NoteOffResponder` in SuperCollider briefly." }, { "role": "assistant", "content": "NoteOffResponder — allow functions to be registered to respond to MIDI noteOff events Category: External Control > MIDI." } ]
[ { "role": "user", "content": "What does `CXPlayerControl.isPlaying` do?" }, { "role": "assistant", "content": "adapter class for JITLib to control players" } ]
[ { "role": "user", "content": "What does `SoundFileFormats.headerFormat` do?" }, { "role": "assistant", "content": "a widget for selecting SoundFile format for recording" } ]
[ { "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": "What does `PClipNoise.new` do? What arguments does it take?" }, { "role": "assistant", "content": "UGenPatterns quark library Arguments: mul; add; length — Number of values produced.." } ]
[ { "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": "What is `TRand` in SuperCollider?" }, { "role": "assistant", "content": "TRand — Triggered random number generator. Generates a random float value in uniform distribution from `lo` to `hi` each time the trigger signal changes from nonpositive to positive values. Cat...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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": "assistant", "content": "A closing bracket is mi...
[ { "role": "user", "content": "How do I record my output to a file?" }, { "role": "assistant", "content": "`s.record(path)` starts recording the server's output; `s.stopRecording` stops it.\n\n```supercollider\ns.record(\"C:/audio/take1.wav\");\n// play for a while\ns.stopRecording;\n```\n\nThe p...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `DiskIn`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\n\n\n// create with cueSoundFile class method\nb = Buffer.cueSoundFile(s, ExampleFiles.apollo11, 0, 1);\nx...
[ { "role": "user", "content": "Write a chord progression with Pbind." }, { "role": "assistant", "content": "Put an array of degrees in the pattern, use \\strum to spread the chord, and the default instrument\nplays all notes of each event.\n\n```supercollider\n(\nPbind(\n \\scale, Scale.minor,...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch for nothing much ). Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n(\n{|atk=0.05,dur=10,freq=50,amp=0.8|\n PMOsc.ar(\n Line.kr(1,2,dur,freq),\n LFNoise2.kr([1,2]).range(1,2)*freq...
[ { "role": "user", "content": "What is `Bus`?" }, { "role": "assistant", "content": "Bus — Representation of a bus on the server" }, { "role": "user", "content": "What does `Bus.control` do?" }, { "role": "assistant", "content": "Allocate a control bus on the server." },...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `HPZ1`." }, { "role": "assistant", "content": "```supercollider\n// Compare:\n\n{ WhiteNoise.ar(0.25) }.play;\n\n{ HPZ1.ar(WhiteNoise.ar(0.25)) }.play;\n\n// HPZ1 is useful to detect changes in a signal:\n// see also H...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\na = {LFTri.ar(100+(1000*Maths2.ar(MouseX.kr, MouseY.kr, 0.2, 0, 1, MouseButton.kr(lag:0.001))[0]), 0, 0.1}.play\n```" }, { "role": "assistant", "content": "A closing ...
[ { "role": "user", "content": "Explain `Clip` in SuperCollider briefly." }, { "role": "assistant", "content": "Clip — Clip a signal outside given thresholds. This differs from the BinaryOpUGen Methods#clip2#clip2 in that it allows one to set both low and high thresholds. Category: UGens > Maths."...
[ { "role": "user", "content": "I get 'FAILURE IN SERVER /s_new SynthDef not found'. What is wrong?" }, { "role": "assistant", "content": "The server does not know that SynthDef. Three usual causes, in order of likelihood:\n\n1. **The SynthDef was added before the server booted.** `SynthDef(...).a...
[ { "role": "user", "content": "Give me a granular patch with sweep grain position and interp 4. (rate 14, dur 0.04, 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...
[ { "role": "user", "content": "Explain `FoaNr` in SuperCollider briefly." }, { "role": "assistant", "content": "FoaNr — First Order Ambisonic (FOA) Soundfield Unit Normalized Reactive Intensity Vector Return the Unit Normalized Reactive Intensity Vector, Nr, of a first order ambisonic (B-format) ...
[ { "role": "user", "content": "What does Splay.ar do?" }, { "role": "assistant", "content": "`Splay.ar(inArray, spread, level, center, levelComp)` takes an array of mono signals and distributes them across the stereo field, so `Splay.ar(SinOsc.ar([220, 330, 440]) * 0.1)` is a three-source stereo ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `DigitalIn`." }, { "role": "assistant", "content": "```supercollider\n// turn on and off a sine oscillator\n\n(\nSynthDef(\"help-DigitalIn\", { |out = 0|\n Out.ar(out,\n SinOsc.ar(500, 0, 0.1 * DigitalIn.ar(0))\n ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ LorenzTrig.ar(11025, 44100) }.play(s);\n\n// randomly modulate params\n(\n{ LorenzTrig.ar(\n 11025, 44100,\n LFNoise0.kr(1, 2, 10),\n 20,\n LFNoise0.kr(1, 1.5, 2),\n 0.02\...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `LFClipNoise` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\nx = { var inA, chainA, chainB;\n inA = LFClipNoise.ar(100);\n chainA = FFT(LocalBuf(2048, 1), inA)...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Logistic`." }, { "role": "assistant", "content": "```supercollider\n// default values\n{ Logistic.ar }.play\n\n// onset of chaos\n{ Logistic.ar(Line.kr(3.55, 3.6, 5), 1000) }.play\n\n// explore via Mouse\n{ Logistic.a...
[ { "role": "user", "content": "Add freeverb2 to a bell patch at room 0.7. (verb freeverb2, room 0.7, damp 0.2, mix 0.3, source bell)" }, { "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 be...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `SoundIn` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\nu = Server(\\scau, NetAddr(\"127.0.0.1\", 9989)); // Change the port from 9989 to the right one for you\nu....
[ { "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(StandardL.ar(40, MouseX.kr(0.9, 4))*800+900)*0.4 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracket is mis...
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n// Note that constructions like SynthDef(...) and Synth(...) are short for SynthDef.new(...), etc.\n// With SynthDef it is common to chain this with calls on the resulting instance,\n// e.g. SynthDef(...).add or SynthDef(...)....
[ { "role": "user", "content": "How do I granulate a sample with 0.04 s grains? (rate 16, dur 0.04, interp 2, mode noise, 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.w...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `SelectX`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a;\n a = [\n SinOsc.ar,\n Saw.ar(300),\n Pulse.ar(230)\n ];\n\n SelectX.ar(MouseX.kr(0, 1) * a.size, a) * 0.2\n}.play;...
[ { "role": "user", "content": "Show another SuperCollider example using `QuadN`." }, { "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 QuadN.ar(SampleRate.ir/4, r.neg, r, 0, 0.1) * 0...
[ { "role": "user", "content": "Write a Pbind whose degrees repeat every Pseq cycle." }, { "role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```supercollider\n(\nSynthDef(\\pluck, { |out = 0, freq = 440, amp = 0.2|\n var env = En...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `DelayL`." }, { "role": "assistant", "content": "```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, W...
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n(\nx = {\n |lookBack = 3, thr = 1|\n var trig = Impulse.ar(7);\n // for a non-integer source it makes sense to take a sufficiently large threshold thr\n var midi = Demand.ar(trig, 0, DIdev(SinOsc.ar(0.2, 0, 15, 82), 5, -6,...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `GbmanL`." }, { "role": "assistant", "content": "```supercollider\n// default initial params\n{ GbmanL.ar(MouseX.kr(20, SampleRate.ir)) * 0.1 }.play(s);\n\n// different initial params\n{ GbmanL.ar(MouseX.kr(20, SampleR...
[ { "role": "user", "content": "Explain `Radicles` in SuperCollider briefly." }, { "role": "assistant", "content": "Radicles — Main Radicles Class Main Radicles class Category: Libraries > Radicles." } ]
[ { "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": "What does this SuperCollider patch do?\n```supercollider\n(\n{\n var time = 30;\n var line = Line.kr(3000, 290, time);\n var line2 = Line.kr(280, 290, time);\n var line3 = Line.kr(0.01, 10, time);\n var sin = Mix.ar(SinOsc.ar([line, line2]) * SinOsc.ar(line3));\n var comb...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{\n var f, sf, g;\n sf = LFPulse.ar(0.6, 0.2, 0.5);\n g = MouseY.kr(0.1, 10, 1);\n d = MouseX.kr(0.0001, 1, 1);\n f = Ball.ar(sf, g, d);\n f = f * 140 + 400;\n SinOsc.a...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `Dseq`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a, freq, trig;\n a = Dseq([1, 3, 2, 7, 8], 3);\n trig = Impulse.kr(MouseX.kr(1, 40, 1));\n freq = Demand....
[ { "role": "user", "content": "Write an Ndef at 220 Hz I can retune while it plays. (ugens blip, cutoff 400, lfo 0.1, freq 220, amp 0.12)" }, { "role": "assistant", "content": "Use `Ndef` when the patch has to change without stopping:\n\n```supercollider\n// Ndef drone: blip source through a 400 ...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch for danger loud click. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n// proceed with caution. start at min volume, and not with your expensive speakers.\n\nfork{b=Buffer.alloc(s,512,1)...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Standard2DC.ar(220, 11025, mul:0.3) }.play(s);\n\n// mouse-controlled param\n{ Standard2DC.ar(8000, 20000, MouseX.kr(0.9,4), mul:0.3) }.play(s);\n\n// as a frequency control\n{...
[ { "role": "user", "content": "Give me a granular patch with sweep grain position and interp 4. (rate 6, dur 0.04, interp 4, mode sweep, rev 0)" }, { "role": "assistant", "content": "Granulation is `GrainBuf` plus a trigger rate; the position can move:\n\n```supercollider\n// granular synth with ...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `ArrayedCollection` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n(\nvar pitches = [43.0, 55.0, 58.86, 57.42, 67.0];\nfork {\n pitches.size.do{ |i|\n {\n var freq = pitches[i]...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// linexp\n(\n{\n var mod = LFNoise2.ar(80);\n SinOsc.ar(mod.linexp(-1, 1, MouseX.kr(200, 8000, 1), MouseY.kr(200, 8000, 1))) * 0.1\n}.play;\n);\n\n// exprange\n(\n{\n var mod...
[ { "role": "user", "content": "What is `UnaryOpUGen`?" }, { "role": "assistant", "content": "UnaryOpUGen — Apply a unary operation to the values of an input ugen" }, { "role": "user", "content": "What does `UnaryOpUGen.new` do?" }, { "role": "assistant", "content": "return...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Condition`." }, { "role": "assistant", "content": "```supercollider\n(\nc = Condition.new(false);\n\nRoutine {\n 1.wait;\n \"waited for 1 second\".postln;\n 1.wait;\n \"waited for another second, now waiting for y...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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{ RLPF.ar(Saw.ar([100, 250...
[ { "role": "user", "content": "Write a kick at amp 0.8 with a click. (osc saw, sweep 0.06, decay 0.35, f0 220, f1 48, amp 0.8, 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: saw oscillator, 0...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Rand`." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-Rand\", { |out = 0|\n Out.ar(out,\n FSinOsc.ar(\n Rand(200.0, 400.0),\n 0, Line.kr(0.2, 0, 1, doneAction: Done.freeSelf)...
[ { "role": "user", "content": "What does `MemoRoutine.copyItems` do?" }, { "role": "assistant", "content": "Instance variable getter and setter methods. If used directly the Integer copy code must be passed (see" } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `PV_PhaseShift`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\n(\nSynthDef(\"help-phaseShift\", { |out = 0|\n var in, chain;\n in = SinOsc.ar(500);\n chain = FFT(LocalBuf(2048...
[ { "role": "user", "content": "What is `Boolean` in SuperCollider?" }, { "role": "assistant", "content": "Boolean — abstract class whose instances represent a logical value Boolean is the superclass of True and False which are the concrete realizations. In code True and False are represented by t...
[ { "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(StandardL.ar(40, MouseX.kr(0.9, 4))*800+900)*0.4 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracket is mis...
[ { "role": "user", "content": "What does `UGen.prune` do?" }, { "role": "assistant", "content": "Limits the receiver range to one of the four clip modes, see `linlin`" } ]
[ { "role": "user", "content": "How do I distort a signal?" }, { "role": "assistant", "content": "Drive it into a nonlinearity, then tame the level: `tanh` is soft clipping, `.distort` is harder,\nand a low-pass after the drive keeps it from getting fizzy.\n\n```supercollider\n(\n{\n var sig = ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `BufFrames`." }, { "role": "assistant", "content": "```supercollider\nb = Buffer.read(s, ExampleFiles.child);\n\n// indexing with a phasor\n{ BufRd.ar(1, b, Phasor.ar(0, BufRateScale.kr(b), 0, BufFrames.kr(b))) }.play;...
[ { "role": "user", "content": "Explain `ControlSpec` in SuperCollider briefly." }, { "role": "assistant", "content": "ControlSpec — numerical input specification The original, and most common spec (see Spec). A ControlSpec is used by GUI sliders and knobs to specify the range and curve of the con...
[ { "role": "user", "content": "What is the difference between a Synth and a SynthDef?" }, { "role": "assistant", "content": "A SynthDef is a definition: a compiled UGen graph with named controls, registered on the server once. A Synth is one running instance of that definition. You create the def...
[ { "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 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": "Write an Ndef with a blip source and a 400 Hz low-pass." }, { "role": "assistant", "content": "`Ndef` holds the synth and the environment, so you can edit it live:\n\n```supercollider\n// Ndef drone: blip source through a 400 Hz low-pass\n(\nNdef(\\nd_blip_55_400, {...
[ { "role": "user", "content": "Show another SuperCollider example using `Recorder`." }, { "role": "assistant", "content": "```supercollider\nr = Recorder(s);\n{ GVerb.ar(Dust.ar(4)) }.play; // play on bus 64\nr.record(numChannels: 2);\nr.stopRecording;\n```" } ]
[ { "role": "user", "content": "Write a SuperCollider patch for batuhan's buzzer parametrized that runs as it is, with nothing assumed about the session." }, { "role": "assistant", "content": "```supercollider\n// A beautiful sc140 tweet by Batuhan Bozkurt, parametrized for real-time changes\n(\n/...
[ { "role": "user", "content": "What does `Task.stop` do?" }, { "role": "assistant", "content": "Stop playing now. (Pause and stop have the same" } ]
[ { "role": "user", "content": "What does `AbstractFunction.difsqr` do?" }, { "role": "assistant", "content": "(a*a) - (b*b) `({ [5, 6, 2].choose.postln } difsqr: { [2, -1," } ]
[ { "role": "user", "content": "Write a kick at amp 0.6 with no click. (osc saw, sweep 0.06, decay 0.5, f0 180, f1 55, amp 0.6, 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: saw oscillator, 0...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `Recorder`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\nr = Recorder(s);\n{ GVerb.ar(Dust.ar(4)) }.play; // play on bus 64\nr.record(numChannels: 2);\nr.stopRecording;\n`...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{CrossoverDistortion.ar(SinOsc.ar([400, 404], 0, 0.2), MouseX.kr(0, 1), MouseY.kr(0, 1))}.play\n\n{CrossoverDistortion.ar(SoundIn.ar, MouseX.kr(0, 1), MouseY.kr(0, 1)}.play\n```"...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `ControlSpec`." }, { "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, osc;\n osc = SinOsc.kr(0.1).ra...