conversations
listlengths
2
6
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `Padd`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n// sound example\n(\nSynthDef(\\sinegrain,\n { |out = 0, freq = 440, gate = 1|\n var env;\n env = EnvGen.kr(Env.a...
[ { "role": "user", "content": "What does `Node.asTarget` do?" }, { "role": "assistant", "content": "Abstract superclass of Synth and Group Returns: this Node. See the asTarget help file for more details." } ]
[ { "role": "user", "content": "Show another SuperCollider example using `Pmulp`." }, { "role": "assistant", "content": "```supercollider\n// sound example\n(\nSynthDef(\\sinegrain,\n { |out = 0, freq = 440, sustain = 0.02|\n var env;\n env = EnvGen.kr(Env.perc(0.001, sustain), 1, doneActio...
[ { "role": "user", "content": "Give me an Ndef with an LFO at 0.3 Hz. (ugens sine, cutoff 400, lfo 0.3, freq 82.5, 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 through a 400 Hz low-pa...
[ { "role": "user", "content": "What is `Xor` in SuperCollider?" }, { "role": "assistant", "content": "Xor — given two constraint objects, validates that the test object is true for one or the other but not both Category: Libraries > crucial > Constraints." } ]
[ { "role": "user", "content": "I edited a SynthDef and the running sound did not change." }, { "role": "assistant", "content": "Redefining a SynthDef only affects Synths created after the new definition reaches the server; existing instances keep the graph they were built with. Free and recreate ...
[ { "role": "user", "content": "What is `WarpCutProc1` in SuperCollider?" }, { "role": "assistant", "content": "WarpCutProc1 — Oscillator-rate breakbeat cutting Cutups in the style of Aphex Twin/ Bogdan Raczynski/ u-ziq etc, that is, sometimes so fast that a pitch is heard. With this procedure you...
[ { "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": "Are you a general assistant?" }, { "role": "assistant", "content": "No. I am sc-mind, a 198M model trained on SuperCollider. Ask me about SynthDefs, UGens, Patterns, Ndef, sclang and scsynth; outside that I have little to offer." } ]
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n~mdef =\n{\n |key, func, msgNum, permanent = true|\n\n MIDIdef(key, func ?? { MIDIdef(key).func }, msgNum ? MIDIdef(key).msgNum, MIDIdef(key).chan, MIDIdef(key).msgType, MIDIdef(key).srcID).permanent_(permanent)\n}\n``...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\n// Dust randomly triggers Decay to create an exponential\n// decay envelope for the WhiteNoise input source\n{\nz = Decay.ar(Dust.ar(1, 0.5), 0.3, WhiteNoise.ar);\nDelayL.ar(z, 0.2, 0.2, 1, z); // input is mixed with d...
[ { "role": "user", "content": "Write an Ndef with a tri source and a 3200 Hz low-pass. (ugens tri, cutoff 3200, lfo 0.3, freq 55, amp 0.12)" }, { "role": "assistant", "content": "Use `Ndef` when the patch has to change without stopping:\n\n```supercollider\n// Ndef drone: tri source through a 320...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\ns.boot;\n// allocate an array of Buffers and fill them with different harmonics\n(\nb = Buffer.allocConsecutive(8, s, 4096, 1, { |buf, i|\n buf.sine1Msg((1 .. ((i + 1) * 6)).reciprocal) // completion messages\n});\n\na =...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `SelectX` that runs as it is." }, { "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.si...
[ { "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": "What does `MantissaMask.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "Reduce precision. Arguments: in — The input signal.; bits — The number of mantissa bits to preserve. A number from 0 to 23.; mul — Output will be multiplied by this v...
[ { "role": "user", "content": "How do I build a live drone with Ndef at 82.5 Hz? (ugens tri, cutoff 2400, lfo 0.1, freq 82.5, amp 0.12)" }, { "role": "assistant", "content": "`Ndef` is a named proxy you can redefine while it is playing:\n\n```supercollider\n// Ndef drone: tri source through a 240...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// default params\n{ QuadL.ar(SampleRate.ir/4) * 0.2 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlie...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\na = { |tempo = 1| Ringz.ar(Impulse.ar(tempo), [501, 500], 1/tempo) }.play;\nt = TempoBusClock(a);\nTask { loop { \"klink\".postln; 1.wait } }.play(t);\n);\n\nt.tempo = 1.3;\nt.tempo = 0.5;\nt.tempo = 1.0;\n\n\n// in Pr...
[ { "role": "user", "content": "What is `ProxySynthDef`?" }, { "role": "assistant", "content": "ProxySynthDef — synth def that wraps ugen graph" }, { "role": "user", "content": "What does `ProxySynthDef.sampleAccurate` do?" }, { "role": "assistant", "content": "always use O...
[ { "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{ FBSineN.ar(\n LFNoise2.kr(1, 1e4, 1e4),\n LFNoise2.kr(1, 32, 33),\n LFNoise2.kr(1, 0.5),\n LFNoise2.kr(1, 0.05, 1.05),\n LFNoise2.kr(1, 0.3...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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 RunningSum.ar(LFSaw.ar, x) * (x.r...
[ { "role": "user", "content": "What does `LocalBuf.newFrom` do? What arguments does it take?" }, { "role": "assistant", "content": "Allocates a new buffer from a given list of Arguments: list — The list may be two-dimensional for numChannels > 1. It is then reshaped into the buffer's current form...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Dseries`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a, freq, trig;\n a = Dseries(0, 1, 15);\n trig = Impulse.kr(MouseX.kr(1, 40, 1));\n freq = Demand.kr(trig, 0, a) * 30 + 340;\n SinOsc....
[ { "role": "user", "content": "What is `InsideOut` in SuperCollider?" }, { "role": "assistant", "content": "InsideOut — Distortion by subtracting magnitude from 1 If the signal is positive, outputs (1 - input). Category: UGens > Filters." } ]
[ { "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 Lag3.kr( // lag the modulator\n LFPulse.kr(4, 0, 0.5, 50, 400), // frequency modulator\n Line.kr(0, ...
[ { "role": "user", "content": "What is `Pfin` in SuperCollider?" }, { "role": "assistant", "content": "Pfin — limit number of events embedded in a stream Limits the number of output values from the given pattern or stream. If the stream is able to output more values, Pfin will terminate it early....
[ { "role": "user", "content": "Write a SuperCollider patch that uses `Routine` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n// SynthDefs on the fly\ns.boot;\n(\nt = TempoClock.new;\nr = Routine.new({\n 10.do({\n // could be don...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `CuspN`." }, { "role": "assistant", "content": "```supercollider\n// vary frequency\n{ CuspN.ar(MouseX.kr(20, SampleRate.ir), 1.0, 1.99) * 0.3 }.play(s);\n\n// mouse-controlled params\n{ CuspN.ar(SampleRate.ir/4, Mouse...
[ { "role": "user", "content": "Explain `EaseOutInBack` in SuperCollider briefly." }, { "role": "assistant", "content": "EaseOutInBack — Back ease-out/in Easing equation for a back (overshooting cubic easing: (a+1)*t^3 - a*t^2) ease-out/in, decelerating until halfway, then accelerating. The a para...
[ { "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": "Explain `PSVop_oi` in SuperCollider briefly." }, { "role": "assistant", "content": "PSVop_oi — Sieve pattern for arbitrary set operations of integer generators with offsets and interval output Pattern for arbitrary set operations of integer generators with offsets a...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// vary frequency\n{ StandardL.ar(MouseX.kr(20, SampleRate.ir)) * 0.3 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthe...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Archive`." }, { "role": "assistant", "content": "```supercollider\n// make a storage place for various objects:\nq = (); // Event\n\nq[\\a_long_array] = Array.rand(128, 0.0, 1.0);\nq[\\pi_squared] = pi * pi;\nq[\\favo...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `Convolution2L`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n// next example\n\nb = Buffer.read(s, ExampleFiles.child);\n\n(\n{\n var input = SoundIn.ar(0);\n var frame...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `IFFT` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n// without any modification, convert FFT chain (frequency domain signal) back to audio (time domain signal)\n(\n{ var in, chain;\n...
[ { "role": "user", "content": "What does `PulseCount.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "Pulse counter. Arguments: trig — Trigger. Trigger can be any signal. A trigger happens when the signal changes from non-positive to positive.; reset — Resets the counte...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `NodeProxy` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\na = NodeProxy.new.play; // play to hardware output.\na.fadeTime = 2; // fadeTime specifies cro...
[ { "role": "user", "content": "What is `BufCombC` in SuperCollider?" }, { "role": "assistant", "content": "BufCombC — Buffer based comb delay line with cubic interpolation. Comb delay line with cubic interpolation which uses a buffer for its internal memory. See also BufCombN which uses no interp...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Dswitch1`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a, freq, trig;\n a = Dswitch1([1, 3, MouseY.kr(1, 15), 2, Dwhite(0, 3, 2)], MouseX.kr(0, 4));\n trig = Impulse.kr(3);\n freq = Demand....
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `Normalizer`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n(\n// example signal to process\n{\n var z;\n z = Decay2.ar(\n Impulse.ar(8, LFSaw.kr(0.25, -0.6, 0.7)),\n ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n//code that utilizes the glitch.\n//warning! extremely loud.\n//note: might not sound the same on all soundcards\n(\n{GlitchHPF.ar(\n BrownNoise.ar(1.dup),\n 0.5,\n Saw.kr(1,...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `Dxrand`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a, freq, trig;\n a = Dxrand([1, 3, 2, 7, 8], inf);\n trig = Impulse.kr(MouseX.kr(1, 400, 1));\n freq ...
[ { "role": "user", "content": "What does `Event.removeEventType` do? What arguments does it take?" }, { "role": "assistant", "content": "Remove an event type function from the collection. If there is an associated event type parent, this will be removed Arguments: type — A name (usually a symbol)...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// It might also be desirable to start with a fade from silence.\n// This can be done with a negative initOutOffset:\n\n(\nx = {\n var lfo = XLine.ar(1, 0.5, 60);\n DXMix.ar(\n Dseq([0, 4, 1, 5, 2, 6, 3, 7], inf),\n ...
[ { "role": "user", "content": "What model are you?" }, { "role": "assistant", "content": "I am sc-mind, a 198M-parameter MiniMind-3-MoE with 64M active per token: 768 wide, 8 layers, four experts with top-1 routing, a 6,400-token vocabulary, trained from scratch on SuperCollider." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// Add two UGens\n{ SinOsc.ar(440, 0, 0.2) + PinkNoise.ar(0.1; }.play\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `RunningSum` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n// RMS Power\n(\n{\n var input, numsamp;\n\n input = LFSaw.ar;\n numsamp = 30;\n\n (RunningS...
[ { "role": "user", "content": "What is `UGen`?" }, { "role": "assistant", "content": "UGen — Abstract superclass of all unit generators" }, { "role": "user", "content": "What does `UGen.multiNew` do?" }, { "role": "assistant", "content": "These methods are responsible for ...
[ { "role": "user", "content": "What does `ServerLogReceivedEvent.new` do? What arguments does it take?" }, { "role": "assistant", "content": "internal usage Arguments: time; msg; isBundle. Returns: (returnvalue)" } ]
[ { "role": "user", "content": "What does `ArraySpec.storeArgs` do?" }, { "role": "assistant", "content": "datatype specifying an array with an itemSpec which describes its items" } ]
[ { "role": "user", "content": "What is `Sieve1` in SuperCollider?" }, { "role": "assistant", "content": "Sieve1 — Fuzzy sieve based synthesis Implementation of Xenakis's idea of sieve based synthesis, generalized to use fuzzy (probabilistic) sieves. Sieves are stored in buffers and can be dynamic...
[ { "role": "user", "content": "What does `RedMixer.gui` do? What arguments does it take?" }, { "role": "assistant", "content": "Create a Arguments: position — A Point.." } ]
[ { "role": "user", "content": "Explain `CCResponder` in SuperCollider briefly." }, { "role": "assistant", "content": "CCResponder — allow functions to be registered to respond to MIDI control change events Category: External Control > MIDI." } ]
[ { "role": "user", "content": "What does `SGUIelement.update` do?" }, { "role": "assistant", "content": "call at regular intervals (typically a slow fps AppClock routine). if the value has changed the view will" } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Harmonics`." }, { "role": "assistant", "content": "```supercollider\na.ramp(1.0, 1.0); // returns a harmonic series\n\nb = Buffer.alloc(s, 512, 1);\n// harmonic series for freqs, ramp down for amps\nb.sine2(a.ramp(1....
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\ns.boot; // start the server\n\n// something to record\n(\nSynthDef(\"bubbles\", { |out|\n var f, sound;\n f = LFSaw.kr(0.4, 0, 24, LFSaw.kr([8, 7.23], 0, 3, 80)).midicps; // glissando function\n sound = CombN.ar(SinOsc.ar(f...
[ { "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": "Write a complete SuperCollider patch built around `IFFT` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n// without any modification, convert FFT chain (frequency domain signal) back to audio (time domain signal)\n(\n{ var in, chain;\n...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n//code that utilizes the glitch.\n//warning! extremely loud.\n//note: might not sound the same on all soundcards\n(\n{GlitchHPF.ar(\n BrownNoise.ar(1.dup),\n 0.5,\n Saw.kr(1,...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LPF`." }, { "role": "assistant", "content": "```supercollider\n{ LPF.ar(Saw.ar(200, 0.1), SinOsc.kr(XLine.kr(0.7, 300, 20), 0, 3600, 4000)) }.play;\n\n// kr:\n(\n{ var ctl = LPF.kr(LFPulse.kr(8), SinOsc.kr(XLine.kr(1,...
[ { "role": "user", "content": "Write a warm pad in SuperCollider." }, { "role": "assistant", "content": "Detuned saws through a slow filter envelope and a long release: the detune is what makes it wide.\n\n```supercollider\n(\nSynthDef(\\pad, { |out = 0, freq = 220, amp = 0.15, gate = 1|\n var...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\na = {\n var dur;\n\n dur = 0.1;\n\n LFTri.ar(100+(1000*Maths.ar(dur/2, dur/2, 0.99, 1, 0, 1, LFNoise0.ar(1/dur).range(0,1))[0]), 0, 0.1)\n}.play\n```" }, { "role": ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `XFade2`." }, { "role": "assistant", "content": "```supercollider\n{ XFade2.ar(Saw.ar, SinOsc.ar, LFTri.kr(0.1)) }.play\n```" } ]
[ { "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// Add two NodeProxies\nNdef(\\x, { SinOsc.ar(440, 0, 0.2) });\nNdef(\\y, { PinkNoise.ar(0.1) });\nNdef(\\z, Ndef(\\x) + Ndef(\\y).play;\n```" }, { "role": "assistant", ...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `Pmulpre` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n// sound example\n(\nSynthDef(\\sinegrain,\n { |out = 0, freq = 440, sustain = 0.02|\n var env;\n env = EnvGen.kr(Env.perc...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// won't work (the output is 0.5*0.0), which is why we need the DC UGen!\n{ 0.5 }.play\n\n// constantly zero\n{ DC.ar(0.0) }.play;\n\n\n// DC offset; will click on start and fini...
[ { "role": "user", "content": "In what order should I learn SuperCollider?" }, { "role": "assistant", "content": "The order that pays off fastest:\n\n1. **One UGen and Out** — `{ SinOsc.ar(440) * 0.2 }.play`. Learn that a graph must reach Out.\n2. **Envelopes and doneAction** — the difference bet...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// example: two SuperCollider apps communicating\n\n// application 1:\nn = NetAddr(\"127.0.0.1\", 57120); // the url should be the one of computer of app 2 (or nil)\n\no = OSCresponderNode(n, '/chat', { |t, r, msg| (\"tim...
[ { "role": "user", "content": "What does `U.disposeArgsFor` do? What arguments does it take?" }, { "role": "assistant", "content": "(describe method Arguments: server — (describe argument here). Returns: (returnvalue)" } ]
[ { "role": "user", "content": "Write a SuperCollider patch that uses `Pgtpar` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n// synthdef\n(\nSynthDef(\\help_sinegrain,\n { |out = 0, freq = 440, sustain = 0.05|\n var env;\n ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `PulseCount`." }, { "role": "assistant", "content": "```supercollider\nSynthDef(\"help-PulseCount\", { |out = 0|\n Out.ar(out,\n SinOsc.ar(\n PulseCount.ar(Impulse.ar(10), Impulse.ar(0.4)) * 200,\n 0, 0.0...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// compares a 441 Hz sine tone derived from sample rate (44100 * 0.01, left)\n// with a 440 Hz tone (right), resulting in a 1 Hz beating\n(\n{\n var freq;\n freq = [SampleRate....
[ { "role": "user", "content": "Write a kick at amp 0.6 with no click. (osc saw, sweep 0.06, decay 0.35, f0 150, f1 48, amp 0.6, rev 0)" }, { "role": "assistant", "content": "Start with a swept sine, then shorten the decay to taste:\n\n```supercollider\n// kick drum: saw oscillator, 0.06 s pitch s...
[ { "role": "user", "content": "Give me a Pbind with sine voices and a 0.25 rhythm." }, { "role": "assistant", "content": "Put the scale and the degree pattern in the `Pbind` and it will pick notes for you:\n\n```supercollider\n(\nSynthDef(\\sine_pad, { |out = 0, freq = 440, amp = 0.2|\n var en...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `MantissaMask`." }, { "role": "assistant", "content": "```supercollider\n// preserve only 3 bits of mantissa.\n{ MantissaMask.ar(SinOsc.ar(SinOsc.kr(0.2, 0, 400, 500), 0, 0.4), 3) }.play\n\n// the original\n{ SinOsc.ar...
[ { "role": "user", "content": "What does `MxQuery.where` do? What arguments does it take?" }, { "role": "assistant", "content": "Filters the results by testing each source object if objects.selector == equalsValue. eg. qs.inlets.where(\\name,\\freq) would return all inlets with the name Arguments...
[ { "role": "user", "content": "Show another SuperCollider example using `Latch`." }, { "role": "assistant", "content": "```supercollider\n{ Blip.ar(LFNoise0.kr(9, 400, 500), 4, 0.2) }.play;\n```" } ]
[ { "role": "user", "content": "Write a GrainBuf synth at 10 grains per second. (rate 10, dur 0.2, interp 2, mode noise1, rev 1)" }, { "role": "assistant", "content": "A working granular patch, with the buffer loaded before the synth starts:\n\n```supercollider\n// granular synth with GrainBuf\n(\...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `LinSelectX`. Define every value it uses." }, { "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 LinSelectX.ar(Mous...
[ { "role": "user", "content": "What does `Pdef.fadeTime` do?" }, { "role": "assistant", "content": "When the synthdefs that are used contain an `\\amp` control, the patterns are replaced by crossfading the previous with the new over this time (in" } ]
[ { "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 an Ndef with a saw source and a 400 Hz low-pass. (ugens saw, cutoff 400, 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 thro...
[ { "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;\n sf = K2A.ar(MouseX.kr > 0.5) > 0;\n f = Ball.ar(sf, MouseY.kr(0.01, 20, 1), 0.01);\n f = f * 10 + 500;\n SinOsc.ar(f, 0, 0.2)\n}.play;\n```" }, { ...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `Duty`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n(\n {\n var freq;\n freq = Duty.kr(\n Drand([0.01, 0.2, 0.4], inf), // demand ugen as durations\n ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// example:\n(\nvar f, g, product;\nf = { SinOsc.ar(400) };\ng = { LFPulse.kr(8) };\nproduct = f * g * 0.1;\n{ Pan2.ar(product, SinOsc.kr(0.3)) }.play;\n```" }, { "role":...
[ { "role": "user", "content": "Explain `PparGroup` in SuperCollider briefly." }, { "role": "assistant", "content": "PparGroup — Starts a new ParGroup and plays the pattern in this group The class has a semantics similar to Pgroup, but instead of a Group, it creates a ParGroup on the server. Categ...
[ { "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": "What is `FoaAlpha` in SuperCollider?" }, { "role": "assistant", "content": "FoaAlpha — First Order Ambisonic (FOA) Soundfield Active-Reactive Intensity Balance Return the Active-Reactive Intensity Balance of a first order ambisonic (B-format) signal, in radians. Cat...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// randomly modulate all params\n(\n{ LatoocarfianL.ar(\n SampleRate.ir/4,\n LFNoise2.kr(2, 1.5, 1.5),\n LFNoise2.kr(2, 1.5, 1.5),\n LFNoise2.kr(2, 0.5, 1.5),\n LFNoise2.kr(...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `InFeedback`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-InFeedback\", { |out = 0, in = 0|\n var input, sound;\n input = InFeedback.ar(in, 1);\n ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\np = Patch({ arg audio=0,ffreq=300;\n RHPF.ar(audio,ffreq,0.1)\n});\nq = Patch({\n Saw.ar(mul: 0.3)\n});\n\np.play;\nq.play;\n\n// adds a connection\n// but q is still out of ma...
[ { "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": "What does this SuperCollider patch do?\n```supercollider\n(\nc=13;a=Array.fib(64,0,1);b=Array.fill(size:c,function:{arg i;a[i]%12});\np=1/(21-c);Pdef(\\x,Pbind(\\dur,p,\\degree,Pseq(b,1,0)));\nr=Array.fill(c,{arg i;Pbindf(Pdef(\\x),\\mtranspose,1-b[i]);});\nPseq(r,(1/p)).play;\...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-GaussTrig\", { arg out=0;\n Out.ar(out,\n Ringz.ar(\n WhiteNoise.ar(\n Decay.kr(\n GaussTrig.kr(10.dup, MouseX.kr(0, 0.9), 0.5),\n ...
[ { "role": "user", "content": "How do I get a Euclidean-style rhythm in SuperCollider?" }, { "role": "assistant", "content": "Describe the pattern as a list of hits and rests; `Rest` gives the gap without starting a Synth.\n\n```supercollider\n(\nPbind(\n \\instrument, \\hat,\n \\dur, 0.125...
[ { "role": "user", "content": "When should I use a Pattern instead of writing Synth code by hand?" }, { "role": "assistant", "content": "Use a Pattern when what you want to express is a sequence over time — notes, durations, amplitudes, parameters — rather than a signal. A Pbind describes events,...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\n{\nvar trigger, fund, flashInst;\nflashInst = Array.fill(7,\n{\ntrigger = Dust.kr(2)*PinkNoise.ar(1);\nfund = rrand(100, 137);\nPan2.ar(\nMix.ar(\nArray.fill(7,\n{arg counter;\nvar partial;\npartial = counter + 3;\n//...
[ { "role": "user", "content": "What does `BusPool.initClass` do?" }, { "role": "assistant", "content": "bus allocator with retain/release counting for shared busses" } ]