conversations
listlengths
2
6
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\na = {LFTri.ar(50+(1000*Maths.ar(10, 10, 0.5, 1)[0]), 0, 0.1)}.play //notice how I am taking the [0]th channel of the Maths and ignoring the [1st channel.\n```" }, { "role...
[ { "role": "user", "content": "What does `BezierSpline.guiClass` do?" }, { "role": "assistant", "content": "specifies the ObjectGui subclass which builds the GUI for editing the Returns: ObjectGui subclass" } ]
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// vibrato at 1 Hz, note the use of DC.ar UGen; a constant of 400.0 doesn't work\n{ SinOsc.ar(Vibrato.ar(DC.ar(400.0), 1, 0.02)) }.play\n\n// compare: k-rate freq input can be a constant\n{ SinOsc.ar(Vibrato.kr(400.0, 1, ...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `SharedOut` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\n// only works with the internal server\ns = Server.internal;\ns.boot;\n);\n\n(\nSynthDef(\"help-Shared...
[ { "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": "Write a Pbind whose degrees repeat every Pseq cycle. (scale minorPentatonic, seq Pseq, dur 0.25, octave 5, instr pluck, root 0)" }, { "role": "assistant", "content": "Put the scale and the degree pattern in the `Pbind` and it will pick notes for you:\n\n```supercoll...
[ { "role": "user", "content": "Explain `EaseInOutQuint` in SuperCollider briefly." }, { "role": "assistant", "content": "EaseInOutQuint — Quintic ease-in/out Easing equation for a quintic (t^5) ease-in/out, accelerating until halfway, then decelerating. Category: Ease." } ]
[ { "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": "Write a self-contained SuperCollider patch that uses `Ringz`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\nx = { arg freq=1000; Ringz.ar(Crackle.ar(1.95, 0.1), freq, 0.05) }.play(s);\nx.set(\\freq, 1500);\nx.free;\n```" } ]
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.boot;\n\nb = Buffer.alloc(s, 100);\nb.zero;\nb.set(33, 1.034);\n// This should detect the 33rd value as the highest...\nx = {BufMax.kr(b).poll}.play;\n\n// ...until we set a ne...
[ { "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;\n a = [\n Saw.ar(LFSaw.kr(3 * [1, 1.01], 0, 100, 230)),\n SinOsc.ar,\n Pulse.ar(LFPulse.kr(3 * [1, 1.02], 0, 0.4, 100, 230)),\n SinOsc.ar(SinO...
[ { "role": "user", "content": "Show another SuperCollider example using `StandardN`." }, { "role": "assistant", "content": "```supercollider\n// mouse-controlled param\n{ StandardN.ar(SampleRate.ir/2, MouseX.kr(0.9, 4)) * 0.3 }.play(s);\n```" } ]
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\nSynthDef(\\bird,{\n var sig, freqenv, env, trig;\n trig = Dust.ar(2);\n env = EnvGen.ar(Env.perc(0.01,0.4,0.8,-8), trig, doneAction: 2);\n freqenv = EnvGen.ar(Env([Rand(1000,3000), Rand(3000,6000), Rand(1000,2000)...
[ { "role": "user", "content": "What does `PatchIn.disconnectFrom` do? What arguments does it take?" }, { "role": "assistant", "content": "manages a Player's input when connecting to other Players Arguments: patchOut." } ]
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `Dbrown`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a, freq, trig;\n a = Dbrown(0, 15, 1, inf);\n trig = Impulse.kr(MouseX.kr(1, 40, 1));\n freq = Demand.k...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `DecodeB2`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var w, x, y, p, a, b, c, d;\n\n p = PinkNoise.ar; // source\n\n // B-format encode\n #w, x, y = PanB2.ar(p, MouseX.kr(-1, 1), 0.1);\n\n /...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nSynthDef(\"help-PrintVal\",{PrintVal.kr(SinOsc.kr(440,0,0.1), 100)}).play\n\n\n//two at once\n(\nSynthDef(\"help-PrintVal\",{\n\nPrintVal.kr(SinOsc.kr(440,0,0.1), 100, 1);\n\nPri...
[ { "role": "user", "content": "Give me a fm kick with a 0.06 s pitch sweep. (osc fm, sweep 0.06, decay 0.18, f0 220, f1 48, amp 0.6, 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 oscillat...
[ { "role": "user", "content": "What is `ProxySpace` in SuperCollider?" }, { "role": "assistant", "content": "ProxySpace — an environment of references on a server Generally a proxy is a placeholder for something. A node proxy is a placeholder for something playing on a server that writes to a lim...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nx = {\n // A collection of different tones:\n var son = SinOsc.ar((100, 100.3 .. 110));\n var val = ArrayMin.ar(son).at(0);\n val = LeakDC.ar(val); // the operation tends ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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": "assistant", "content": "A closing bracket is mi...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\na = { SinOsc.ar(\\freq.kr(440, 1.2)) }.play;\na.set(\\freq, 330);\na.release;\na = { SinOsc.ar(\\freq.kr([440, 460], 1.2)) }.play;\na.setn(\\freq, [330, 367];\na.release;\n```" ...
[ { "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 does this SuperCollider patch do?\n```supercollider\nt = TempoClock(120/60).permanent_(true);\n\n(\n~change_clock_tempo = {|clock, tempo, beats=1|\n beats.do {|beat|\n var stepTempo = beat.linexp(0, beats-1, clock.tempo, tempo);\n clock.schedAbs(clock.next...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `BufRateScale`." }, { "role": "assistant", "content": "```supercollider\nb = Buffer.read(s, ExampleFiles.child);\n\n(\nx = { |rate = 1|\n BufRd.ar(1, b, Phasor.ar(0, BufRateScale.kr(b) * rate, 0, BufFrames.kr(b)))\n}....
[ { "role": "user", "content": "Show another SuperCollider example using `LorenzL`." }, { "role": "assistant", "content": "```supercollider\n// randomly modulate params\n(\n{ LorenzL.ar(\n SampleRate.ir,\n LFNoise0.kr(1, 2, 10),\n LFNoise0.kr(1, 20, 38),\n LFNoise0.kr(1, 1.5, 2)\n) * 0.2 }.pla...
[ { "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": "What does this SuperCollider code do?\n```supercollider\n// try wiggling mouse quickly;\n// LFNoise frequently seems stuck, LFDNoise changes smoothly.\n\n{ LFNoise0.ar(MouseX.kr(0.1, 1000, 1), 0.1) }.play\n\n{ LFDNoise0.ar(MouseX.kr(0.1, 1000, 1), 0.1) }.play\n\n// silent for 2...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `SharedIn`." }, { "role": "assistant", "content": "```supercollider\n(\n// only works with the internal server\ns = Server.internal;\ns.boot;\n);\n\n(\nSynthDef(\"help-SharedIn1\", {\n Out.ar(0, SinOsc.ar(Lag.kr(Share...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `PackFFT`." }, { "role": "assistant", "content": "```supercollider\n// Reminder: This isn't the intended typical usage! It's OK to do this though.\n(\nx = {\n var mags, phases, chain, sig;\n // Create simple undulati...
[ { "role": "user", "content": "Write a GrainBuf synth at 14 grains per second. (rate 14, dur 0.2, interp 2, mode sweep, rev 0)" }, { "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 does `AbstractResponderFunc.allDisabled` do?" }, { "role": "assistant", "content": "As allFuncProxies above, but only return those instances currently not listening for Returns: An IdentityDictionary." } ]
[ { "role": "user", "content": "Write a GrainBuf synth at 6 grains per second. (rate 6, dur 0.1, interp 2, mode noise, rev 0)" }, { "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 `NRand.new` do? What arguments does it take?" }, { "role": "assistant", "content": "Sum of uniform distributions. Arguments: lo — Lower limit of the output range.; hi — Upper limit of the output range.; n." } ]
[ { "role": "user", "content": "What is `ControlName`?" }, { "role": "assistant", "content": "ControlName — Object to store control information of SynthDef (used internally)" }, { "role": "user", "content": "What does `ControlName.index` do?" }, { "role": "assistant", "cont...
[ { "role": "user", "content": "Write a kick at amp 0.6 with no click. (osc saw, sweep 0.06, decay 0.5, f0 150, f1 40, amp 0.6, 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: saw oscillator, 0...
[ { "role": "user", "content": "Explain `Library` in SuperCollider briefly." }, { "role": "assistant", "content": "Library — keeping objects in a central place Library is a global MultiLevelIdentityDictionary. The Library can be used as a place to store data that you want globally accessible. It i...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ OneZero.ar(WhiteNoise.ar(0.5), 0.5) }.play\n\n{ OneZero.ar(WhiteNoise.ar(0.5), -0.5) }.play\n\n{ OneZero.ar(WhiteNoise.ar(0.5), Line.kr(-0.5, 0.5, 10) }.play\n```" }, { ...
[ { "role": "user", "content": "What does `BufferProxySpec.initClass` do?" }, { "role": "assistant", "content": "datatype specifying an input of BufferProxy" } ]
[ { "role": "user", "content": "Explain `SDrone` in SuperCollider briefly." }, { "role": "assistant", "content": "SDrone — a droning sInstrument Based on the Ndef used for 'Strange Foreign Bodies'. Category: SInstruments." } ]
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `SampleRate`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n// compares a 441 Hz sine tone derived from sample rate (44100 * 0.01, left)\n// with a 440 Hz tone (right), res...
[ { "role": "user", "content": "What is your name?" }, { "role": "assistant", "content": "sc-mind. I am the 198M MiniMind-3-MoE this repository trains on SuperCollider source and help text." } ]
[ { "role": "user", "content": "What does `List.fill` do?" }, { "role": "assistant", "content": "Inserts the item into the contents of the receiver, possibly returning a new collection. the difference between this and Collection#*fill#Collection's *fill." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-InFeedback\", { |out = 0, in = 0|\n var input, sound;\n input = InFeedback.ar(in, 1);\n sound = SinOsc.ar(input * 1300 + 300, 0, 0.4);\n Out.ar(out, ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ LFPulse.ar(XLine.kr(1, 200, 10), 0, 0.2, 0.1 }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is nev...
[ { "role": "user", "content": "Add freeverb to a pluck patch at room 0.85. (verb freeverb, room 0.85, damp 0.2, mix 0.45, source pluck)" }, { "role": "assistant", "content": "`FreeVerb` is in the core library; the room and damp arguments do the work:\n\n```supercollider\n// reverb: freeverb on a ...
[ { "role": "user", "content": "Write a SuperCollider patch for Using sine waves to generate a saw waveform. Start by defining the values the patch depends on." }, { "role": "assistant", "content": "```supercollider\nq={|f,e|a=Array.fill(e,{|j|e-j}).reverse;(Mix.ar(a.collect{|x|SinOsc.ar(f*x,0,1/x...
[ { "role": "user", "content": "What does `View.userCanClose` do? What arguments does it take?" }, { "role": "assistant", "content": "If the view is a window, sets or gets whether the user can close it via mouse or key Arguments: A Boolean.." } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Duty`." }, { "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 0,\n Dseq([204, 400, 201, 5...
[ { "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": "Explain `PLbrown` in SuperCollider briefly." }, { "role": "assistant", "content": "PLbrown — dynamic scope Pbrown variant Takes Symbol args for later reference by the Streams, which will read from variables in the Environments of their instantiation. See PLx_suite. ...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `Saw` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\\event_set, { |freq = 440, gate = 1, amp = 0.1, lagTime = 0.1,\n ffreq = 2000, detune = 1.005, ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ SinOsc.ar(300, 0, 0.5) * SinOsc.kr(2.unipolar * 0.1 }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier...
[ { "role": "user", "content": "Show another SuperCollider example using `Node`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n(\nx = SynthDef(\"help-node-set\", { |freq = 440, out = 0|\n Out.ar(out, SinOsc.ar(freq, 0, 0.1))\n}).play\n);\nx.run(false);\nx.run; // default is tr...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Trig.ar(Dust.ar(1), 0.2) * FSinOsc.ar(800, 0.5) }.play\n\n{ Trig.ar(Dust.ar(4), 0.1 }.play\n```" }, { "role": "assistant", "content": "A closing bracket is missing:...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\n{\n~a={SinOsc.ar([22.5, 23], mul: ChaosGen.allSubclasses.choose.ar(rrand(1, 30))* 0.3)};\n~b={SinOsc.ar([22.5, 23], mul: 0.3)};\n~c={SinOsc.ar([22.5, 23]*400, mul: ChaosGen.allSubclasses.choose.ar(rrand(1, 30))* 0.03)...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ SinOsc.ar(BrownNoise.ar(100, 200) * 0.1 }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never cl...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{SmoothDecimator.ar(SinOsc.ar([400, 404], 0, 0.2), MouseX.kr(0, 44100), MouseY.kr(0, 1))}.play\n\n{SmoothDecimator.ar(SoundIn.ar, MouseX.kr(0, 44100), MouseY.kr(0, 1)}.play\n```"...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nb = Buffer.alloc(s, 1);\n{\nvar x, y, rate, a, c, m;\n rate = MouseX.kr(100, SampleRate.ir);\n a = 1.1;\n c = 0.13;\n m = 1.0;\n x = Dbufrd(b); // read from buffer\n x =...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n// A beautiful sc140 tweet by Batuhan Bozkurt, parametrized for real-time changes\n(\n// Start sound here\na = { | rateL = 5, rateR = 6, blipMul = 100, blipAdd = 50, fMul = 50, kMul = 1 |\n f = LocalIn.ar(2).tanh;\n k ...
[ { "role": "user", "content": "What does `Image.pixelRatio` do?" }, { "role": "assistant", "content": "Get/set pixel ratio of the image. This does NOT affect the content of the image, only how it is interpreted when it is drawn onto a View or another Image. For example, in a high DPI context, the...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `NdefGui`." }, { "role": "assistant", "content": "```supercollider\n(\np = ProxySpace.push(s.boot);\n\nl = NdefGui(nil, 3).moveTo(10, 120);\nm = NdefGui(nil, 3).moveTo(10, 240);\nn = NdefGui(nil, 3).moveTo(10, 360);\no...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `Pmul`. 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": "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{\n# x,y,z = RosslerL.ar(MouseX.kr(1, 200));\nPan2.ar(Pulse.ar(x.range(100,1000), y.range(0,1), 0.3), z)\n}.play(s)\n```" }, { "role": "assistant", "content": "A c...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `FOS`." }, { "role": "assistant", "content": "```supercollider\n(\n// same as OnePole\n{ var x;\n x = LFTri.ar(0.4, 0, 0.99);\n FOS.ar(LFSaw.ar(200, 0, 0.2), 1 - x.abs, 0.0, x)\n}.play;\n);\n\n(\n// same as OneZero\...
[ { "role": "user", "content": "What does `Mx.removeChannel` do? What arguments does it take?" }, { "role": "assistant", "content": "A mixer and dynamic patching Arguments: index." } ]
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\nNdef(\\nodeTest, {\n // the input\n var input = Impulse.ar([1, 3, 5].reciprocal, phase: [0, 0.133, 0.5]).sum;\n\n // the nodes, each takes its predecessor as input and estimates the duration between two events. \n...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `NdefGui`." }, { "role": "assistant", "content": "```supercollider\n(\np = ProxySpace.push(s.boot);\n\nl = NdefGui(nil, 3).moveTo(10, 120);\nm = NdefGui(nil, 3).moveTo(10, 240);\nn = NdefGui(nil, 3).moveTo(10, 360);\no...
[ { "role": "user", "content": "Build a slowly evolving drone with Ndef." }, { "role": "assistant", "content": "Ndef gives you a named patch you can redefine while it plays; the filter is a separate node in the\nchain so you can change it on its own.\n\n```supercollider\n(\nNdef(\\drone, { |freq =...
[ { "role": "user", "content": "Show another SuperCollider example using `Symbol`." }, { "role": "assistant", "content": "```supercollider\na = { Ringz.ar(T2A.ar(\\trig.tr), \\freq.kr(500, 1), 0.8) }.play;\na.set(\\freq, 330, \\trig, 1);\na.set(\\freq, 830, \\trig, 1);\na.release;\n```" } ]
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n//distortion creeps in under 200Hz\n{ DPW3Tri.ar(XLine.kr(2000, 20, 10)) }.play; \n\n//very fast sweeps can have transient distortion effects\n{ DPW3Tri.ar(MouseX.kr(200,12000,'exponential')) }.play;\n\n//compare:\n{LFTri...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Integrator.ar(LFPulse.ar(300, 0.2, 0.1), MouseX.kr(0.001, 0.999, 1)) }.play\n\n// used as an envelope\n{ Integrator.ar(LFPulse.ar(3, 0.2, 0.0004), 0.999, FSinOsc.ar(700), 0) }....
[ { "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": "Write a minimal SuperCollider example that uses `LFDNoise1`." }, { "role": "assistant", "content": "```supercollider\n// try wiggling mouse quickly;\n// LFNoise frequently seems stuck, LFDNoise changes smoothly.\n\n{ SinOsc.ar(LFNoise1.ar(MouseX.kr(0.1, 1000, 1), 2...
[ { "role": "user", "content": "What is `BHiPass`?" }, { "role": "assistant", "content": "BHiPass — 12db/oct rolloff - 2nd order resonant Hi Pass Filter" }, { "role": "user", "content": "What does `BHiPass.sc` do?" }, { "role": "assistant", "content": "calculate filter coef...
[ { "role": "user", "content": "What does `Instr.singleNameAsNames` do? What arguments does it take?" }, { "role": "assistant", "content": "private converts dotNotation to symbolized Arguments: singleName." } ]
[ { "role": "user", "content": "Write a kick drum with a 0.18 s decay. (osc fm, sweep 0.06, decay 0.18, f0 180, 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 minimal SuperCollider example that uses `WhiteNoise`." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-WhiteNoise\", { |out = 0|\n Out.ar(out,\n WhiteNoise.ar(0.25)\n )\n}).play;\n)\n```" } ]
[ { "role": "user", "content": "What does `MAbstractElement.kr` do? What arguments does it take?" }, { "role": "assistant", "content": "Use the value directly on the server (on a Arguments: server — optional argument that you only have to set once, and only if the server for the bus is not Server#...
[ { "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": "Explain this SuperCollider code.\n```supercollider\n(\n~loDev = -6;\n~hiDev = 5;\n~lookBack = 2;\n\np = Pbind(\n \\dur, 0.2,\n \\midinote, PIdev(72, 11, Pfunc { ~loDev }, Pfunc { ~hiDev }, Pfunc { ~lookBack }).trace(prefix: \"midi \"),\n).play;\n);\n\n// change on the fly\n//...
[ { "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 = Drand([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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// logistic map as frequency control\n(\n{ var r;\n r = MouseX.kr(3.5441, 4); // stable range\n SinOsc.ar(QuadC.ar(40, r.neg, r, 0, 0.1, 800, 900)) * 0.4;\n}.play(s);\n```" ...
[ { "role": "user", "content": "What is `InstrBrowser` in SuperCollider?" }, { "role": "assistant", "content": "InstrBrowser — Browse your instrument library, with customizable actions Category: Libraries > crucial > Instr." } ]
[ { "role": "user", "content": "Write a SuperCollider patch that uses `Event` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\\pm, { |out = 0, freq = 440, amp = 0.1, pan = 0, gate = 1, ratio = 1, index = 1, ar = 0.1, dr = ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// Compare:\n\n{ WhiteNoise.ar(0.25) }.play;\n\n{ BPZ2.ar(WhiteNoise.ar(0.25) }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the pa...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\ns.boot;\n// Simple polling of mean values - you could do this without a UGen!\nx = {|val=1, t_trig=0| MeanTriggered.kr(val, t_trig, 3).poll(t_trig, \"Mean of recent 3 values\"); }.play;\nx.set(\\val, 10.rand.postln, \\t_t...
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-Dust\", { |out = 0|\n Out.ar(out,\n Dust.ar(200, 0.5)\n )\n}).play;\n);\n\n(\nSynthDef(\"help-Dust\", { |out = 0|\n Out.ar(out,\n Dust.ar(XLine.kr(200...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `TwoZero`." }, { "role": "assistant", "content": "```supercollider\n{ TwoZero.ar(WhiteNoise.ar(0.125), XLine.kr(20, 20000, 8), 1) }.play\n```" } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `WhiteNoise`." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-WhiteNoise\", { |out = 0|\n Out.ar(out,\n WhiteNoise.ar(0.25)\n )\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 150, f1 55, amp 0.8, rev 0)" }, { "role": "assistant", "content": "A kick is a sine with a fast pitch drop and a short amplitude envelope:\n\n```supercollider\n// kick drum: sine oscillator...
[ { "role": "user", "content": "What is `ErrorWrapper` in SuperCollider?" }, { "role": "assistant", "content": "ErrorWrapper — Error used to wrap another error Used to wrap an existing error, providing more context through the `what` string while preserving the original backtrace. It can be nested...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `PV_BinScramble`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\nb = Buffer.read(s, ExampleFiles.child);\n\n(\n// trig with MouseY\nSynthDef(\"help-binScramble\", { |out = 0, soundBufnum = 2|\n var ...
[ { "role": "user", "content": "How do I granulate a sample with 0.04 s grains? (rate 14, dur 0.04, interp 2, mode sweep, rev 0)" }, { "role": "assistant", "content": "Granulation is `GrainBuf` plus a trigger rate; the position can move:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.w...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\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 `Node` in SuperCollider?" }, { "role": "assistant", "content": "Node — Abstract superclass of Synth and Group This class is the abstract super class of Synth and Group, which represent synth and group nodes on the server. Node objects are not made explicitly...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\n// Three nodes in this data. First is always the root.\n// So the first is applied to decide whether to branch down to the second or third.\n// Then those nodes decide whether to classify the datum as 1/2/3/4.\n~treeda...