conversations
listlengths
2
6
[ { "role": "user", "content": "Add freeverb to a pluck patch at room 0.85." }, { "role": "assistant", "content": "Put the reverb inside the `SynthDef` so it is part of the voice:\n\n```supercollider\n// reverb: freeverb on a pluck\n(\nSynthDef(\\reverb_synth, { |out = 0, freq = 330, amp = 0.2|\n ...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `Paddpre` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n// sound example\n(\nSynthDef(\\sinegrain,\n { |out = 0, freq = 440, sustain = 0.02|\n var env;\n en...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `Diwhite`. Define every value it uses." }, { "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...
[ { "role": "user", "content": "Write a kick at amp 0.8 with no click. (osc fm, sweep 0.06, decay 0.35, f0 220, f1 48, 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: fm oscillator, 0....
[ { "role": "user", "content": "Write a Pbind in minorPentatonic using Pwalk for the degrees. (scale minorPentatonic, seq Pwalk, dur 0.2, octave 4, instr sine, root 0)" }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nS...
[ { "role": "user", "content": "What does `GridLayout.hSpacing` do?" }, { "role": "assistant", "content": "The spacing between columns, in Integer amount of" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-LFNoise2\", { arg out=0;\n Out.ar(out,\n LFBrownNoise2.ar(1000, 1, MouseX.kr(0, 5), 0.25)\n )\n}).play;\n);\n\n//use as frequency control\n(\nSynthDef(\"h...
[ { "role": "user", "content": "Write a kick at amp 0.8 with a click. (osc fm, sweep 0.06, decay 0.18, f0 150, f1 40, amp 0.8, rev 1)" }, { "role": "assistant", "content": "A kick is a sine with a fast pitch drop and a short amplitude envelope:\n\n```supercollider\n// kick drum: fm oscillator, 0.0...
[ { "role": "user", "content": "Give me a complete SuperCollider patch for Wake up call: bind everything it needs before it is used." }, { "role": "assistant", "content": "```supercollider\nNdef(\\a, { |freq=2000, rate=1, width=0.6|\n LFPulse.kr(rate, 0, 4/6) *\n LFPulse.kr(rate * 6, 0, width) *...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `FSinOsc`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n{ // distorts and envelopes z\nvar z;\nz = FSinOsc.ar(500);\nz min: FSinOsc.ar(0.1);\n}.play;\n```" } ]
[ { "role": "user", "content": "Show another SuperCollider example using `LeastChange`." }, { "role": "assistant", "content": "```supercollider\n(\nd = { |freq = 440|\n var internalFreq;\n internalFreq = LFNoise0.ar(0.3, 300, 800);\n SinOsc.ar(\n LeastChange.kr(freq, internalFreq) // two sou...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Compander`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n Decay2.ar(\n Impulse.ar(8, 0, LFSaw.kr(0.3, 1, -0.3, 0.3)),\n 0.001,\n 0.3\n )\n * Mix.ar(Pulse.ar([80, 81], 0.3))\n}.play;\n)\n`...
[ { "role": "user", "content": "Write a kick drum with a 0.18 s decay. (osc sine, sweep 0.06, decay 0.18, f0 220, f1 40, 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: sine oscillator, 0.06 s pitch...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\n{\n var saw, bpf;\n saw = Saw.ar(\n freq: [1700,2000],\n mul: LFPulse.kr(\n freq: [2,7],\n width: 0.115));\n bpf = LPF.ar(in: saw, freq: SinOsc.kr(1/3).range(250, 4000)); \n}.play;\n)\n```" }, {...
[ { "role": "user", "content": "Show another SuperCollider example using `QuadC`." }, { "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 QuadC.ar(SampleRate.ir/4, r.neg, r, 0, 0.1) * 0...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `ArrayedCollection` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n(\nvar pitches = [43.0, 55.0, 58.86, 57.42, 67.0];\nfork {\n pitches.size.do{ |i|\n {\n var freq = pitches[i]...
[ { "role": "user", "content": "How do I make a kick that starts at 180 Hz and falls to 40 Hz? (osc fm, sweep 0.06, decay 0.35, f0 180, f1 40, 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 osci...
[ { "role": "user", "content": "What should I ask you?" }, { "role": "assistant", "content": "SuperCollider questions: how a UGen works, how to write a SynthDef or a Pattern, why a patch does not compile. I am sc-mind, a 198M domain model, not a general assistant." } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Rand`." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-Rand\", { |out = 0|\n Out.ar(out,\n FSinOsc.ar(\n Rand(200.0, 400.0),\n 0, Line.kr(0.2, 0, 1, doneAction: Done.freeSelf)...
[ { "role": "user", "content": "What is `Disintegrator` in SuperCollider?" }, { "role": "assistant", "content": "Disintegrator — port of some ladspa plugins Amplifies random half-cycles of it's input by multiplier. Set multiplier to 0 and vary probability for a weird fade effect, or set multiplier...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n{Mix({|i|var j=Impulse,t=TChoose.kr(j.kr(1/8),[1,6,3]/8),r=Ringz.ar(j.ar(i*t+0.25),600*t*i+[0,9]);CombC.ar(r,1,0.5,4,0.1,r)}!4).tanh/4}.play\n```" }, { "role": "assistant", "content": "Hi colliders, this is m...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `BiPanB2`." }, { "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, x, y = BiPanB2.ar(p, q, MouseX.kr(...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `DiskIn`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\n\n\n// create with cueSoundFile class method\nb = Buffer.cueSoundFile(s, ExampleFiles.apollo11, 0, 1);\nx...
[ { "role": "user", "content": "Explain `Int8Array` in SuperCollider briefly." }, { "role": "assistant", "content": "Int8Array — an array whose indexed slots are all of the same type These classes implement arrays whose indexed slots are all of the same type. Category: Collections > Ordered." } ...
[ { "role": "user", "content": "Show another SuperCollider example using `FBSineL`." }, { "role": "assistant", "content": "```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": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// increase phase multiplier\n{ FBSineL.ar(SampleRate.ir, 1, 0, XLine.kr(1, 2, 10), 0.1) * 0.2 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracket...
[ { "role": "user", "content": "What is `Pdefn`?" }, { "role": "assistant", "content": "Pdefn — non event stream reference definition" }, { "role": "user", "content": "What does `Pdefn.all` do?" }, { "role": "assistant", "content": "A global IdentityDictionary with all prox...
[ { "role": "user", "content": "What does `Server.prepareForRecord` do? What arguments does it take?" }, { "role": "assistant", "content": "Allocates the necessary buffer, etc. for recording the server's output. (See `record` Arguments: path — a String representing the path and name of the output ...
[ { "role": "user", "content": "How do I play a random minorPentatonic scale at octave 5?" }, { "role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```supercollider\n(\nSynthDef(\\fm_voice, { |out = 0, freq = 440, amp = 0.2|\n var ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nvar synth = { Out.ar(99, SinOsc.ar([300, 700])) }.play;\n{ In.ar(99, 2) }.plot(0.02, synth);\n```" }, { "role": "assistant", "content": "A closing bracket is missi...
[ { "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": "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": "Write a SuperCollider patch for 8-bit synth (a SuperCollider snippet) that runs as it is, with nothing assumed about the session." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"AM2\", { arg freq = 440, modfreq = 12, amp = 0.5, attack = 0.01, ...
[ { "role": "user", "content": "What does `Disintegrator.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "port of some ladspa plugins Arguments: in — The input signal.; probability; multiplier; mul — Output will be multiplied by this value.; add — This value will be adde...
[ { "role": "user", "content": "What does `OSCBundle.schedSend` do? What arguments does it take?" }, { "role": "assistant", "content": "Like send, but the sending is synced to a given clock to the next Arguments: server — A Server.; clock — A TempoClock.; quant — Can be a pair of values: [quant, o...
[ { "role": "user", "content": "Write a granular texture, through a reverb. (rate 16, dur 0.15, interp 4, mode sweep, 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": "Write a minimal SuperCollider example that uses `NodeControl`." }, { "role": "assistant", "content": "```supercollider\nd = SynthDef(\"help-NodeControl\", { |out = 0, freq = 400|\n Out.ar(out,\n SinOsc.ar(freq, 0, 0.5)\n )\n});\ny = d.play; // the synth\n\nc =...
[ { "role": "user", "content": "What is `Tdef`?" }, { "role": "assistant", "content": "Tdef — task reference definition" }, { "role": "user", "content": "What does `Tdef.all` do?" }, { "role": "assistant", "content": "A global IdentityDictionary with all proxies." }, { ...
[ { "role": "user", "content": "Write a granular texture, through a reverb. (rate 20, dur 0.07, interp 4, mode noise1, rev 1)" }, { "role": "assistant", "content": "Granulation is `GrainBuf` plus a trigger rate; the position can move:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.wait...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// write a sine oscillator's output to a pin, and read the pin value at other times\n\n(\nSynthDef(\"help-DigitalIO\", { |out = 0|\n DigitalIO.ar(0, SinOsc.ar(10), LFPulse.kr(0.1)).poll;\n}).play;\n)\n```" }, { ...
[ { "role": "user", "content": "Show another SuperCollider example using `QuadN`." }, { "role": "assistant", "content": "```supercollider\n// logistic map\n// equation: x1 = -r*x0^2 + r*x0\n(\n{ var r;\n r = MouseX.kr(3.5441, 4); // stable range\n QuadN.ar(SampleRate.ir/4, r.neg, r, 0, 0.1) * 0...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// as frequency control...\n(\n{\nSinOsc.ar(\n LinCongC.ar(\n 40,\n LFNoise2.kr(0.1, 0.1, 1),\n LFNoise2.kr(0.1, 0.1, 0.1),\n LFNoise2.kr(0.1),\n 0, 500, 600\n )...
[ { "role": "user", "content": "What is `Plorenz` in SuperCollider?" }, { "role": "assistant", "content": "Plorenz — lorenz 3D chaotic pattern Returns a stream that behaves like a strange attractor (x, y, z). Category: Streams-Patterns-Events > Patterns > Random." } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `MultiplexAnalogIn`." }, { "role": "assistant", "content": "```supercollider\n// modulate frequency of a sine oscillator\n\n(\nSynthDef(\"help-MultiplexAnalogIn\", { |out = 0|\n Out.ar(out,\n SinOsc.ar(MultiplexAna...
[ { "role": "user", "content": "What is `PXLine` in SuperCollider?" }, { "role": "assistant", "content": "PXLine — UGenPatterns quark library Based on XLine Category: Streams-Patterns-Events > UGenPatterns > Generators." } ]
[ { "role": "user", "content": "What does `PsymNilSafe.new` do?" }, { "role": "assistant", "content": "Creates a new PsymNilSafe object. pattern expects a pattern of Symbols, dict the lookup dictionary and defaults to the current Environment. maxNull is the number of events with delta = 0 after wh...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nNdef(\\sound, { |freq = 56, numHarm = 10| Blip.ar(freq, numHarm, 30) * 0.2 }).play;\nNdef(\\sound).set(\\freq, 15);\nNdef(\\sound).set(\\freq, 15, \\numHarm, 100);\n\nNdef(\\lfo,...
[ { "role": "user", "content": "Give me a sine kick with a 0.06 s pitch sweep. (osc sine, sweep 0.06, decay 0.5, f0 150, f1 48, amp 0.8, rev 0)" }, { "role": "assistant", "content": "Start with a swept sine, then shorten the decay to taste:\n\n```supercollider\n// kick drum: sine oscillator, 0.06 ...
[ { "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": "Give me an Ndef with an LFO at 0.8 Hz. (ugens saw, cutoff 1400, lfo 0.8, freq 220, amp 0.12)" }, { "role": "assistant", "content": "`Ndef` is a named proxy you can redefine while it is playing:\n\n```supercollider\n// Ndef drone: saw source through a 1400 Hz low-pas...
[ { "role": "user", "content": "Explain this code:\n```supercollider\nNdef(\\x, { Saw.ar(110) * 0.1 }).play;\nNdef(\\x)[1] = \\filter -> { |in| RLPF.ar(in, 800, 0.4) };\n```" }, { "role": "assistant", "content": "Two nodes in one named proxy: a saw source, then a resonant low-pass filter fed by it...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n// By Bjørn Houdorf March 2013, Play your (short) soundfiles with some delay.\n\nb = SoundFile.collectIntoBuffers(\"yourSoundFileFolder/*\"); // 1. rund this\n\n( // 2. and then run this\nt = Task({\n({\n var num=...
[ { "role": "user", "content": "Show another SuperCollider example using `BinaryOpUGen`." }, { "role": "assistant", "content": "```supercollider\n// trigger an envelope\n(\n{\n var trig;\n trig = SinOsc.ar(1) > 0.1;\n EnvGen.kr(Env.perc, trig, doneAction: Done.none) * SinOsc.ar(440, 0, 0....
[ { "role": "user", "content": "I get \"Message 'ar' not understood\". Why?" }, { "role": "assistant", "content": "You called a rate method on something that is not a UGen. `Env.ar(...)` and `Buffer.ar(...)` are the classic cases: Env is a language-side description and is played by `EnvGen.ar(env,...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `NRand`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-NRand\", { |out = 0, n = 0|\n Out.ar(out,\n FSinOsc.ar(\n NRand(1200.0, 4000.0, n),\n ...
[ { "role": "user", "content": "How do I make a kick that starts at 150 Hz and falls to 40 Hz? (osc sine, sweep 0.06, decay 0.18, f0 150, f1 40, amp 0.8, rev 1)" }, { "role": "assistant", "content": "A kick is a sine with a fast pitch drop and a short amplitude envelope:\n\n```supercollider\n// ki...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `InFeedback`." }, { "role": "assistant", "content": "```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 + ...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `FoldIndex`. Define every value it uses." }, { "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 = FoldInd...
[ { "role": "user", "content": "Explain `FoaDominateX` in SuperCollider briefly." }, { "role": "assistant", "content": "FoaDominateX — First Order Ambisonic (FOA) dominance transformer Apply dominance to a First Order Ambisonic signal (B-format) along the x-axis. Category: Libraries > Ambisonic To...
[ { "role": "user", "content": "Give me an Ndef with an LFO at 0.1 Hz. (ugens tri, cutoff 400, lfo 0.1, 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: tri source through a 400 Hz lo...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `GVerb`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n(\n// CAUTION: THE FOLLOWING CAN BE EXTREMELY LOUD\n// set the following variable to true if you want to run this cod...
[ { "role": "user", "content": "What does `QPalette.color` do? What arguments does it take?" }, { "role": "assistant", "content": "Returns the color assigned to a color role within a color Arguments: role — A symbol among palette_color_roles.; group — A symbol among palette_color_groups, or nil, i...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\na = Ptime.new;\nx = a.asStream;\n);\n\nx.next;\nx.next;\nx.next;\n\n// post time in a playing event stream\n(\nPbind(\n \\pfunc, Ptime.new.trace,\n \\dur, Pseries(0.5, 0.5, 5)\n).play;\n);\n\n\n// change degree indep...
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ SinOsc.ar(SinOsc.ar(0.3).range(440, 660), 0, 0.5 * 0.1 }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earl...
[ { "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": "What does this SuperCollider code do?\n```supercollider\n// allocate buffer\nb = Buffer.alloc(s, 44100, 1);\n\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);\n...
[ { "role": "user", "content": "Write a GrainBuf synth at 14 grains per second. (rate 14, dur 0.1, interp 4, mode sweep, rev 1)" }, { "role": "assistant", "content": "`GrainBuf` needs a buffer, a trigger and a grain duration:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.waitForBoot {...
[ { "role": "user", "content": "What is `SendPeakRMS`?" }, { "role": "assistant", "content": "SendPeakRMS — Track peak and power of a signal for GUI applications." }, { "role": "user", "content": "What does `SendPeakRMS.ar` do?" }, { "role": "assistant", "content": "Unlike ...
[ { "role": "user", "content": "Write a SuperCollider patch for batuhan's buzzer parametrized that runs as it is, with nothing assumed about the session." }, { "role": "assistant", "content": "```supercollider\n// A beautiful sc140 tweet by Batuhan Bozkurt, parametrized for real-time changes\n(\n/...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n//listen to x and y output\n{Out.ar(0,Brusselator.ar(Impulse.kr(MouseY.kr(1,50,'exponential')),MouseX.kr(0.01,1,'exponential')))}.play\n\n//avoid DC offset (default gamma is 1.0, listening to x only, so take off gamma\n{O...
[ { "role": "user", "content": "Explain `FoaRTT` in SuperCollider briefly." }, { "role": "assistant", "content": "FoaRTT — First Order Ambisonic (FOA) multi-axes rotation transformer Rotate a First Order Ambisonic signal (B-format) around the z, x and y axes. Category: Libraries > Ambisonic Toolki...
[ { "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": "Explain `LinExp` in SuperCollider briefly." }, { "role": "assistant", "content": "LinExp — Map a linear range to an exponential range Converts a linear range of values to an exponential range of values. Category: UGens > Maths." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ TwoZero.ar(WhiteNoise.ar(0.125), XLine.kr(20, 20000, 8), 1 }.play\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened e...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{Formants.ar(100, Vowel([\\e, \\o], [\\bass])) * 0.1 }.play\n{Formants.ar(100, Vowel(\\e, [\\bass,\\alto])) * 0.1 }.play\n{Formants.ar(100, Vowel([\\e, \\o], [\\bass,\\alto]) * 0...
[ { "role": "user", "content": "What does `PLbindefParEnvironment.num` do?" }, { "role": "assistant", "content": "Getter for PLbindefPar's number of parallel" } ]
[ { "role": "user", "content": "How do I make a kick that starts at 220 Hz and falls to 48 Hz? (osc saw, sweep 0.06, decay 0.5, f0 220, f1 48, 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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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 freq = Demand.kr(trig, 0, r...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `DynKlank`." }, { "role": "assistant", "content": "```supercollider\n{ DynKlank.ar(`[[800, 1071, 1153, 1723], nil, [1, 1, 1, 1]], Impulse.ar(2, 0, 0.1)) }.play;\n\n{ DynKlank.ar(`[[800, 1071, 1353, 1723], nil, [1, 1, 1...
[ { "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": "Write a Pbind in minorPentatonic using Pshuf for the degrees. (scale minorPentatonic, seq Pshuf, dur 0.25, octave 6, instr fm, root 0)" }, { "role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```superc...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// increase feedback\n{ FBSineC.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's the difference between Env.perc and Env.adsr?" }, { "role": "assistant", "content": "`Env.perc(attack, release)` goes up once and decays to zero — one-shot sounds. `Env.adsr(a, d, s, r)` holds at a sustain level while its gate is open and only releases when t...
[ { "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\n(\np = Pbind(\n \\midinote, PLnaryFunc(\\f, \\src, [\\dev]),\n \\dur, 0.1\n);\n);\n...
[ { "role": "user", "content": "Explain this SuperCollider patch.\n```supercollider\n// (thor magnusson) (2006)\n\n// An instrumentalist inside a synthdef.\n\n(\nSynthDef(\\drummer, { arg out=0, tempo=4;\n var snare, base, hihat;\n tempo = Impulse.ar(tempo); // for a drunk drummer replace Impulse with Dust ...
[ { "role": "user", "content": "What does `ServerGui.update` do? What arguments does it take?" }, { "role": "assistant", "content": "an alternate small server view Arguments: changer; what." } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `QuadN`." }, { "role": "assistant", "content": "```supercollider\n// default params\n{ QuadN.ar(SampleRate.ir/4) * 0.2 }.play(s);\n```" } ]
[ { "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": "Write a Pbind in minorPentatonic using Pwalk for the degrees. (scale minorPentatonic, seq Pwalk, dur 0.4, octave 4, instr sine, root 0)" }, { "role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```super...
[ { "role": "user", "content": "What is `Maths` in SuperCollider?" }, { "role": "assistant", "content": "Maths — Function Generator A Faust implementation of the MakeNoise Maths EuroRack module. Creates a logarithmic to exponential curve function that can be triggered or can oscillate. The functio...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nx = { SinOsc.ar(440, 0, 0.3) }.asDefName; // this must complete first\ny = Synth(x;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the pare...
[ { "role": "user", "content": "What is the difference between the language and the server?" }, { "role": "assistant", "content": "sclang runs your code, the clock and Patterns, and builds UGen graphs. scsynth performs the DSP in real time. They communicate over OSC, which is why a language-side m...
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\na = { |x| #[440, 720, 801, 1020.2].at(x) }; b = a.cpsmidi; [a.value(3), b.value(3)];\na = Pseries(220, 220, inf).cpsmidi; a.asStream.nextN(12); // overtone series as midinotes\n/...
[ { "role": "user", "content": "I get 'index out of range' when playing a buffer." }, { "role": "assistant", "content": "A read position is past the end of the buffer. `PlayBuf` with a `startPos` in frames beyond `~buf.numFrames`, or a `BufRd`/`GrainBuf` whose phase goes above 1, produces this. Fo...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `PV_RandComb`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\nc = Buffer.read(s, ExampleFiles.child);\n\n(\nSynthDef(\"help-randcomb\", { |out = 0|\n var sig, chain;\n sig = WhiteNoise.ar(0.8);\n ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LinExp`." }, { "role": "assistant", "content": "```supercollider\n// compare:\n(\n{\n var mod = SinOsc.kr(Line.kr(1, 10, 10));\n SinOsc.ar(mod * 400 + 500) * 0.1\n}.play;\n);\n\n(\n{\n var mod = SinOsc.kr(Line.kr(1...
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// needs Buffer c prepared above\n\n(\ny = {\n var add = LFDNoise3.ar(0.3) * [0.05, 0.0505];\n GFIS.ar(\n { |x| BufRd.ar(1, c, c.numFrames * (x + add)) }, \n 0.5, 7\n ) ...