conversations
listlengths
2
6
[ { "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": "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": "I get 'Buffer UGen: no buffer data'. What does it mean?" }, { "role": "assistant", "content": "The UGen got a bufnum that the server has no data for. `Buffer.read` is asynchronous: the Buffer object exists immediately but the samples arrive later, so a Synth created...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nx = {\n // A collection of different tones:\n var son = SinOsc.ar((100, 100.3 .. 110));\n var val = ArrayMax.ar(son).at(0);\n val = LeakDC.ar(val); // the operation tends ...
[ { "role": "user", "content": "Write a SuperCollider patch for Detune idea is from James Harkins. Start by defining the values the patch depends on." }, { "role": "assistant", "content": "```supercollider\n(\na = {\n |freq = 40, wid = 0.5|\n Mix(LFPulse.ar(freq *((Array.fill(40, Pxrand((1, 2..2...
[ { "role": "user", "content": "Write a Pbind whose degrees repeat every Pshuf cycle. (scale minorPentatonic, seq Pshuf, dur 0.2, octave 5, instr sine, root 0)" }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nSynthDef(...
[ { "role": "user", "content": "What is `FoaMagWr` in SuperCollider?" }, { "role": "assistant", "content": "FoaMagWr — First Order Ambisonic (FOA) Magnitude of Soundfield Reactive Energy Vector Return the Magnitude of Reactive Energy Vector, ||Wr||, of a first order ambisonic (B-format) signal. Ca...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `TWChoose`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a;\n a = [\n SinOsc.ar,\n Saw.ar,\n Pulse.ar\n ];\n TWChoose.ar(Dust.ar(MouseX.kr(1, 1000, 1)), a, [0.99, 0.05, 0.05]...
[ { "role": "user", "content": "What does `NumberEditor.value` do? What arguments does it take?" }, { "role": "assistant", "content": "holds a float value with a spec, editable with a gui Arguments: v; change." } ]
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\n\n ~needed_interval = 20;\n\n ~funk = {\n\n // if last time isn't defined, create it with 1000 seconds ago time\n if( ~last_time.isNil ) {\n ~last_time = Date.getDate.bootSeconds;\n ~last_time = ~last_time -...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Dstutter`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var freq, trig;\n var in = Dseq([1, 2, 3], inf);\n var rep = Dstutter(Diwhite(2, 8, inf), in);\n trig = Impulse.kr(MouseX.kr(1, 40, 1));\n...
[ { "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": "Write a granular texture, through a reverb. (rate 14, dur 0.07, interp 2, mode noise, 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(\ns.w...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nb = NodeProxy.audio(s, 2);\nb.play; // listen to b\nb.source = { SinOsc.ar([400, 500], 0, 0.1) }; // play something\n\nr = b.record(\"recproxy101.aiff\"); // start recorder (paus...
[ { "role": "user", "content": "How do I build a live drone with Ndef at 165 Hz? (ugens tri, 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: tri source through ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{\n var env = Env.step([0, 3, 5, 2, 7, 3, 0, 3, 4, 0], [0.5, 0.1, 0.2, 1.0, 1.5, 2, 0.2, 0.1, 0.2, 0.1]);\n var envgen = EnvGen.kr(env);\n var freq = (envgen + 60).midicps;...
[ { "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 minimal SuperCollider example that uses `Env`." }, { "role": "assistant", "content": "```supercollider\n// an envelope in a synth\n(\n{\n var env = Env([0, 1, 0.5, 1, 0], [0.01, 0.5, 0.02, 0.5]);\n SinOsc.ar(470) * EnvGen.kr(env, doneAction: Done.freeSelf)...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `HPF`." }, { "role": "assistant", "content": "```supercollider\n{ HPF.ar(Saw.ar(200, 0.1), FSinOsc.kr(XLine.kr(0.7, 300, 20), 0, 3600, 4000), 5) }.play;\n\n(\n{ var ctl = HPF.kr(LFSaw.kr(5), SinOsc.kr(XLine.kr(0.07, ...
[ { "role": "user", "content": "What is `PSVdif_o` in SuperCollider?" }, { "role": "assistant", "content": "PSVdif_o — Sieve pattern for difference of integer generators with offsets and point output Pattern for difference of integer generators with offsets and point output. Corresponds to Sieve's...
[ { "role": "user", "content": "Write an Ndef with a sine source and a 3200 Hz low-pass. (ugens sine, cutoff 3200, lfo 0.3, freq 55, amp 0.12)" }, { "role": "assistant", "content": "`Ndef` is a named proxy you can redefine while it is playing:\n\n```supercollider\n// Ndef drone: sine source throug...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// modulate fundamental frequency, formant freq stays constant\n{ Formant.ar(XLine.kr(400, 1000, 8), 2000, 800, 0.125) }.play\n\n// modulate formant frequency, fundamental freq stays constant\n{ Formant.ar(200, XLine.kr(4...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\n{\n var time = 0.23;\n var freq = (55).midicps;\n var a = VarSaw.ar(freq/2, width: XLine.ar(0.5,1,time)).range(0,XLine.ar(0.666,1/666,time));\n var tone = SinOsc.ar(freq).fold(-0.23*a,a) * EnvGen.ar(Env([1,0],[tim...
[ { "role": "user", "content": "Show another SuperCollider example using `Env`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var env = Env([0.0, 0.5, 0.0, 1.0, 0.9, 0.0], [0.05, 0.1, 0.01, 1.0, 1.5], -4);\n var envgen = EnvGen.ar(env, doneAction: Done.freeSelf);\n env.plot;...
[ { "role": "user", "content": "What is `VMScan2D` in SuperCollider?" }, { "role": "assistant", "content": "VMScan2D — 2D scanning pattern virtual machine Converts a buffer of virtual machine instructions into the synthesis of a 2D path. Category: UGens > Buffer //SLUGens released under the GNU GP...
[ { "role": "user", "content": "What does `VBAPSpeaker.new` do? What arguments does it take?" }, { "role": "assistant", "content": "Create a new VBAPSpeaker. Normally you should not need to do Arguments: azi — This speaker's azimuth angle, +/- 180 degrees from the median plane (i.e. straight ahead...
[ { "role": "user", "content": "What is `AbstractFunction`?" }, { "role": "assistant", "content": "AbstractFunction — An object which responds to a set of messages that represent mathematical functions" }, { "role": "user", "content": "What does `AbstractFunction.neg` do?" }, { ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LatoocarfianL`." }, { "role": "assistant", "content": "```supercollider\n// default initial params\n{ LatoocarfianL.ar(MouseX.kr(20, SampleRate.ir)) * 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\nNdef(\\sound).fadeTime = 3;\n(\nNdef(\\sound, { |fadeTime = 1, gate = 1|\n var e = Env.adsr(fadeTime, 0.01, 0.4, fadeTime).ar(2, gate);\n SinOsc.ar(100 + (e * 700), SinOsc.ar(2...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// note different syntax in these two examples\n{ if(LFNoise1.kr(1.0, 0.5, 0.5), SinOsc.ar, Saw.ar) * 0.1 }.play;\n\n{ Trig1.ar(Dust.ar(3), 0.2).lag(0.1).if(FSinOsc.ar(440), FSin...
[ { "role": "user", "content": "Write an Ndef at 55 Hz I can retune while it plays. (ugens saw, cutoff 2400, lfo 0.8, freq 55, amp 0.12)" }, { "role": "assistant", "content": "Use `Ndef` when the patch has to change without stopping:\n\n```supercollider\n// Ndef drone: saw source through a 2400 Hz...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Env`." }, { "role": "assistant", "content": "```supercollider\n// an envelope in a synth\n(\n{\n var env = Env([0, 1, 0.5, 1, 0], [0.01, 0.5, 0.02, 0.5]);\n SinOsc.ar(470) * EnvGen.kr(env, doneAction: Done.freeSelf)...
[ { "role": "user", "content": "What does `Scale.tuning` do? What arguments does it take?" }, { "role": "assistant", "content": "Sets or gets the tuning of the Arguments: inTuning — can be either an instance of Tuning or a symbol matching a library tuning.." } ]
[ { "role": "user", "content": "What does `GUI.add` do? What arguments does it take?" }, { "role": "assistant", "content": "Registers a new scheme. This is typically called by external libraries in their startup procedure. If a scheme with the same identifier (`scheme.id`) exists, it is Arguments:...
[ { "role": "user", "content": "How do I pan notes around the stereo field in a pattern?" }, { "role": "assistant", "content": "Put `\\pan` in the Pbind: the default instrument understands it and passes it to Pan2.\n\n```supercollider\n(\nPbind(\n \\scale, Scale.minorPentatonic,\n \\degree, ...
[ { "role": "user", "content": "What does `Interface.onPrepareToBundle` do?" }, { "role": "assistant", "content": "Sets up an environment in which you can build a player, a GUI and responders for midi and keyboard control" } ]
[ { "role": "user", "content": "What is `Integer` in SuperCollider?" }, { "role": "assistant", "content": "Integer — 32-bit Integer number A 32-bit integer. Integer inherits most of its behaviour from its superclass, SimpleNumber. Category: Math." } ]
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `TChoose` that runs as it is." }, { "role": "assistant", "content": "```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)...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `Dstutter`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var freq, trig;\n var in = Dseq([1, 2, 3], inf);\n var rep = Dstutter(Diwhite(2, 8, inf), in);\n trig =...
[ { "role": "user", "content": "Give me a sine kick with a 0.06 s pitch sweep. (osc sine, sweep 0.06, decay 0.12, f0 150, f1 55, 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// kick drum: sine os...
[ { "role": "user", "content": "Write a kick drum in SuperCollider." }, { "role": "assistant", "content": "A pitch-swept sine with a fast decay: the frequency envelope is what makes it read as a kick.\n\n```supercollider\n(\nSynthDef(\\kick, { |out = 0, amp = 0.8|\n var pitch = EnvGen.kr(Env([1...
[ { "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": "Write a minimal SuperCollider example that uses `Resonz`." }, { "role": "assistant", "content": "```supercollider\n{ Resonz.ar(WhiteNoise.ar(0.5), 2000, 0.1) }.play\n\n// modulate frequency\n{ Resonz.ar(WhiteNoise.ar(0.5), XLine.kr(1000, 8000, 10), 0.05) }.play\n\n/...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Env`." }, { "role": "assistant", "content": "```supercollider\n// an envelope in a synth\n(\n{\n var env = Env([0, 1, 0.5, 1, 0], [0.01, 0.5, 0.02, 0.5]);\n SinOsc.ar(470) * EnvGen.kr(env, doneAction: Done.freeSelf)...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch for Kepler 22-b atmosphere. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n(\nfork { \n Ndef(\\ttwnd).play;//(d,2,addAction:\\addToHead);\n loop {\n var seed = thisThread.randSeed...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\n{\n var env = Env([0, 0.6, 0.3, 1.0, 0], [0.1, 0.02, 0.4, 1.1], [\\lin, \\exp, -6, \\sin]);\n var envgen = IEnvGen.kr(env, MouseX.kr(0, env.times.sum));\n env.plot;\n SinOsc.ar(envgen * 500 + 440)\n}.play;\n);\n\n...
[ { "role": "user", "content": "Write a pluck whose tail uses gverb. (verb gverb, room 0.7, damp 0.2, mix 0.3, source pluck)" }, { "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 pluck\n(\nSynth...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// Change MembraneCircle to MembraneHexagon for a different shaped\n// circular drum head\ns.boot;\ns.reboot;\n(\n{ var excitation = EnvGen.kr(Env.perc,\n MouseButton.kr(0, 1, 0),\n ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LinPan2`." }, { "role": "assistant", "content": "```supercollider\n// hear the difference, LinPan having a slight drop in the middle (yeah, it's subtle)...\n{ LinPan2.ar(SinOsc.ar(440), Line.kr(-1, 1, 5)) }.play;\n\n/...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Diwhite`." }, { "role": "assistant", "content": "```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 SinOs...
[ { "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": "What is `Env`?" }, { "role": "assistant", "content": "Env — Specification for a segmented envelope" }, { "role": "user", "content": "What does `Env.new` do?" }, { "role": "assistant", "content": "Create a new envelope specification." }, {...
[ { "role": "user", "content": "What does this SuperCollider code do?\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], 0.1), XLine.kr(8000, 400, 5), 0.05) }.pl...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ LFPulse.ar(LFPulse.kr(3, 0, 0.3, 200, 200), 0, 0.2, 0.1 }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened ear...
[ { "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 `DegreeToKey` in SuperCollider?" }, { "role": "assistant", "content": "DegreeToKey — Convert signal to modal pitch. The input signal value is truncated to an integer value and used as an index into an octave repeating table of note values. Indices wrap aroun...
[ { "role": "user", "content": "What does `PlayerSocket.preparePlayer` do? What arguments does it take?" }, { "role": "assistant", "content": "a player that can play other players using a cross-faded and fuse-protected socket Arguments: player; onComplete." } ]
[ { "role": "user", "content": "What does `SCButtonAdapter.labelColor` do? What arguments does it take?" }, { "role": "assistant", "content": "parent class for Button classes Arguments: color." } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Out`." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-out\", { |out = 0, freq = 440|\n var source;\n source = SinOsc.ar(freq, 0, 0.1);\n\n // write to the bus, adding to previous con...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `DecodeB2`." }, { "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 /...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ MoogLadder.ar(Mix(LFSaw.ar([120, 180], 0, 0.33)), LinExp.kr(LFCub.kr(0.1, 0.5*pi), -1, 1, 180, 8500), 0.75.dup }.play\n```" }, { "role": "assistant", "content": "A ...
[ { "role": "user", "content": "How do I use a metronome or check my timing?" }, { "role": "assistant", "content": "A click on the clock you are using, plus a counter to see where you are in the bar:\n\n```supercollider\n(\nTdef(\\click, {\n var count = 0;\n loop {\n (Synth(\\hat, [\\...
[ { "role": "user", "content": "What does `PlayerSpec.rate` do?" }, { "role": "assistant", "content": "datatype specifying that the input or output is a Player object" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Gbman2DC.ar(MouseX.kr(20, SampleRate.ir*0.25), MouseX.kr(80, SampleRate.ir), 0.1) }.play(s);\n\n{ Gbman2DC.ar(11025, 22050, -0.7, -2.7, 0.1) }.play(s);\n\n{ Gbman2DC.ar(2200, 8...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `GbmanN`." }, { "role": "assistant", "content": "```supercollider\n// default initial params\n{ GbmanN.ar(MouseX.kr(20, SampleRate.ir)) * 0.1 }.play(s);\n\n// change initial params\n{ GbmanN.ar(MouseX.kr(20, SampleRate...
[ { "role": "user", "content": "How do I make a kick that starts at 220 Hz and falls to 55 Hz? (osc fm, sweep 0.06, decay 0.18, f0 220, 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...
[ { "role": "user", "content": "What does `ObjectGui.writeName` do? What arguments does it take?" }, { "role": "assistant", "content": "ObjectGui by default makes a nameplate with the name of the model. Implement this in subclasses if a different name style or no nameplate is desired. Note: this m...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.boot\n\n{ Ringz.ar(PinkNoise.ar([0.1, 0.2]).scope(\\pink), 2000, 1, 0.25 }.play; // multichannel works\ns.scope; // can still separately scope the output of the server\n```" ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Out.ar(87, SinOsc.ar(MouseX.kr(240, 1000, 1) * [1, 2, 3], 0, 0.2)) }.play; // play three sine tone on channels 87, 88, and 89\nx = Monitor.new; // create a new monitor\nx.play(...
[ { "role": "user", "content": "What is `NAryOpStream` in SuperCollider?" }, { "role": "assistant", "content": "NAryOpStream — several streams combined by an n-ary operator A NAryOpStream is created as a result of a n-ary math operation on a Stream. It is defined to respond to next by returning th...
[ { "role": "user", "content": "What is `SynthDesc`?" }, { "role": "assistant", "content": "SynthDesc — Description of a synth definition" }, { "role": "user", "content": "What does `SynthDesc.read` do?" }, { "role": "assistant", "content": "Adds all synthDescs in a path to...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-WhiteNoise\", { |out = 0|\n Out.ar(out,\n WhiteNoise.ar(0.25)\n )\n}).play;\n```" }, { "role": "assistant", "content": "A closing bracket is m...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `BufSampleRate`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\nb = Buffer.read(s, ExampleFiles.child);\n\n// compares a 1102.5 Hz sine tone (11025 * 0.1, left) with a 1100 ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ SinOsc.ar(ControlRate.ir * 0.1 }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never closed, so ...
[ { "role": "user", "content": "Write an Ndef at 55 Hz I can retune while it plays. (ugens saw, cutoff 3200, lfo 0.8, 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 throug...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\nSynthDef(\\bird,{\n var sig, freqenv, env, trig;\n trig = Dust.ar(2);\n env = EnvGen.ar(Env.perc(0.01,0.4,0.8,-8), trig, doneAction: 2);\n freqenv = EnvGen.ar(Env([Rand(1000,3000), Rand(3000,6000), Rand(1000,2000)...
[ { "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{ LinCongL.ar(\n LFNoise2.kr(1, 1e4, 1e4),\n LFNoise2.kr(0.1, 0.5, 1.4),\n LFNoise2.kr(0.1, 0.1, 0.1),\n LFNoise2.kr(0.1)\n) * 0.2 }.play(s);\...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `ReplaceOut` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n(\n// define a control\nSynthDef(\"line\", { arg i_bus=10, i_start=1000, i_end=500, i_time=1;\n ReplaceOut.kr(i_bus, Line.kr(...
[ { "role": "user", "content": "Write a Pbind in majorPentatonic using Pshuf for the degrees. (scale majorPentatonic, seq Pshuf, dur 0.25, 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```su...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\ns = Server.local;\nServer.default = s;\ns.boot;\n);\n \n \n// definition for future reference in arbitrary Environments\n\np = PLmeanrand(\\lo, \\hi);\n\n\n// prepare current Environment\n// PLseq repeats...
[ { "role": "user", "content": "How do I play a random minorPentatonic scale at octave 6? (scale minorPentatonic, seq Pseq, dur 0.2, octave 6, instr fm, root 0)" }, { "role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```supercollide...
[ { "role": "user", "content": "What is `BPeakEQ` in SuperCollider?" }, { "role": "assistant", "content": "BPeakEQ — Parametric equalizer The B equalization suite is based on the Second Order Section (SOS) biquad UGen. Category: UGens > Filters > BEQSuite." } ]
[ { "role": "user", "content": "What does `MKtlElement.enable` do?" }, { "role": "assistant", "content": "enable and disable this element's action. works hierarchically in MKtlElementGroup as well: `make" } ]
[ { "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": "Explain `Clock` in SuperCollider briefly." }, { "role": "assistant", "content": "Clock — abstract superclass for clocks Clock is an abstract class: it only defines an abstract set of methods that all clocks should implement. See its subclasses: SystemClock, Category...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-InFeedback\", { |out = 0, in = 0|\n var input, sound;\n input = InFeedback.ar(in, 1);\n sound = SinOsc.ar(input * 1300 + 300, 0, 0.4);\n Out.ar(out, ...
[ { "role": "user", "content": "What does `Pen.lineTo` do? What arguments does it take?" }, { "role": "assistant", "content": "Draw a line (define a path) from the current position to Arguments: point — An instance of Point." } ]
[ { "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 `Harmonics` in SuperCollider briefly." }, { "role": "assistant", "content": "Harmonics — Convenient factory for filling buffers with harmonics on the server Harmonics objects are convenient factories for creating Arrays that are used to fill buffers using th...
[ { "role": "user", "content": "What is `Max` in SuperCollider?" }, { "role": "assistant", "content": "Max — maximum within last x samples Will output the maximum value of over the last numsamp samples, calculated efficiently by storing a local maximum for every control period. The numsamp argumen...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// linlin\n(\n{\n var mod = LFNoise2.ar(80);\n SinOsc.ar(mod.linlin(-1, 1, MouseX.kr(200, 8000, 1), MouseY.kr(200, 8000, 1))) * 0.1\n}.play;\n);\n\n// range\n(\n{\n var mod = ...
[ { "role": "user", "content": "What does `SmoothFoldQ2.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "wave folding pseudo ugen using parabolic segments, two fold ranges Arguments: in — input signal.; lo — lower limit, defaults to -1.; hi — upper limit, defaults to 1.;...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{Decimator.ar(SinOsc.ar([400, 404], 0, 0.2), MouseX.kr(0, 44100), MouseY.kr(0, 31))}.play\n\n{Decimator.ar(SoundIn.ar, MouseX.kr(0, 44100), MouseY.kr(0, 31)}.play\n```" }, { ...
[ { "role": "user", "content": "Write a kick at amp 0.8 with no click. (osc saw, sweep 0.06, decay 0.12, f0 150, f1 55, amp 0.8, rev 0)" }, { "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, ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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))\n )\n}).add;\n);\n\n(\...
[ { "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{ 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": "Explain `MxArJack` in SuperCollider briefly." }, { "role": "assistant", "content": "MxArJack — A hot swappable input point for use in internal patching In particular this is used by the Instr driver to put placeholders in the audio inputs. These can then be connecte...
[ { "role": "user", "content": "What is `Pwrand` in SuperCollider?" }, { "role": "assistant", "content": "Pwrand — embed values randomly chosen from a list Returns one item from the list at random for each repeat, the probability for each item is determined by a list of weights which should sum to...
[ { "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...