conversations
listlengths
2
6
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `SinOsc`." }, { "role": "assistant", "content": "```supercollider\n// create an audio-rate sine wave at 200 Hz,\n// starting with phase 0 and an amplitude of 0.5\n{ SinOsc.ar(200, 0, 0.5) }.play;\n\n// modulate the fre...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\nq = Patch({ Saw.ar(40.midicps) * 0.05 });\nr = Patch({ Saw.ar(52.midicps) * 0.05 });\np = PlayerSocket.new(\\audio,1);\np.play;\n);\n// then get the socked to alternately spawn q and r\np.prepareAndQSpawn(q,0.1);\np.pr...
[ { "role": "user", "content": "What is `LinPan2` in SuperCollider?" }, { "role": "assistant", "content": "LinPan2 — Two channel linear pan. Two channel linear panner. The signal is lowered as it pans from left (or right) to center using a straight line from 1 (left or right) to 0.5 (center) for a...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Lorenz2DL.ar(11025, 44100) }.play(s);\n\n// randomly modulate params\n(\n{ Lorenz2DL.ar(\n 11025, 44100,\n LFNoise0.kr(1, 2, 10),\n 20,\n LFNoise0.kr(1, 1.5, 2),\n 0.02\n)...
[ { "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": "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": "Explain `Disintegrator` in SuperCollider briefly." }, { "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 mu...
[ { "role": "user", "content": "Explain `EaseInQuint` in SuperCollider briefly." }, { "role": "assistant", "content": "EaseInQuint — Quintic ease-in Easing equation function for a quintic (t^5) ease-in, accelerating from zero velocity. Category: Ease." } ]
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `Timer`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n// using timer to modulate sine frequency: the slower the trigger is the higher the frequency\n(\n{ var trig;\n trig =...
[ { "role": "user", "content": "Write an Ndef with a blip source and a 800 Hz low-pass. (ugens blip, cutoff 800, 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: blip source through a 80...
[ { "role": "user", "content": "What does `AbsApp.mx` do?" }, { "role": "assistant", "content": "The Mx object that this unit, channel, iolet etc. is" } ]
[ { "role": "user", "content": "Write an Ndef with a blip source and a 1400 Hz low-pass. (ugens blip, cutoff 1400, lfo 0.3, freq 220, amp 0.12)" }, { "role": "assistant", "content": "Use `Ndef` when the patch has to change without stopping:\n\n```supercollider\n// Ndef drone: blip source through a...
[ { "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": "Show me a self-contained SuperCollider patch using `Dswitch`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n(\n {\n var d, trig;\n d = Dswitch([\n Dwhite(3, 4, 2),\n Dwhite(0, 1, 2),\n Dseq([1, 1, 1, 0...
[ { "role": "user", "content": "What does `Integer.isInteger` do?" }, { "role": "assistant", "content": "32-bit Integer number Returns: true (the receiver is an integer)." } ]
[ { "role": "user", "content": "What does `LFTri.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "Triangle oscillator Arguments: freq — Frequency in Hertz. For efficiency reasons, only positive values result in correct behavior.; iphase — Initial phase offset. For effici...
[ { "role": "user", "content": "Explain `LevelIndicator` in SuperCollider briefly." }, { "role": "assistant", "content": "LevelIndicator — a level indicator GUI widget A level indicator view, suitable for use as a level or peak meter, etc. Category: GUI > Views." } ]
[ { "role": "user", "content": "What is `OSCdef` in SuperCollider?" }, { "role": "assistant", "content": "OSCdef — OSC response reference definition OSCdef provides a global reference to the functionality of its superclass OSCFunc. Essentially it stores itself at a key within a global dictionary, ...
[ { "role": "user", "content": "What does `RedLTurtle.addCommand` do?" }, { "role": "assistant", "content": "Make up new rules by putting a character : function pair into command dictionary. Arguments passed in to function: depth, depthLength," } ]
[ { "role": "user", "content": "What does `TWChoose.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "Randomly select one of several inputs Arguments: trig; array; weights; normalize." } ]
[ { "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": "How do I make a kick that starts at 220 Hz and falls to 40 Hz? (osc fm, sweep 0.06, decay 0.35, f0 220, f1 40, 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": "Write an Ndef at 165 Hz I can retune while it plays. (ugens tri, cutoff 200, lfo 0.8, freq 165, 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 20...
[ { "role": "user", "content": "Write a bell in SuperCollider." }, { "role": "assistant", "content": "A bell is a set of inharmonic partials with a long percussive decay. The ratios below are the\nclassic bell ones; the envelope frees the Synth when it ends.\n\n```supercollider\n(\nSynthDef(\\bell...
[ { "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 kick at amp 0.6 with no click. (osc sine, sweep 0.06, decay 0.35, f0 180, 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 oscillator...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `Saw`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n(\n SynthDef(\\controlList, { |out = 0, freq = 440, amp = 0.1, detune = #[0.999, 1.001], gate = 1|\n var sig = M...
[ { "role": "user", "content": "Write a Pbind whose degrees repeat every Pseq cycle. (scale majorPentatonic, seq Pseq, dur 0.25, octave 6, instr pluck, root 0)" }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nSynthDef(...
[ { "role": "user", "content": "Show another SuperCollider example using `FBSineN`." }, { "role": "assistant", "content": "```supercollider\n// increase feedback\n{ FBSineN.ar(SampleRate.ir, 1, Line.kr(0.01, 4, 10), 1, 0.1) * 0.2 }.play(s);\n```" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{SinOsc.ar(Summer.kr(Impulse.kr(5), 1.5, 0, 0).poll * 100, 0, 0.1)}.play;\n\n(\n{\n var trig = Dust.kr(5);\n var reset = Impulse.kr(0.5);\n SinOsc.ar(Summer.kr(trig, [0.5, 0.2...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nSynthDef(\"help-PulseDivider\", { |out = 0|\n var p, a, b;\n p = Impulse.ar(8);\n a = SinOsc.ar(1200, 0, Decay2.ar(p, 0.005, 0.1));\n b = SinOsc.ar(600, 0, Decay2.ar(PulseDiv...
[ { "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": "Write a SuperCollider patch that uses `Limiter` and actually plays. Assume nothing about the session." }, { "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)...
[ { "role": "user", "content": "What does `RangeSlider.defaultKeyDownAction` do?" }, { "role": "assistant", "content": "Implements the default effects of key presses as" } ]
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `LPF`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\nSynthDef(\\default, { arg out=0, freq=440, amp=0.1, pan=0, gate=1;\n var z;\n z = LPF.ar(\n Mix.new(VarSaw.ar(fr...
[ { "role": "user", "content": "What does `PdefGui.close` do?" }, { "role": "assistant", "content": "(if the jitGui is in its own window) and close its" } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LinRand`." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-LinRand\", { |out = 0, minmax = 1|\n Out.ar(out,\n FSinOsc.ar(\n LinRand(200.0, 10000.0, minmax),\n 0, Line.kr(0.2, 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": "Write an Ndef at 165 Hz I can retune while it plays. (ugens saw, cutoff 400, 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 400 Hz...
[ { "role": "user", "content": "What is `IndexL` in SuperCollider?" }, { "role": "assistant", "content": "IndexL — Index into a table with a signal, linear interpolated The input signal value is used as an index into the table, with linear interpolation. Out of range index values are clipped to th...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\ns.boot;\n\nInstr(\"saw\",{ arg freq=400; Saw.ar(freq) * EnvGen.kr(Env.perc,doneAction:2)});\n\np = Patch(\"saw\",[KrNumberEditor(300,\\freq)]);\n\nSheet({ arg f;\n p.gui(f);\...
[ { "role": "user", "content": "Write a granular texture, through a reverb. (rate 20, dur 0.1, interp 2, 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\n(\ns.waitForBoot {\n ...
[ { "role": "user", "content": "What does `MxIOletsApp.doesNotUnderstand` do? What arguments does it take?" }, { "role": "assistant", "content": "Used by the accessor shorthand to find the iolet by Arguments: selector — The iolet name.; ... args — In case the method call was a mistake, and the iol...
[ { "role": "user", "content": "What is `Gendy3` in SuperCollider?" }, { "role": "assistant", "content": "Gendy3 — Dynamic stochastic synthesis generator. See Gendy1 help file for background. This variant of GENDYN normalises the durations in each period to force oscillation at the desired pitch. ...
[ { "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": "What does `VectorSplineGui.didCreateControlPoint` do? What arguments does it take?" }, { "role": "assistant", "content": "(describe method Arguments: xySpline — (describe argument here); dim — (describe argument here); i — (describe argument here). Returns: (returnv...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Normalizer`." }, { "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 0.001, 0.3, FSinOsc.ar(500));\n ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `List`." }, { "role": "assistant", "content": "```supercollider\n// Create a new empty collections with size 3:\nx = Array.new(3);\ny = Array.new(3);\nz = List.new(3);\n\n// Try to add 7 items to the array and list.\n/...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `BPZ2`." }, { "role": "assistant", "content": "```supercollider\n// Compare:\n\n{ WhiteNoise.ar(0.25) }.play;\n\n{ BPZ2.ar(WhiteNoise.ar(0.25)) }.play;\n```" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nd = { |freq = 440| SinOsc.ar(LastValue.ar(freq, 20), 0, 0.2) }.play;\n\nd.set(\\freq, 400);\nd.set(\\freq, 200);\nd.set(\\freq, 670);\nd.set(\\freq, 680);\nd.set(\\freq, 695;\nd....
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.boot;\n\n(\n{\n var in, chain;\n in = WhiteNoise.ar(0.2);\n chain = FFT(LocalBuf(2048), in);\n chain = PV_BrickWall(chain, SinOsc.kr(0.1));\n IFFT(chain);\n}.play\n```" ...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\nPsloth {\n var seed, repeats;\n\n *new { arg seed, repeats=1;\n ^super.newCopyArgs(seed, repeats);\n }\n\n storeArgs{^[seed, repeats]}\n\n embedInStream { arg inval;\n var size=seed.size;\n ...
[ { "role": "user", "content": "Write an Ndef with a saw source and a 800 Hz low-pass. (ugens saw, cutoff 800, 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: saw source thr...
[ { "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": "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-IRand\", {\n Out.ar(\n IRand(0, 1), // play on random channel between 0 and 1\n FSinOsc.ar(500,\n 0, Line.kr(0.2, 0, 0.1, doneAction: Done.freeSelf...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n//try passing a signal through the hair cell\nx = { Meddis.ar(SinOsc.ar(440)) }.play;\nx.free;\n\n//recursive hair cell compression\n{ Meddis.ar(Meddis.ar(SoundIn.ar) }.play;\n``...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nx = {\n SinOsc.ar([0.1, 0.2], 0).poll * 0.1\n}.play;\n;\nx.trace; // By tracing the Synth you can see the two Poll units we created\nx.free\n```" }, { "role": "assist...
[ { "role": "user", "content": "What does `UScore.addEventToCompletelyEmptyTrack` do? What arguments does it take?" }, { "role": "assistant", "content": "(describe method Arguments: evt — (describe argument here). Returns: (returnvalue)" } ]
[ { "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": "Saving \"Presets\"?" }, { "role": "assistant", "content": "SuperCollider forum — Saving \"Presets\"?\n\nIf you don’t care too much about it being human readable, just use writeArchive and readArchive:\n\n```supercollider\na = Array.fill(400, {rrand(0,2200)});\n\na.w...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `ProxySpace`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\np = ProxySpace.new;\np.fadeTime = 2; // fadeTime specifies crossfade\np[\\out].play; // monitor an em...
[ { "role": "user", "content": "What is `Set`?" }, { "role": "assistant", "content": "Set — a set according to equality" }, { "role": "user", "content": "What does `Set.add` do?" }, { "role": "assistant", "content": "Add an Object to the Set. An object which is equal to an ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `PV_MagFreeze`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\nb = Buffer.read(s, ExampleFiles.child);\n\n\n(\nSynthDef(\"help-magFreeze\", { |out = 0|\n var in, chain;\n in = SinOsc.ar(LFNoise1.kr...
[ { "role": "user", "content": "What does `UScore.makeView` do? What arguments does it take?" }, { "role": "assistant", "content": "(describe method Arguments: i — (describe argument here); maxWidth — (describe argument here). Returns: (returnvalue)" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ XFade2.ar(Saw.ar, SinOsc.ar, LFTri.kr(0.1) }.play\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never ...
[ { "role": "user", "content": "Write a Pbind whose degrees repeat every Pseq cycle. (scale majorPentatonic, seq Pseq, dur 0.2, octave 6, instr sine, root 0)" }, { "role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```supercollider\n...
[ { "role": "user", "content": "Synth Iteration Help?" }, { "role": "assistant", "content": "SuperCollider forum — Synth Iteration Help\n\n```supercollider\n(\nSynthDef (\\sine_tone) {\narg freq = 440, amp = 1, len = 1, bus = 0;\nvar sig, env;\nenv = Env.step ([ amp ], [ len ]);\nenv = EnvGen.kr (...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// Find/make a dataset of points:\nx = 15.collect{[1.0.rand, 1.0.rand]};\n// Append the index onto the end, for later reference\nx = x.collect{|data, i| data ++ i };\n// Use the KDTree quark and the .makeBufferData method...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `GrayNoise` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-GrayNoise\", { |out = 0|\n Out.ar(out,\n GrayNoise.ar(-20.dbamp)\n )\n}).play;\n)...
[ { "role": "user", "content": "Add freeverb2 to a bell patch at room 0.7. (verb freeverb2, room 0.7, damp 0.2, mix 0.3, source bell)" }, { "role": "assistant", "content": "`FreeVerb` is in the core library; the room and damp arguments do the work:\n\n```supercollider\n// reverb: freeverb2 on a be...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ LorenzTrig.ar(11025, 44100) }.play(s);\n\n// randomly modulate params\n(\n{ LorenzTrig.ar(\n 11025, 44100,\n LFNoise0.kr(1, 2, 10),\n 20,\n LFNoise0.kr(1, 1.5, 2),\n 0.02\...
[ { "role": "user", "content": "What does `View.name` do? What arguments does it take?" }, { "role": "assistant", "content": "If the view is a window, sets its Arguments: A String containing text for the window title.." } ]
[ { "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 LinCongL.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 `Bag`?" }, { "role": "assistant", "content": "Bag — Unordered collection of objects" }, { "role": "user", "content": "What does `Bag.new` do?" }, { "role": "assistant", "content": "Creates a Bag with an initial capacity for n objects....
[ { "role": "user", "content": "What does `FoaEncoderKernel.dim` do?" }, { "role": "assistant", "content": "Answers the number of decoder dimensions: 2D or" } ]
[ { "role": "user", "content": "What does `RedAbstractModule.free` do?" }, { "role": "assistant", "content": "Remove internal controllers. Free the node and remove this module from" } ]
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\n// p = ProxySpace.push(s.boot);\n\nl = NodeProxyEditor(nil, 3); l.w.bounds_(l.w.bounds.moveBy(0, 120));\nm = NodeProxyEditor(nil, 3); m.w.bounds_(m.w.bounds.moveBy(0, 240));\nn = NodeProxyEditor(nil, 3); n.w.bounds_(n....
[ { "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 Pbind whose degrees repeat every Pwalk cycle. (scale minorPentatonic, seq Pwalk, dur 0.2, octave 6, instr fm, root 0)" }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nSynthDef(\\...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\na = {LFTri.ar(100+(1000*Maths.ar(MouseX.kr, MouseY.kr, SinOsc.ar(0.2, 0).range(0,1), 1-MouseButton.kr(lag:0.001))[0]), 0, 0.1}.play\n```" }, { "role": "assistant", "c...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// constant source (72), max deviation +/- 3\n// no repetition within 5 pitches\n\n(\nx = {\n var trig = Impulse.ar(5);\n var midi = Demand.ar(trig, 0, DIdev(72, 2, -1, 2));\n ...
[ { "role": "user", "content": "Write a SuperCollider patch for gabber kick (a SuperCollider snippet) that runs as it is, with nothing assumed about the session." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\\gabberkick, {\n var snd;\n snd = SinOsc.ar(Env([1000, 69, 6...
[ { "role": "user", "content": "What does `RedLZSS.pad` do?" }, { "role": "assistant", "content": "Semi-private counter for number of padded zeros. Set by #*binaryStringToBytes and read by" } ]
[ { "role": "user", "content": "What is `Nil`?" }, { "role": "assistant", "content": "Nil — Represents uninitialized data" }, { "role": "user", "content": "What does `Nil.isNil` do?" }, { "role": "assistant", "content": "Answers true because this is nil. In class Object thi...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `DelayC`." }, { "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 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": "Write a minimal SuperCollider example that uses `PinkNoise`." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-PinkNoise\", { |out = 0|\n Out.ar(out,\n PinkNoise.ar(0.4)\n )\n}).play;\n)\n```" } ]
[ { "role": "user", "content": "Explain this SuperCollider code:\n```supercollider\n{ SinOsc.ar(440) * EnvGen.kr(Env.perc(0.01, 1), doneAction: 2) }.play;\n```" }, { "role": "assistant", "content": "It plays a 440 Hz sine with a percussive envelope, and the Synth frees itself when the envelope\nen...
[ { "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": "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 `ServerOptionsGui` in SuperCollider?" }, { "role": "assistant", "content": "ServerOptionsGui — A GUI to manage Server options A GUI to easily browse and tweak a Server options. Category: Server." } ]
[ { "role": "user", "content": "How should I check an answer you give me?" }, { "role": "assistant", "content": "Three quick checks, cheapest first. Does it evaluate without a syntax error — the post window points at the exact character. Does the node appear in `s.plotTree` — if yes, the problem i...
[ { "role": "user", "content": "How do I granulate a sample with 0.2 s grains? (rate 6, dur 0.2, 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(\ns....
[ { "role": "user", "content": "What does `SimpleNumber.cylBesselJ` do?" }, { "role": "assistant", "content": "Returns the result of the Bessel functions of the first kind. The functions return the result of `domain_error` whenever the result is undefined or complex. This occurs when `x < 0` and `...
[ { "role": "user", "content": "What does `CXAbstractLabel.label` do? What arguments does it take?" }, { "role": "assistant", "content": "parent class for Label classes Arguments: string." } ]
[ { "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": "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 self-contained SuperCollider patch that uses `Dser`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a, freq, trig;\n a = Dser([1, 3, 2, 7, 8], 8);\n trig = Impulse.kr(MouseX.kr(1, 40, 1));\n freq = Demand....
[ { "role": "user", "content": "Explain `PLFNoise2` in SuperCollider briefly." }, { "role": "assistant", "content": "PLFNoise2 — UGenPatterns quark library Based on LFNoise2 Category: Streams-Patterns-Events > UGenPatterns > Generators." } ]