conversations
listlengths
2
6
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// use input amplitude to control Pulse amplitude - use headphones to prevent feedback.\n{ Pulse.ar(90, 0.3, Amplitude.kr(SoundIn.ar(0)) }.play;\n```" }, { "role": "assis...
[ { "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": "Write a SuperCollider patch for outer beat. Start by defining the values the patch depends on." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var saw, bpf;\n saw = Saw.ar(\n freq: [1700,2000],\n mul: LFPulse.kr(\n freq: [2,7],\n wi...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ SinOsc.ar(500 + LFPulse.ar(4).bipolar(40), 0, 0.5 * 0.1 }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened ear...
[ { "role": "user", "content": "What is `AbstractSController` in SuperCollider?" }, { "role": "assistant", "content": "AbstractSController — an abstract class for all sInstrument controllers Multi-channel control rate bus+synth for amplitudes, frequencies, panning positions etc. Category: SInstrum...
[ { "role": "user", "content": "What does `MxApp.save` do?" }, { "role": "assistant", "content": "Save the Mx as a document (initiating a file dialog if there is no path yet) which should reproduce the current state of the Mx and all of its objects. Not all objects may support saving and loading, ...
[ { "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": "What does `MxUnit.parentEnvir` do? What arguments does it take?" }, { "role": "assistant", "content": "Container for a musical object (Instr, NDef, Spline etc); this is a single unit that has inlets and outlets which can be connected to other units Arguments: env." ...
[ { "role": "user", "content": "Write an Ndef with a saw source and a 3200 Hz low-pass. (ugens saw, cutoff 3200, lfo 0.3, freq 165, 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 32...
[ { "role": "user", "content": "Write a Pbind in minorPentatonic using Pseq for the degrees. (scale minorPentatonic, seq Pseq, dur 0.4, octave 5, instr sine, root 0)" }, { "role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```superco...
[ { "role": "user", "content": "Write an Ndef at 82.5 Hz I can retune while it plays. (ugens tri, cutoff 200, 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: tri source through a ...
[ { "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": "Show another SuperCollider example using `List`." }, { "role": "assistant", "content": "```supercollider\n(\n// Create a new empty List with size: 3\nx = List.new(3);\n\nx.postln; // -> List[ ]\n\n// Add numbers 0 to 4 to the List\n5.do({ |i| x.add(i) });\n\n// The ...
[ { "role": "user", "content": "Explain `LFNoise1` in SuperCollider briefly." }, { "role": "assistant", "content": "LFNoise1 — Ramp noise Generates linearly interpolated random values at a rate given by the nearest integer division of the sample rate by the `freq` argument. Category: UGens > Gener...
[ { "role": "user", "content": "What is `Date` in SuperCollider?" }, { "role": "assistant", "content": "Date — an object describing a point in time Category: Control." } ]
[ { "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": "Write a minimal SuperCollider example that uses `DetectSilence`." }, { "role": "assistant", "content": "```supercollider\n// this frees after the Decay has become quiet enough for a long enough time\n{ var signal = Decay.ar(Impulse.ar(0), 2, PinkNoise.ar(0.2)); Dete...
[ { "role": "user", "content": "Explain `Sanitize` in SuperCollider briefly." }, { "role": "assistant", "content": "Sanitize — Remove infinity, NaN, and denormals Replaces infinities, NaNs, and subnormal numbers (denormals) with a given signal, zero by default. The method UGen#-sanitize provides a...
[ { "role": "user", "content": "What does `FunctionList.array` do?" }, { "role": "assistant", "content": "Set/get the FunctionList's array. New functions can be added to the array directly, e.g. `x = FunctionList(...some" } ]
[ { "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": "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 an Ndef with a saw source and a 3200 Hz low-pass." }, { "role": "assistant", "content": "Use `Ndef` when the patch has to change without stopping:\n\n```supercollider\n// Ndef drone: saw source through a 3200 Hz low-pass\n(\nNdef(\\nd_saw_165_3200, { |freq = 1...
[ { "role": "user", "content": "Write an Ndef with a blip source and a 1400 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 1400 Hz low-pass\n(\nNdef(\\nd_blip_82_1400...
[ { "role": "user", "content": "Explain `Pfset` in SuperCollider briefly." }, { "role": "assistant", "content": "Pfset — Insert an environment into the event prototype before evaluating the supplied pattern Good for setting default values or loading server objects. Category: Streams-Patterns-Event...
[ { "role": "user", "content": "What does `ServerLog.filterByBus` do? What arguments does it take?" }, { "role": "assistant", "content": "records OSC traffic to and from a Server and displays this in a browseable searchable interface Arguments: index; rate. Returns: (returnvalue)" } ]
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `Fdef`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n// sound example\n(\ns.boot;\nSynthDef(\"gpdef\",\n { |out = 0, freq = 440, sustain = 0.05, amp = 0.1|\n var env;\...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(//*********PREPARE**********\np.pop;\n//Any code that needs to access your own environment goes here\np = ProxySpace.push(s);\n~fxLoop.play.fadeTime_(5);\n);\n\n(//*********FXLoop**********\n~fxLoop = {\n var in = Soun...
[ { "role": "user", "content": "What does `ScrollView.hasBorder` do?" }, { "role": "assistant", "content": "Sets or gets whether the view draws its border. Defaults to" } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `NodeProxy`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\na = NodeProxy.new.play; // play to hardware output.\na.fadeTime = 2; // fadeTime specifies crossfade\n// set the source\na.source = { Sin...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// stepper cycles between 0 and 1, average hovers around 0.5\na = { AverageOutput.kr(Stepper.kr(Impulse.kr(1), min: 0, max: 1).poll }.play;\n\na.free;\n```" }, { "role": ...
[ { "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": "What is `CondVar`?" }, { "role": "assistant", "content": "CondVar — Condition variable: block one or more threads until some condition is true" }, { "role": "user", "content": "What does `CondVar.wait` do?" }, { "role": "assistant", "content"...
[ { "role": "user", "content": "What is `Every` in SuperCollider?" }, { "role": "assistant", "content": "Every — holds a list of Contraints, validates that the test object satisifes all of those Given a list of contraints (or simple functions), the .value method will validate that the test object ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// default initial params\n{ LinCongL.ar(MouseX.kr(20, SampleRate.ir)) * 0.2 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the p...
[ { "role": "user", "content": "Explain `SFP` in SuperCollider briefly." }, { "role": "assistant", "content": "SFP — Sound File Player SFP plays long sound files from disk. It is not a sample player, it is to be used for playing recordings and long sound files. Category: Libraries > crucial > Play...
[ { "role": "user", "content": "What is `ControlPatchIn` in SuperCollider?" }, { "role": "assistant", "content": "ControlPatchIn — manages a Player's input when connecting to other Players Category: Libraries > crucial > internals." } ]
[ { "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": "What does `RedMst.goto` do?" }, { "role": "assistant", "content": "Play activated and stop non-activated tracks on the next quant" } ]
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\n{\n var saw, bpf;\n saw = Pulse.ar(\n freq: [100,150],\n mul: LFPulse.kr(\n freq: [0, 0.03, 0.04],\n width: 0.15));\n bpf = LPF.ar(in: saw, freq: SinOsc.kr(-10, -5, 3).range(200, 400));\n Out.ar(0,...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `BiPanB2`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var w, x, y, p, q, a, b, c, d;\n\n p = LFSaw.ar(200);\n q = LFSaw.ar(301);\n\n // B-format encode\n #w,...
[ { "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": "What does this SuperCollider code do?\n```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// ... whereas Pan2 is more smooth\n{ Pan2.ar(SinOsc.ar(440), Line.kr(-1...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `MultiTap` that runs as it is." }, { "role": "assistant", "content": "```supercollider\ns.boot;\nb = Buffer.alloc(s, s.sampleRate);\n(\n{\n MultiTap.ar(`[0.1, 0.2, 0.3, 0.4], `[0.1, 0.2, 0.4, 0.8],\n Decay.ar(Dus...
[ { "role": "user", "content": "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 `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": "Explain `PSVsect` in SuperCollider briefly." }, { "role": "assistant", "content": "PSVsect — Sieve pattern for intersection of integer generators with point output Pattern for intersection of integer generators with point output. Corresponds to Sieve's methods Sieve...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{ Latoocarfian2DC.ar(\n SampleRate.ir/8,\n SampleRate.ir/2,\n LFNoise2.kr(2.dup, 1.5, 1.5),\n d:LFNoise2.kr(2.dup, 0.5, 1.5),\n mul:0.2\n) }.play(s);\n```" }, { "...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Dseq`." }, { "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.kr(trig, 0, a) * 30 + 340;\n Sin...
[ { "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": "What does `PlayerAmp.amp` do? What arguments does it take?" }, { "role": "assistant", "content": "adds a simple amplitude control to a Player Arguments: v." } ]
[ { "role": "user", "content": "Write a GrainBuf synth at 16 grains per second. (rate 16, dur 0.15, interp 4, 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(\...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `ControlName`." }, { "role": "assistant", "content": "```supercollider\n(\nd = SynthDef(\\tone, { |out = 0, freq = 200|\n var sig;\n\n freq.spec = ControlSpec(20, 20000);\n sig = SinOsc.ar(freq);\n\n Out.ar(out, si...
[ { "role": "user", "content": "Explain this code:\n```supercollider\n{ var sig = SinOsc.ar(440) * 0.2; Out.ar(0, sig) }.play;\n```" }, { "role": "assistant", "content": "The minimal SynthDef idiom: a source multiplied by an amplitude, written to the master bus.\n\n`var sig = SinOsc.ar(440) * 0.2`...
[ { "role": "user", "content": "What does `EZGui.alwaysOnTop` do? What arguments does it take?" }, { "role": "assistant", "content": "Makes the popup window always on top, if there is Arguments: bool — An Instance of Boolean. Default is false.." } ]
[ { "role": "user", "content": "Explain `Stepper` in SuperCollider briefly." }, { "role": "assistant", "content": "Stepper — Pulse counter. Each trigger increments a counter which is output as a signal. The counter wraps between `min` and `max` . Category: UGens > Triggers." } ]
[ { "role": "user", "content": "What is Env.perc and what does it take?" }, { "role": "assistant", "content": "`Env.perc(attackTime, releaseTime, level, curve)` — an attack to `level` (default 1) then a decay to zero, with curve defaulting to -4 (an exponential-ish decay). `Env.perc(0.01, 1)` is t...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `CoinGate`." }, { "role": "assistant", "content": "```supercollider\n(\na = SynthDef(\"help-TCoin\", { |out = 0, prob = 0.5|\n var trig;\n trig = CoinGate.kr(prob, Impulse.kr(10));\n Out.ar(out,\n SinOsc.ar(\n ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `BrownNoise`." }, { "role": "assistant", "content": "```supercollider\n{ BrownNoise.ar(0.1) }.play;\n{ WhiteNoise.ar(0.1) }.play;\n```" } ]
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\n// prep\ns = Server.local;\n\nn = SynthDef(\"Updater-help\", {|out, freq|\n var sin;\n sin = SinOsc.ar(freq, 0.5)*EnvGen.kr(Env.triangle(4,1), doneAction:2);\n Out.ar(out, sin);\n }).send(s);\n);\n\n(...
[ { "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// Poisson distribution gives positive integer values\n\n(\np = Pbind(\n \\midinote, (P...
[ { "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": "Give me a granular patch with noise grain position and interp 2. (rate 6, dur 0.04, interp 2, mode noise, 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 kick at amp 0.6 with no click. (osc fm, sweep 0.06, decay 0.5, f0 150, f1 55, 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: fm oscillator, 0.06 s pitch swee...
[ { "role": "user", "content": "What is `Prorate` in SuperCollider?" }, { "role": "assistant", "content": "Prorate — divide stream proportionally Category: Streams-Patterns-Events > Patterns > Math." } ]
[ { "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 = LFNoise0.ar(MouseX.kr(1, 100, 1));\n g = MouseY.kr(0.1, 10, 1);\n f = Ball.ar(sf, g, 0.01, 0.01);\n f = f * 140 + 500;\n SinOsc.ar(f, 0, 0.2)\n}...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\nb = Buffer.read(s, Platform.resourceDir +/+ \"sounds/a11wlk01.wav\");\n\n// This is very cool!\n\n(\n{\n Spring.ar(PlayBuf.ar(1, b, loop: 1)*Saw.ar(4));\n}.play;\n)\n```" }, { "role": "assistant", "content":...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `QuadL` that runs as it is." }, { "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 QuadL.ar(SampleRate...
[ { "role": "user", "content": "What does `Sieve.toIntervals` do?" }, { "role": "assistant", "content": "Convert the Sieve to mode 'intervals' and set offset to first" } ]
[ { "role": "user", "content": "Explain `OteyPiano` in SuperCollider briefly." }, { "role": "assistant", "content": "OteyPiano — Piano physical model. Should not use this class but OteyPianoString instead (see example) for having only one soundboard for all strings which is more efficient. Categor...
[ { "role": "user", "content": "What is `Fb1_Duffing` in SuperCollider?" }, { "role": "assistant", "content": "Fb1_Duffing — Duffing pseudo ugen Fb1_ODE wrapper for the Duffing ODE system with external f: Category: Libraries > miSCellaneous > Nonlinear." } ]
[ { "role": "user", "content": "Give me an Ndef with an LFO at 0.1 Hz. (ugens sine, cutoff 800, lfo 0.1, freq 82.5, 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 800 Hz...
[ { "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": "Explain `LFCub` in SuperCollider briefly." }, { "role": "assistant", "content": "LFCub — A sine like shape made of two cubic pieces A sine like shape made of two cubic pieces. Smoother than Category: UGens > Generators > Deterministic." } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `WrapIndex`." }, { "role": "assistant", "content": "```supercollider\n// indexing into a table\n(\n{\n var buf = LocalBuf.newFrom([200, 300, 400, 500, 600, 800]);\n var freq = WrapIndex.kr(buf, MouseX.kr(0, BufFrames...
[ { "role": "user", "content": "Explain `ShutDown` in SuperCollider briefly." }, { "role": "assistant", "content": "ShutDown — register functions to be evaluated before system shuts down ShutDown registers functions to perform an action before system shut down. Category: Control." } ]
[ { "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": "Write a minimal SuperCollider example that uses `StandardL`." }, { "role": "assistant", "content": "```supercollider\n// vary frequency\n{ StandardL.ar(MouseX.kr(20, SampleRate.ir)) * 0.3 }.play(s);\n```" } ]
[ { "role": "user", "content": "Explain this code:\n```supercollider\nPbind(\\degree, Pseq([0, 2, 4, 7], inf), \\dur, 0.25).play;\n```" }, { "role": "assistant", "content": "It plays a four-note major arpeggio in a loop, one note every 250 ms.\n\n`Pbind` builds an event stream: each event is the c...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// default initial params\n{ FBSineN.ar(SampleRate.ir/4) * 0.2 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis ope...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.quit;\nf = { Group.new(s.defaultGroup); \"Other code can be evaluated too\".postln };\nServerTree.add(f);\ns.boot;\ns.queryAllNodes; // note the group within the default group\...
[ { "role": "user", "content": "How do I structure a live-coding performance in one file?" }, { "role": "assistant", "content": "One Tdef per musical layer, each with its own loop, so you can start and stop layers while the set\nruns.\n\n```supercollider\n(\nTdef(\\kick, {\n loop {\n Syn...
[ { "role": "user", "content": "How do I play a random majorPentatonic scale at octave 6? (scale majorPentatonic, 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```super...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\n Ndef(\\x, {\n var output;\n var delayTime;\n var delayMax = 0.2;\n var delayAdd = 0.1;\n var pulseFreq = 0.5;\n var proxyMul = 2;\n var pulseMin = 40;\n var pulseMax = 130;\n var numOfEch...
[ { "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{GlitchRHPF.ar(\n BrownNoise.ar(1.dup),\n 0.5,\n Saw.kr(1...
[ { "role": "user", "content": "What does `MxUnit.source` do?" }, { "role": "assistant", "content": "Container for a musical object (Instr, NDef, Spline etc); this is a single unit that has inlets and outlets which can be connected to other units" } ]
[ { "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 = Dxrand([1, 3, 2, 7, 8], inf);\n trig = Impulse.kr(MouseX.kr(1, 400, 1));\n freq = Demand.kr(trig, 0, a) * 30 + 340;\n SinOsc.ar(freq) * 0.1\n...
[ { "role": "user", "content": "What does `Slider2D.step` do? What arguments does it take?" }, { "role": "assistant", "content": "The amount by which #-x or #-y will change when incremented or decremented, either by calling relevant methods, or when related keys are Arguments: A Float.." } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Crackle`." }, { "role": "assistant", "content": "```supercollider\n{ Crackle.ar(1.95, 0.5) }.play;\n\n// modulate chaos parameter\n{ Crackle.ar(Line.kr(1.0, 2.0, 3), 0.5, 0.5) }.play;\n```" } ]
[ { "role": "user", "content": "Explain `Convolution3` in SuperCollider briefly." }, { "role": "assistant", "content": "Convolution3 — Time based convolver. Strict convolution with fixed kernel which can be updated using a trigger signal. The convolution is performed in the time domain. Category: ...
[ { "role": "user", "content": "How do I add a reverb send to a whole group?" }, { "role": "assistant", "content": "Same shape as the delay: a private stereo bus, one effect reading it, instruments writing both dry\nand wet.\n\n```supercollider\n(\n~verbBus = Bus.audio(s, 2);\nSynthDef(\\verb, { |...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `DelayN`." }, { "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": "What does `UpdatingScalarPatchOut.update` do?" }, { "role": "assistant", "content": "utility for connecting NumberEditor > Synth" } ]
[ { "role": "user", "content": "Give me a granular patch with noise1 grain position and interp 4. (rate 10, dur 0.1, interp 4, mode noise1, rev 1)" }, { "role": "assistant", "content": "`GrainBuf` needs a buffer, a trigger and a grain duration:\n\n```supercollider\n// granular synth with GrainBuf\...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LFDClipNoise`." }, { "role": "assistant", "content": "```supercollider\n// try wiggling the mouse quickly;\n// LFNoise frequently seems stuck, LFDNoise changes smoothly.\n\n{ LFClipNoise.ar(MouseX.kr(0.1, 1000, 1), 0....
[ { "role": "user", "content": "What is `FreqShift` in SuperCollider?" }, { "role": "assistant", "content": "FreqShift — Frequency Shifter. FreqShift implements single sideband amplitude modulation, also known as frequency shifting, but not to be confused with pitch shifting. Frequency shifting mo...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// mouse-controlled param\n{ StandardN.ar(SampleRate.ir/2, MouseX.kr(0.9, 4)) * 0.3 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracket is missing...
[ { "role": "user", "content": "Give me a saw kick with a 0.06 s pitch sweep. (osc saw, sweep 0.06, decay 0.25, f0 220, f1 40, amp 0.8, rev 1)" }, { "role": "assistant", "content": "The pitch envelope is what makes it read as a drum, not the oscillator:\n\n```supercollider\n// kick drum: saw oscil...
[ { "role": "user", "content": "How do I play a random minorPentatonic scale at octave 6? (scale minorPentatonic, seq Pshuf, dur 0.4, octave 6, instr fm, root 0)" }, { "role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```supercollid...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `Harmonics`: bind everything it needs first." }, { "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, ra...
[ { "role": "user", "content": "What does `ScalarSpec.canKr` do?" }, { "role": "assistant", "content": "datatype specifiying a \\scalar \"rate\" input or output" } ]