conversations
listlengths
2
6
[ { "role": "user", "content": "Explain `Pkey` in SuperCollider briefly." }, { "role": "assistant", "content": "Pkey — access a key in an event stream Pkey simplifies backward access to values in an event being processed by Pbind or another event pattern. Category: Streams-Patterns-Events > Patter...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// linlin\n(\n{\n var mod = LFNoise2.ar(80);\n SinOsc.ar(mod.linlin(-1, 1, MouseX.kr(200, 8000, 1), MouseY.kr(200, 8000, 1))) * 0.1\n}.play;\n);\n\n// range\n(\n{\n var mod = ...
[ { "role": "user", "content": "Give me an Ndef with an LFO at 0.3 Hz. (ugens sine, cutoff 800, lfo 0.3, 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": "Write a self-contained SuperCollider patch that uses `InFeedback`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-InFeedback\", { |out = 0, in = 0|\n var input, sound;\n input = InFeedback.ar(in, 1);\n ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `XFade2`." }, { "role": "assistant", "content": "```supercollider\n{ XFade2.ar(Saw.ar, SinOsc.ar, LFTri.kr(0.1)) }.play\n```" } ]
[ { "role": "user", "content": "What does `MxUnit.didLoad` 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": "Explain `ServerTree` in SuperCollider briefly." }, { "role": "assistant", "content": "ServerTree — register actions to be taken to initialise a basic tree of groups on the server The singleton ServerTree provides a place for registering functions and objects for eve...
[ { "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": "Show another SuperCollider example using `Control`." }, { "role": "assistant", "content": "```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]...
[ { "role": "user", "content": "What does `ServerLogGui.cmd_snew` do? What arguments does it take?" }, { "role": "assistant", "content": "the interface for display and searching the ServerLog Arguments: msg; r. Returns: (returnvalue)" } ]
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\n// timing offset = 0\np = Pbind(\\freq, 440, \\pan, -1, \\delta, 1.0, \\sustain, 0.1).play(quant: [2, 0, 0]);\n// timing offest = 0.1\nq = Pbind(\\freq, 880, \\pan, 1, \\delta, 0.5, \\sustain, 0.1).play(quant: [2, 0, 0...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{ SinOsc.ar(\n SinOsc.ar(\n XLine.kr(1, 100, 5)).exprange(*XLine.kr([20, 800], [7000, 200], 10)\n )\n ) * 0.1\n\n}.play;\ns.record(duration: 10);\n```" }, { "...
[ { "role": "user", "content": "How do I granulate a sample with 0.1 s grains? (rate 10, dur 0.1, interp 2, 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": "Show me a self-contained SuperCollider patch using `Dshuf`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a, freq, trig;\n a = Dseq([Dshuf([1, 3, 2, 7, 8.5], 3)], inf);\n trig = Impulse.kr(MouseX.kr(1, 40, 1))...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `Dseries` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a, freq, trig;\n a = Dseries(0, 1, 15);\n trig = Impulse.kr(MouseX.kr(1, 40, 1));\n freq = D...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n// proceed with caution. start at min volume, and not with your expensive speakers.\n\nfork{b=Buffer.alloc(s,512,1);inf.do{b.cheby({[1,0].choose}!2);{(Shaper.ar(b,SinOsc.ar(55,0,Line.kr(1,0,2,1,0,2))))!2}.play;0.1.wait;}...
[ { "role": "user", "content": "What does `CCBank.guiBody` do? What arguments does it take?" }, { "role": "assistant", "content": "a set of named MIDI CCResponders Arguments: layout." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.boot;\n(\nz = {\n BHiPass4.ar(\n SoundIn.ar([0, 1]),\n MouseX.kr(10, 20000, \\exponential), // cutoff freq.\n MouseY.kr(0.1, 1.0, \\linear), // rq\n 0.5); // mul\n...
[ { "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": "What does this SuperCollider code do?\n```supercollider\n// These examples compare the variants, so that you can hear the difference in interpolation\n\n// Comb used as a resonator. The resonant fundamental is equal to\n// reciprocal of the delay time.\n{ CombN.ar(WhiteNoise.ar...
[ { "role": "user", "content": "What does `MassEditUChain.duration` do? What arguments does it take?" }, { "role": "assistant", "content": "(describe method Arguments: x — (describe argument here). Returns: (returnvalue)" } ]
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `Pmulp` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n// sound example\n(\nSynthDef(\\sinegrain,\n { |out = 0, freq = 440, sustain = 0.02|\n var env;\n env = EnvGen.kr(Env.perc(0...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// an envelope in a synth\n(\n{\n var env = Env([0, 1, 0.5, 1, 0], [0.01, 0.5, 0.02, 0.5]);\n SinOsc.ar(470) * EnvGen.kr(env, doneAction: Done.freeSelf)\n}.play\n);\n// an enve...
[ { "role": "user", "content": "How do I build a live drone with Ndef at 110 Hz?" }, { "role": "assistant", "content": "`Ndef` is a named proxy you can redefine while it is playing:\n\n```supercollider\n// Ndef drone: sine source through a 400 Hz low-pass\n(\nNdef(\\nd_sine_110_400, { |freq = 110,...
[ { "role": "user", "content": "What does `WebView.setHtml` do? What arguments does it take?" }, { "role": "assistant", "content": "Set the HTML displayed in the Arguments: A String.; A url. The browser will interpret this to be the current page location.." } ]
[ { "role": "user", "content": "Add gverb to a bell 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: gverb on a bell\n(\nSynthDef(\\reverb_synth, { |out = 0, freq = 330, amp = 0.2|\n var e...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n//Version 1\n//P(eace)Bind\n//If error messages could experience Nirvanna, it would sound like this.\n(\n{\nSaw.ar(\n freq: SinOsc.kr([60, 63, 67, 70]).range(440,880),\n mul:LFNoise0.kr(freq: [0.25,1]).range(0,1),\...
[ { "role": "user", "content": "What does `PV_ChainUGen.pvcalc2` do? What arguments does it take?" }, { "role": "assistant", "content": "The method pvcalc2 is just like #-pvcalc but can combine two FFT chains. `chain = chain.pvcalc2(chain2, numframes, func, frombin, Arguments: chain2 — The second ...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\n{\n\nvar in, fft, dissonance;\n\n//in = SinOsc.ar(MouseX.kr(100,1000),0,0.1);\n//in = Mix(SinOsc.ar([440,MouseX.kr(440,880)],0,0.1)); \nin= SoundIn.ar; \n\nfft = FFT(LocalBuf(2048), in);\n\ndissonance=SensoryDissonanc...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\nf = ();\nf.beatAndBar = {\n var t = currentEnvironment.clock; // t= TempoClock.new;\n var text = \"xB: \";\n\n var nBeatsPerBar = { arg n, beats, clock;\n var nBpb = clock.beatsPerBar * n;\n \"\" ++ n ++ te...
[ { "role": "user", "content": "Write a snare drum in SuperCollider." }, { "role": "assistant", "content": "Two ingredients: a short tonal body and band-passed noise for the rattle.\n\n```supercollider\n(\nSynthDef(\\snare, { |out = 0, amp = 0.6|\n var env = EnvGen.kr(Env.perc(0.001, 0.18, 1, -...
[ { "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 = SinOsc.ar(1).round(0.1);\n var b = SinOsc.ar(1.2).round(0.1);\n BinaryOpUGen('==', a, b) * 0.1\n}.play;\n```" }, { "role": "assistant", "conte...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\na = NodeProxy(s);\na.play;\na.source = { Pulse.ar(130, Saw.kr(0.3) * 0.1 }; // change this line while running\n```" }, { "role": "assistant", "content": "A closing br...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-WhiteNoise\", { |out = 0|\n Out.ar(out,\n WhiteNoise.ar(0.25)\n )\n}).play;\n```" }, { "role": "assistant", "content": "A closing bracket is m...
[ { "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": "What is `FoaDirectO` in SuperCollider?" }, { "role": "assistant", "content": "FoaDirectO — First Order Ambisonic (FOA) directivity transformer Adjust the soundfield directivity of a First Order Ambisonic signal (B-format) across the origin. Category: Libraries > Amb...
[ { "role": "user", "content": "How do I play a random majorPentatonic scale at octave 4? (scale majorPentatonic, seq Pwalk, dur 0.3, octave 4, instr fm, root 0)" }, { "role": "assistant", "content": "Put the scale and the degree pattern in the `Pbind` and it will pick notes for you:\n\n```superco...
[ { "role": "user", "content": "What is `TChoose` in SuperCollider?" }, { "role": "assistant", "content": "TChoose — Randomly select one of several inputs An output is selected randomly on receiving a trigger from an array of inputs. Category: UGens > Triggers, UGens > Random." } ]
[ { "role": "user", "content": "What does `AudioInPlayer.amp` do?" }, { "role": "assistant", "content": "plays the computers audio in — microphone or record busses" } ]
[ { "role": "user", "content": "Explain `VarLag` in SuperCollider briefly." }, { "role": "assistant", "content": "VarLag — Variable shaped lag Similar to Lag but with other curve shapes than exponential. A change on the input will take the specified time to reach the new value. Useful for smoothin...
[ { "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 `MultiSplineFr.setValue` do? What arguments does it take?" }, { "role": "assistant", "content": "Multi dimensional spline frame rate device Arguments: value; time." } ]
[ { "role": "user", "content": "How do I granulate a sample with 0.04 s grains? (rate 6, dur 0.04, 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(\n...
[ { "role": "user", "content": "Can I run SuperCollider without the IDE?" }, { "role": "assistant", "content": "Yes. `sclang` runs the language and `scsynth` the server, and they are separate processes by design\n— the IDE is only a client. A headless script is a `.scd` run with `sclang my-piece.s...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n// use input amplitude to control SinOsc frequency - use headphones to prevent feedback.\n{\n SinOsc.ar(\n Amplitude.kr(\n SoundIn.ar(0),\...
[ { "role": "user", "content": "Write an Ndef with a sine source and a 200 Hz low-pass. (ugens sine, 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: sine source throug...
[ { "role": "user", "content": "Give me a sine kick with a 0.06 s pitch sweep. (osc sine, sweep 0.06, decay 0.35, f0 220, f1 48, 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: sine os...
[ { "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": "What does `TaskProxy.quant` do?" }, { "role": "assistant", "content": "get or set the quantization value. can be a pair [quant," } ]
[ { "role": "user", "content": "Write a kick whose tail uses combn." }, { "role": "assistant", "content": "A send-style patch: dry signal plus the reverb on the tail:\n\n```supercollider\n// reverb: combn on a kick\n(\nSynthDef(\\reverb_synth, { |out = 0, freq = 330, amp = 0.2|\n var env = EnvG...
[ { "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 \\freq, Pn(PLgeom(\\start, \\grow, 50)) % 2000 + 400,\n...
[ { "role": "user", "content": "What is `Document` in SuperCollider?" }, { "role": "assistant", "content": "Document — Editor-specific text document editing The Document class represents a text document within the context of your text editing environment. You can use the class to programmatically ...
[ { "role": "user", "content": "Write a SuperCollider patch for Electrode Theremin (a SuperCollider snippet) that runs as it is, with nothing assumed about the session." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var saw, bpf;\n saw = Saw.ar(\n freq: 30, \n mul: SinOsc....
[ { "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": "Write a granular texture, dry. (rate 14, dur 0.07, interp 2, mode noise1, 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.waitForBoot {...
[ { "role": "user", "content": "What does `Image.setPixels` do? What arguments does it take?" }, { "role": "assistant", "content": "set the pixels in a specific portion of the receiver. Arguments: array — an Int32Array of size rect.width * rect.height containing all pixel values as 32bit Integer; ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `CuspL`." }, { "role": "assistant", "content": "```supercollider\n// vary frequency\n{ CuspL.ar(MouseX.kr(20, SampleRate.ir), 1.0, 1.99) * 0.3 }.play(s);\n\n// mouse-controlled params\n{ CuspL.ar(SampleRate.ir/4, Mouse...
[ { "role": "user", "content": "How do I play a random majorPentatonic scale at octave 4? (scale majorPentatonic, seq Pseq, dur 0.4, octave 4, instr fm, root 0)" }, { "role": "assistant", "content": "Put the scale and the degree pattern in the `Pbind` and it will pick notes for you:\n\n```supercol...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// This SynthDef has a harder attack than the default, illustrating rearticulation more clearly.\n(\nSynthDef(\\sawpulse, { |out, freq = 440, gate = 0.5, plfofreq = 6, mw = 0, ffreq = 2000, rq = 0.3, freqlag = 0.05, amp =...
[ { "role": "user", "content": "GrainBuf complains about too many grains." }, { "role": "assistant", "content": "The number of simultaneous grains is `density × dur` in seconds, and it exceeds maxGrains (512 by default). Either lower the trigger rate, shorten the grains, or raise the limit: `Grain...
[ { "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": "What does this SuperCollider patch do?\n```supercollider\n//Version 1\n//P(eace)Bind\n//If error messages could experience Nirvanna, it would sound like this.\n(\n{\nSaw.ar(\n freq: SinOsc.kr([60, 63, 67, 70]).range(440,880),\n mul:LFNoise0.kr(freq: [0.25,1]).range(0,1),\...
[ { "role": "user", "content": "What does `Collection.sum` do? What arguments does it take?" }, { "role": "assistant", "content": "Answer the sum of the items in the collection. `[3, 6, 12, 24].sum // -> 45` This can be represented Arguments: function — If provided, the Function is passed two argu...
[ { "role": "user", "content": "Write a granular texture, through a reverb. (rate 6, dur 0.1, interp 2, mode noise1, rev 1)" }, { "role": "assistant", "content": "A working granular patch, with the buffer loaded before the synth starts:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.wa...
[ { "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": "Write a minimal SuperCollider example that uses `LeastChange`." }, { "role": "assistant", "content": "```supercollider\n(\nd = { |amp = 1.0|\n var in1, in2;\n in1 = LFNoise0.ar(800, amp);\n in2 = SinOsc.ar(800);\n LeastChange.ar(in1, in2) * 0.1;\n}.play;\n);\n\n...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{\nvar a, b, t = Impulse.kr(2);\na = { Dseq([1, 2, 3, 4, 5], inf) } * 100;\nb = a + 1;\nDemand.kr(t, 0, [a, b]).poll(t\n}.play\n```" }, { "role": "assistant", "conten...
[ { "role": "user", "content": "Write a Pbind whose degrees repeat every Pshuf cycle." }, { "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 env ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `UGen`." }, { "role": "assistant", "content": "```supercollider\n{ Blip.ar(Blip.kr(4, 5, 500, 60), 59, 0.1) }.play;\n```" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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}.play;\n```" }, { "role": ...
[ { "role": "user", "content": "What does `Fb1_MSD.kr` do? What arguments does it take?" }, { "role": "assistant", "content": "Creates a new Fb1_MSD kr Arguments: f — External force. Defaults to 0.; mass — Mass. Defaults to 1.; spring — Spring stiffness. Defaults to 1.; dampen — Dampening factor. ...
[ { "role": "user", "content": "What does `HasPatchIns.setInput` do? What arguments does it take?" }, { "role": "assistant", "content": "parent class for Players that have PatchIns such as Patch Arguments: ai; ag." } ]
[ { "role": "user", "content": "What does `Tempo.clockDidClear` do?" }, { "role": "assistant", "content": "for control of tempo and for use in tempo based calculations" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// vary frequency\n{ LorenzL.ar(MouseX.kr(20, SampleRate.ir)) * 0.3 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesi...
[ { "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": "Write a minimal SuperCollider example that uses `T2K`." }, { "role": "assistant", "content": "```supercollider\n// this does not work:\n(\n{\n var trig = Dust.ar(4);\n Trig.kr(trig, 0.1) * SinOsc.ar(800) * 0.1\n}.play;\n);\n\n// this works:\n(\n{\n var trig = T2K...
[ { "role": "user", "content": "What is `FSinOsc` in SuperCollider?" }, { "role": "assistant", "content": "FSinOsc — Fast sine oscillator. Very fast sine wave generator (2 PowerPC instructions per output sample!) implemented using a ringing filter. This generates a much cleaner sine wave than a ta...
[ { "role": "user", "content": "Show another SuperCollider example using `LinLin`." }, { "role": "assistant", "content": "```supercollider\n// linlin\n(\n{\n var mod = LFNoise2.ar(80);\n SinOsc.ar(mod.linlin(-1, 1, MouseX.kr(200, 8000, 1), MouseY.kr(200, 8000, 1))) * 0.1\n}.play;\n);\n\n// range...
[ { "role": "user", "content": "How current is your SuperCollider knowledge?" }, { "role": "assistant", "content": "It comes from a snapshot of the SuperCollider repository (documentation, class library and examples) plus code I can reason about. So classes and arguments in that snapshot I know we...
[ { "role": "user", "content": "Write a granular texture, through a reverb. (rate 20, dur 0.1, 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.waitF...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// modulate frequency of a sine oscillator\n\n(\nSynthDef(\"help-MultiplexAnalogIn\", { |out = 0|\n Out.ar(out,\n SinOsc.ar(MultiplexAnalogIn.ar(0, 1).exprange(200, 5000), 0,...
[ { "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 is the node tree and what is a Group for?" }, { "role": "assistant", "content": "Everything running on the server is a node: Synths and Groups, arranged in a tree under the root group. Order matters, because audio flows through buses from earlier to later nodes...
[ { "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": "What does `SimpleNumber.ellintRc` do?" }, { "role": "assistant", "content": "Returns Carlson's Elliptic Integral RC. Requires that `x >= 0`, with at most one of them zero, and that `y !=" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{Disintegrator.ar(SinOsc.ar([400, 404], 0, 0.2), MouseX.kr(0, 1), MouseY.kr(0, 1))}.play\n\n{Disintegrator.ar(SoundIn.ar, MouseX.kr(0, 44100), MouseY.kr(0, 1)}.play\n```" }, ...
[ { "role": "user", "content": "What is `Harmonics` in SuperCollider?" }, { "role": "assistant", "content": "Harmonics — Convenient factory for filling buffers with harmonics on the server Harmonics objects are convenient factories for creating Arrays that are used to fill buffers using the b_gen ...
[ { "role": "user", "content": "What is `EaseOutInExpo` in SuperCollider?" }, { "role": "assistant", "content": "EaseOutInExpo — Exponential ease-out/in Easing equation for an exponential (2^t) ease-out/in, decelerating until halfway, then accelerating. Category: Ease." } ]
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `LinRand` that runs as it is." }, { "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 ...
[ { "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 SinOsc.ar,\n Saw.ar,\n Pulse.ar\n ];\n TChoose.ar(Dust.ar(MouseX.kr(1, 1000, 1)), a) * 0.2\n\n}.play;\n```" }, { "role": "ass...
[ { "role": "user", "content": "Show another SuperCollider example using `Amplitude`." }, { "role": "assistant", "content": "```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": "user", "content": "What does `PLbindefParEnvironment.put` do?" }, { "role": "assistant", "content": "Associates obj with Symbol key and updates the stored PLbindefEnvironments depending on the class of obj. For a SequenceableCollection items are assigned in the PLbindefEnvironments of...
[ { "role": "user", "content": "What does `KeyCodeResponder.value` do? What arguments does it take?" }, { "role": "assistant", "content": "register responder functions for keycode and modifier combinations Arguments: view; keycode; modifier; unicode." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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 list has been modi...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `Ndef`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\nNdef(\\sound, { |freq = 56, numHarm = 10| Blip.ar(freq, numHarm, 30) * 0.2 }).play;\nNdef(\\sound).set(\\freq, 15);\nNde...
[ { "role": "user", "content": "What does `Stethoscope.bounds` do? What arguments does it take?" }, { "role": "assistant", "content": "The position and size of the window. The position is relative to the bottom-left corner of the Arguments: A Rect, or any object responding to the Search#asRect#.as...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `Dust2` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-Dust2\", { |out = 0|\n Out.ar(out,\n Dust2.ar(200, 0.5)\n )\n}).play;\n);\n\n(\nSynthDef(\"help-Dust2\", { ...
[ { "role": "user", "content": "Write an Ndef with a tri 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: tri source through a 1400 Hz low-pass\n(\nNdef(\\nd_tri_220_1400, ...
[ { "role": "user", "content": "What does `Collection.matchItem` do?" }, { "role": "assistant", "content": "Returns True if this includes the item. See also" } ]
[ { "role": "user", "content": "Explain `SOMTrain` in SuperCollider briefly." }, { "role": "assistant", "content": "SOMTrain — Create (train) a Self-Organising Map This UGen trains a self-organising map (a well-known type of neural net), which is a system which learns to map a high-dimensional fee...