conversations
listlengths
2
6
[ { "role": "user", "content": "Write a kick drum with a 0.5 s decay. (osc sine, sweep 0.06, decay 0.5, f0 220, f1 48, 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: 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 Instr(\\helpTempoPlayer,{\n Impulse.ar( Tempo.kr )\n });\n\n Patch(\\helpTempoPlayer).play(atTime:1)\n```" }, { "role": "assistant", "content": "A closing b...
[ { "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": "What is `SystemSynthDefs`?" }, { "role": "assistant", "content": "SystemSynthDefs — SynthDefs assumed to exist on the server" }, { "role": "user", "content": "What does `SystemSynthDefs.numChannels` do?" }, { "role": "assistant", "content": "...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Symbol`." }, { "role": "assistant", "content": "```supercollider\na = { SinOsc.ar(\\freq.kr(440, 1.2)) }.play;\na.set(\\freq, 330);\na.release;\na = { SinOsc.ar(\\freq.kr([440, 460], 1.2)) }.play;\na.setn(\\freq, [330...
[ { "role": "user", "content": "How do I see what a signal is doing?" }, { "role": "assistant", "content": "`.poll` prints values to the post window — `SinOsc.kr(1).poll` prints once per control block, and `.poll(10)` limits it to every 10th. `s.scope` opens an oscilloscope on the main output, and...
[ { "role": "user", "content": "How do I stop all sound?" }, { "role": "assistant", "content": "s.freeAll stops every node on the server. On the language side, Ndef.clear and Pdef.clear clear the proxies. If a Pattern is still running, Pdef(\\name).stop does it; CmdPeriod immediately stops everyth...
[ { "role": "user", "content": "Explain this SuperCollider patch.\n```supercollider\n// Evaluate this to start your project\n// The Cactus instnce is stored in c by convention\n\nc = CactusGUI(Document.current.dir).cactus; // with GUI\nc = Cactus(Document.current.dir); // without GUI\n\n/*\n\nAny folder with ...
[ { "role": "user", "content": "Give me an Ndef with an LFO at 0.8 Hz. (ugens sine, cutoff 400, lfo 0.8, 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 source through a 400 Hz ...
[ { "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 = Diwhite(0, 15, 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}.play;\...
[ { "role": "user", "content": "What does `BAllPass.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "All Pass Filter Arguments: in — input signal to be processed.; freq — center frequency. WARNING: due to the nature of its implementation frequency values close to 0 may c...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `DigitalOut` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n// write a sine oscillator's output to a pin\n\n(\nSynthDef(\"help-DigitalOut\", { |out = 0|\n Digita...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// modulate frequency and index multiplier\n{ FBSineN.ar(LFNoise2.kr(1, 1e4, 1e4), LFNoise2.kr(1, 16, 17), 1, 1.005, 0.7) * 0.2 }.play(s;\n```" }, { "role": "assistant", ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\np = SFPlayer.new; //shows open file dialog\n\n//specify the file\np = SFPlayer.new(Platform.resourceDir +/+ \"sounds/a11wlk01.wav\";\np.play;\np.stop;\np.gui;\n\n// shows open fi...
[ { "role": "user", "content": "What does `Group.before` do?" }, { "role": "assistant", "content": "Create and return a Group and add it immediately before" } ]
[ { "role": "user", "content": "What does `RedBencode.decodeBytes` do?" }, { "role": "assistant", "content": "Same as link#*de`but useful when decoding data received from the serial port.` array An Int8Array with 8bit" } ]
[ { "role": "user", "content": "Explain this code:\n```supercollider\nMix.ar([SinOsc.ar(220, 0, 0.1), SinOsc.ar(330, 0, 0.1)])\n```" }, { "role": "assistant", "content": "Sums two sine waves into one signal — a perfect fifth, 220 Hz and 330 Hz, at 0.1 amplitude each.\n\n`[SinOsc.ar(220, 0, 0.1), S...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// shifting a 100Hz tone by 1 Hz rising to 500Hz\n{ FreqShift.ar(SinOsc.ar(100), XLine.kr(1, 500, 5), 0, [0.1, 0.1]) }.play(s);\n\n// shifting a complex tone by 1 Hz rising to 500Hz\n{ FreqShift.ar(Klang.ar(`[[101, 303, 6...
[ { "role": "user", "content": "How do I build a live drone with Ndef at 220 Hz? (ugens sine, cutoff 1400, 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: sine source through a 1400 Hz...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n// This question comes up sometimes.\n// one way to do it is to define an event type:\n\n\n(\nEvent.addEventType(\\dnote, { |server|\n \n var instrument = ~instrument.asDefName;\n var synthLib = ~synthLib ?? { SynthDe...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LFSaw`." }, { "role": "assistant", "content": "```supercollider\n{ LFSaw.ar(500, 1, 0.1) }.play\n\n// used as both Oscillator and LFO:\n{ LFSaw.ar(LFSaw.kr(4, 0, 200, 400), 0, 0.1) }.play\n```" } ]
[ { "role": "user", "content": "Saving \"Presets\"?" }, { "role": "assistant", "content": "SuperCollider forum — Saving \"Presets\"?\n\nIf you don’t care too much about it being human readable, just use writeArchive and readArchive:\n\n```supercollider\na = Array.fill(400, {rrand(0,2200)});\n\na.w...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `IRand`." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-IRand\", {\n Out.ar(\n IRand(0, 1), // play on random channel between 0 and 1\n FSinOsc.ar(500,\n 0, Line.kr(0.2, 0, 0.1,...
[ { "role": "user", "content": "Write a granular texture, dry. (rate 6, 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 with GrainBuf\n(\ns.waitForBoot {\n ...
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n// note that the root pitch is not stored in the Scale (which should arguably be called a Mode for that reason)\n// instead you supply it at play time:\n\n// key of A\nPbind(\n \\degree, Pseq((0..7), inf), // your melody goes...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `MultiplexAnalogIn` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n// modulate frequency of a sine oscillator\n\n(\nSynthDef(\"help-MultiplexAnalogIn\", { |out = 0|\n Out.ar(out,\n S...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `Splay` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\nx = { |spread = 1, level = 0.1, center = 0|\n var n = 20;\n var snd = Splay.ar(LFPulse.ar({ 100.exprand(...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n Instr(\\beatClockPlayerTest,{ arg gate=0.0;\n var a,t;\n\n t = gate;\n a = Decay2.kr(t,0.01,0.1).clip2(1.0);\n a * SinOsc.ar(300);\n },[\n \\gate\n ]);\n\n ...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `PV_PhaseShift`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\n(\nSynthDef(\"help-phaseShift\", { |out = 0|\n var in, chain;\n in = SinOsc.ar(500);...
[ { "role": "user", "content": "What is `Sieve` in SuperCollider?" }, { "role": "assistant", "content": "Sieve — Container class for sieve lists Container for a list of ascending integers as 'points' or 'intervals'. For an introduction and more examples see Sieves_and_Psieve_patterns. Category: Li...
[ { "role": "user", "content": "What is `Position` in SuperCollider?" }, { "role": "assistant", "content": "Position — an object that holds the value of the current play position for an object Category: Libraries > crucial > Scheduling." } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LFDNoise0`." }, { "role": "assistant", "content": "```supercollider\n// try wiggling mouse quickly;\n// LFNoise frequently seems stuck, LFDNoise changes smoothly.\n\n{ LFNoise0.ar(MouseX.kr(0.1, 1000, 1), 0.1) }.play\...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `RunningSum`." }, { "role": "assistant", "content": "```supercollider\n// distorts of course - would need scaling\n{ RunningSum.ar(SoundIn.ar) }.play\n\n// Running Average over x samples\n(\n{\n var x = 100;\n Ru...
[ { "role": "user", "content": "Write a random pentatonic melody that plays by itself." }, { "role": "assistant", "content": "Pick degrees from a pentatonic scale; `\\scale` and `\\root` define the pitch space, and `\\degree`\npicks within it.\n\n```supercollider\n(\nPbind(\n \\instrument, \\de...
[ { "role": "user", "content": "Show another SuperCollider example using `NamedControl`." }, { "role": "assistant", "content": "```supercollider\n// multiple usage of the same name:\na = { SinOsc.ar(\\freq.kr(440, 1.0)) + Saw.ar(\\freq.kr(440, 1.0) * 0.5) * 0.1 }.play;\n\na.set(\\freq, 1220);\na.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 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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\na = {LFTri.ar(100+(1000*Maths.ar(MouseX.kr, MouseY.kr, SinOsc.ar(0.2, 0).range(0,1), 1-MouseButton.kr(lag:0.001))[0]), 0, 0.1}.play\n```" }, { "role": "assistant", "c...
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ PinkNoise.ar(1) * Line.kr(1, 0, 2, doneAction: Done.freeSelf }.play.onFree { \"done\".postln };\n```" }, { "role": "assistant", "content": "A closing bracket is mis...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `ProxySynthDef`." }, { "role": "assistant", "content": "```supercollider\na = ProxySynthDef(\"xtest\", { SinOsc.ar(400) * 0.1 });\n\na.add;\n\nx = Synth(\"xtest\");\nx.release;\n\n\n/*\n\n if the resulting number of c...
[ { "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 is `Interface` in SuperCollider?" }, { "role": "assistant", "content": "Interface — Sets up an environment in which you can build a player, a GUI and responders for midi and keyboard control This sets up an environment in which you can build a player, build a g...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `HPZ2`." }, { "role": "assistant", "content": "```supercollider\n// Compare:\n\n{ WhiteNoise.ar(0.25) }.play;\n\n{ HPZ2.ar(WhiteNoise.ar(0.25)) }.play;\n\n// HPZ2 is useful to detect changes in a signal:\n// see also H...
[ { "role": "user", "content": "What does `Association.new` do? What arguments does it take?" }, { "role": "assistant", "content": "Create an Association between two objects. Arguments: key — any object; value — any object." } ]
[ { "role": "user", "content": "What is `Buffer`?" }, { "role": "assistant", "content": "Buffer — Client-side representation of a buffer on a server" }, { "role": "user", "content": "What does `Buffer.alloc` do?" }, { "role": "assistant", "content": "Create and return a Buf...
[ { "role": "user", "content": "How do I make an additive bell with Klank?" }, { "role": "assistant", "content": "Klank is a bank of resonant filters excited by a short impulse: you describe the partials as\nfrequencies, amplitudes and decay times.\n\n```supercollider\n(\nSynthDef(\\klank, { |out ...
[ { "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": "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": "Give me an Ndef with an LFO at 0.1 Hz." }, { "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 low-pass\n(\nNdef(\\nd_tri_55_3200, { |freq = 55, amp ...
[ { "role": "user", "content": "What is `PV_MagAbove` in SuperCollider?" }, { "role": "assistant", "content": "PV_MagAbove — Pass bins above a threshold. Passes only bins whose magnitude is above a threshold. Category: UGens > FFT." } ]
[ { "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 `List.newClear` do?" }, { "role": "assistant", "content": "Creates a List with the initial capacity given by size and slots filled with" } ]
[ { "role": "user", "content": "What is `SyncSaw` in SuperCollider?" }, { "role": "assistant", "content": "SyncSaw — Hard sync sawtooth wave. A sawtooth wave that is hard synched to a fundamental pitch. This produces an effect similar to moving formants or pulse width modulation. The sawtooth osci...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `LFClipNoise`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-LFClipNoise\", { |out = 0|\n Out.ar(out,\n LFClipNoise.ar(1000, 0.25)\n )\n}).play;\n);...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// modulate frequency and index multiplier\n{ FBSineN.ar(LFNoise2.kr(1, 1e4, 1e4), LFNoise2.kr(1, 16, 17), 1, 1.005, 0.7) * 0.2 }.play(s;\n```" }, { "role": "assistant", ...
[ { "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": "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 this SuperCollider patch.\n```supercollider\n// if NTMI.helloSnd is not already defined in startup file, do this:\nfork {\n NTMI.numChans.do { |i|\n { LFDNoise3.ar(\n XLine.kr(\n exprand(2000, 5000),\n exprand(2000, 20000),\n 0.25, doneActi...
[ { "role": "user", "content": "Explain `MxTimeGui` in SuperCollider briefly." }, { "role": "assistant", "content": "MxTimeGui — Timeline view This object is the timeline view that coordinates any timeline views that the units may support. Category: Mx." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// increase feedback\n{ FBSineL.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 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 `AnalogIn`." }, { "role": "assistant", "content": "```supercollider\n// modulate frequency of a sine oscillator\n\n(\nSynthDef(\"help-AnalogIn\", { |out = 0|\n Out.ar(out,\n SinOsc.ar(AnalogIn.ar(0).exprange(200, 5...
[ { "role": "user", "content": "How do I play a random majorPentatonic scale at octave 5? (scale majorPentatonic, seq Prand, dur 0.25, octave 5, 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```superc...
[ { "role": "user", "content": "Give me a Pbind with sine voices and a 0.2 rhythm. (scale minorPentatonic, seq Prand, dur 0.2, octave 4, instr sine, root 0)" }, { "role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```supercollider\n(...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// Reminder: This isn't the intended typical usage! It's OK to do this though.\n(\nx = {\n var mags, phases, chain, sig;\n // Create simple undulating magnitudes\n mags = { FSinOsc.kr(ExpRand(0.1, 1)).range(0, 1) }.dup...
[ { "role": "user", "content": "What does `AudacityLabels.read` do? What arguments does it take?" }, { "role": "assistant", "content": "Create a new instance an read labels into the Arguments: labelPath — Path to the file that contains the label information." } ]
[ { "role": "user", "content": "What does `Pset.new` do? What arguments does it take?" }, { "role": "assistant", "content": "event pattern that sets values of one key Arguments: name — the key.; value — can be a pattern or a stream. The resulting stream ends when that incoming stream ends.; patter...
[ { "role": "user", "content": "Explain `Rest` in SuperCollider briefly." }, { "role": "assistant", "content": "Rest — Represents a rest in event patterns A Rest may be used in event patterns to indicate that the resulting event should be a rest (i.e., silent). It should be used in one of the chil...
[ { "role": "user", "content": "What is `MemoRoutine` in SuperCollider?" }, { "role": "assistant", "content": "MemoRoutine — Routine-like object which stores last values A MemoRoutine behaves like a Routine, though it is not defined as a subclass of it. It stores last values, the maximum buffer si...
[ { "role": "user", "content": "What does `Integer.xrand` do? What arguments does it take?" }, { "role": "assistant", "content": "32-bit Integer number Arguments: exclude — an Integer.. Returns: a random value from zero to this, excluding the value exclude." } ]
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `DigitalIn`. Define every value it uses." }, { "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(5...
[ { "role": "user", "content": "Write an Ndef with a blip source and a 800 Hz low-pass. (ugens blip, 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: blip source t...
[ { "role": "user", "content": "What does `FreeVerb.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "A reverb Arguments: in — input signal.; mix — dry/wet balance. range 0..1.; room — room size. rage 0..1.; damp — Reverb HF damp. range 0..1.; mul; add." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{\nvar a, b, t = Impulse.kr(2);\na = { Dseq([1, 2, 3, 4, 5], inf) } * 100;\nb = a + 1;\nDemand.kr(t, 0, [a, b]).poll(t\n}.play\n```" }, { "role": "assistant", "conten...
[ { "role": "user", "content": "Give me a Pbind with sine voices and a 0.4 rhythm. (scale minorPentatonic, seq Pwalk, dur 0.4, octave 6, instr sine, root 0)" }, { "role": "assistant", "content": "Put the scale and the degree pattern in the `Pbind` and it will pick notes for you:\n\n```supercollide...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n// used to lag pitch\n{\n SinOsc.ar( // sine wave\n Lag.kr( // lag the modulator\n LFPulse.kr(4, ...
[ { "role": "user", "content": "Write a kick drum with a 0.18 s decay. (osc saw, sweep 0.06, decay 0.18, 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: saw oscillator, ...
[ { "role": "user", "content": "What is `Bag`?" }, { "role": "assistant", "content": "Bag — Unordered collection of objects" }, { "role": "user", "content": "What does `Bag.new` do?" }, { "role": "assistant", "content": "Creates a Bag with an initial capacity for n objects....
[ { "role": "user", "content": "What does `SimpleNumber.ellintRj` do?" }, { "role": "assistant", "content": "Returns Carlson's Elliptic Integral RJ. Requires that `x,y,z >= 0`, with at most one of them zero, and that `p !=" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Impulse.ar(4, [0, MouseX.kr(0, 1)], 0.2 }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never cl...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Lag2`." }, { "role": "assistant", "content": "```supercollider\n(\n// used to lag pitch\n{\n SinOsc.ar( // sine wave\n Lag2.kr( // lag the modulator\n LFPulse.kr(4, 0, 0.5, 50, 400), // frequency mod...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// increase feedback\n{ FBSineL.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": "What is `BinaryOpFunction`?" }, { "role": "assistant", "content": "BinaryOpFunction — represent a binary operation on a function" }, { "role": "user", "content": "What does `BinaryOpFunction.value` do?" }, { "role": "assistant", "content": "E...
[ { "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": "Write a self-contained SuperCollider patch that uses `Dgeom`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n// example\n\n(\n{\n var a, freq, trig;\n a = Dgeom(1, 1.2, 15);\n trig = Impulse.kr(MouseX.kr(1, 40, 1));\n freq =...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `GrayNoise`." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-GrayNoise\", { |out = 0|\n Out.ar(out,\n GrayNoise.ar(-20.dbamp)\n )\n}).play;\n)\n```" } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Pseq`." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\\help_sinegrain,\n { |out = 0, freq = 440, sustain = 0.05|\n var env;\n env = EnvGen.kr(Env.perc(0.01, sustain, 0.2), doneAction: Don...
[ { "role": "user", "content": "What does `Server.sampleRate` do?" }, { "role": "assistant", "content": "An integer representing the nominal sample rate of the server; in other words, the sample rate that was requested of the server when it was" } ]
[ { "role": "user", "content": "What does `UChain.canFreeSynth` do?" }, { "role": "assistant", "content": "Returns a boolean indicating if the UChain contains a unit that can free the group due to it's Returns: Boolean" } ]
[ { "role": "user", "content": "Show another SuperCollider example using `Symbol`." }, { "role": "assistant", "content": "```supercollider\na = { Ringz.ar(T2A.ar(\\trig.tr), \\freq.kr(500, 1), 0.8) }.play;\na.set(\\freq, 330, \\trig, 1);\na.set(\\freq, 830, \\trig, 1);\na.release;\n```" } ]
[ { "role": "user", "content": "Give me an Ndef with an LFO at 0.8 Hz. (ugens blip, cutoff 400, lfo 0.8, 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: blip source through a 400 Hz low-pas...
[ { "role": "user", "content": "Write a Pbind whose degrees repeat every Pseq cycle. (scale minorPentatonic, seq Pseq, dur 0.2, octave 5, 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```supercolli...
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// play around\n(\n{\n var input, numsamp, power;\n numsamp = 500;\n input = SoundIn.ar;\n power = MouseX.kr(0.1, 4);\n\n (RunningSum.ar(input ** power, numsamp)/n...
[ { "role": "user", "content": "What is `PV_ChainUGen`?" }, { "role": "assistant", "content": "PV_ChainUGen — Base class for UGens that operate on FFT chains" }, { "role": "user", "content": "What does `PV_ChainUGen.fftSize` do?" }, { "role": "assistant", "content": "Return...
[ { "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": "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": "What does `IBVAplayer.prepare` do? What arguments does it take?" }, { "role": "assistant", "content": "open the file and read in the data. this will also set the sampling rate of the ibva Arguments: path — input file." } ]
[ { "role": "user", "content": "What does `Symbol.tr` do?" }, { "role": "assistant", "content": "Return a TrigControl input with a default value (val). If val is an array, the control will be" } ]
[ { "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.18, f0 220, f1 40, 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...