conversations
listlengths
2
6
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.boot;\nz = Bus.control(s, 16);\nz.setn({ |i| (i * 5).nthPrime } ! 16 * 5 + 100);\na = BusPlug.for(z);\n{ Splay.ar(SinOsc.ar(a.kr(3, MouseX.kr(0, 25))) * 0.1 }.play; // selectiv...
[ { "role": "user", "content": "What is `Gradient` in SuperCollider?" }, { "role": "assistant", "content": "Gradient — A linear color fade between two colors Category: GUI > Accessories." } ]
[ { "role": "user", "content": "Give me a granular patch with sweep grain position and interp 4. (rate 16, dur 0.04, 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 ...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// result of BufRd is used as index for the next BufRd\n// needs Buffer c prepared above\n\n(\ny = {\n GFIS.ar(\n { |x| BufRd.ar(1, c, c.numFrames * x) },\n (LFDNoise3.ar(3) * [1, 1.1]).range(0.5, 0.51), 7\n ) * 0...
[ { "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-AnalogIn\", { |out = 0|\n Out.ar(out,\n SinOsc.ar(AnalogIn.ar(0).exprange(200, 5000), 0, 0.1)\n )\n}).play;\...
[ { "role": "user", "content": "Write a kick drum in SuperCollider." }, { "role": "assistant", "content": "A pitch-swept sine with a fast decay: the frequency envelope is what makes it read as a kick.\n\n```supercollider\n(\nSynthDef(\\kick, { |out = 0, amp = 0.8|\n var pitch = EnvGen.kr(Env([1...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `BufSamples`." }, { "role": "assistant", "content": "```supercollider\n// example; this buffer is mono, so the number of samples matches the number of frames\nb = Buffer.read(s, ExampleFiles.child);\n\n// indexing with...
[ { "role": "user", "content": "Write a SuperCollider patch for Detune idea is from James Harkins. Start by defining the values the patch depends on." }, { "role": "assistant", "content": "```supercollider\n(\na = {\n |freq = 40, wid = 0.5|\n Mix(LFPulse.ar(freq *((Array.fill(40, Pxrand((1, 2..2...
[ { "role": "user", "content": "Write a GrainBuf synth at 28 grains per second. (rate 28, dur 0.04, interp 2, 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....
[ { "role": "user", "content": "What does `ArrayedCollection.bundleSize` do?" }, { "role": "assistant", "content": "Return the size of an osc bundle in bytes `a = [[\"/s_new\", \"default\", -1, \"freq\", 440], [\"/s_new\"," } ]
[ { "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": "What is the difference between Env and EnvGen?" }, { "role": "assistant", "content": "Env is a language-side description: a list of levels, times and a curve, e.g. `Env.perc(0.01, 1)` or `Env.adsr(0.01, 0.1, 0.5, 0.8)`. EnvGen is the UGen that plays it on the server...
[ { "role": "user", "content": "What does `PV_MagSmooth.new` do? What arguments does it take?" }, { "role": "assistant", "content": "Smooth spectral magnitudes over time Arguments: chain — an fft chain; factor — from 0 (no smoothing occurs) to 1 (\"infinite\" smoothing, magnitudes never change)." ...
[ { "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": "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 is `Lag3UD` in SuperCollider?" }, { "role": "assistant", "content": "Lag3UD — Exponential lag Lag3UD is equivalent to LagUD.kr(LagUD.kr(LagUD.kr(in, timeU, timeD), timeU, timeD), timeU, timeD), thus resulting in a smoother transition. This saves on CPU as you o...
[ { "role": "user", "content": "What does `Timer.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "Returns time since last triggered. Arguments: trig — A trigger occurs when trig signal crosses from non-positive to positive.." } ]
[ { "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 `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 a Buffer, and how is it different from a SoundFile?" }, { "role": "assistant", "content": "A Buffer is server-side memory: an array of samples (or a wavetable) living on scsynth, addressed by an integer bufnum. A SoundFile is a language-side object for readi...
[ { "role": "user", "content": "What does `RedTween.value` do? What arguments does it take?" }, { "role": "assistant", "content": "Perform the Arguments: t — A Float 0.0 to 1.0.." } ]
[ { "role": "user", "content": "Write a SuperCollider patch that uses `Splay` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\nx = { |spread = 1, level = 0.1, center = 0|\n var n = 20;\n var snd = Splay.ar(LFPulse.ar({ 100.exprand(...
[ { "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": "Explain `GFIS` in SuperCollider briefly." }, { "role": "assistant", "content": "GFIS — generalized functional iteration synthesis pseudo ugen The GFIS class implements functional iteration synthesis as pseudo ugen loosely based on the description by Agostino Di Scip...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n// where did I leave my keys?\n(\nvar n = 30, m = 5;\nNdef.clear(3);\nNdef.ar(\\x, n);\nNdef(\\y, { Splay.ar(Ndef.ar(\\x, m, LFNoise1.kr(1/m).range(0, n - m - 1))).clip2 * 0.5 }).play; \nNdef(\\x, { \n { \n var a = N...
[ { "role": "user", "content": "Show another SuperCollider example using `LatoocarfianL`." }, { "role": "assistant", "content": "```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,...
[ { "role": "user", "content": "Write a pluck whose tail uses freeverb2." }, { "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 pluck\n(\nSynthDef(\\reverb_synth, { |out = 0, freq = 330, amp ...
[ { "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\n{ TwoPole.ar(WhiteNoise.ar(0.005), 2000, 0.95) }.play\n\n{ TwoPole.ar(WhiteNoise.ar(0.005), XLine.kr(800, 8000, 8), 0.95) }.play\n\n{ TwoPole.ar(WhiteNoise.ar(0.005), MouseX.kr(8...
[ { "role": "user", "content": "What is `DrawGrid`?" }, { "role": "assistant", "content": "DrawGrid — Draws grid lines on a UserView for plotting" }, { "role": "user", "content": "What does `DrawGrid.draw` do?" }, { "role": "assistant", "content": "This draws to the current...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Out.ar(87, SinOsc.ar(MouseX.kr(340, 1000, 1) * [1, 2, 3], 0, 0.2)) }.play;\nx = Monitor.new.play(87, 3, 0, fadeTime: 3;\nx.vol = 0.3;\nx.stop;\n```" }, { "role": "assis...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `Convolution2L`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n// next example\n\nb = Buffer.read(s, ExampleFiles.child);\n\n(\n{\n var input = SoundIn.ar(0);\n var frame...
[ { "role": "user", "content": "What does `Cyton.accScale` do?" }, { "role": "assistant", "content": "A Float scaling factor used internally to convert from 16bit to -4 to 4 g. This factor differ for each" } ]
[ { "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": "What does `Bus.getnSynchronous` do? What arguments does it take?" }, { "role": "assistant", "content": "Get the current values of this control bus. This command is Arguments: count — The number of channels to read, starting from this bus' first channel.. Returns: Ar...
[ { "role": "user", "content": "What is `UnaryOpUGen`?" }, { "role": "assistant", "content": "UnaryOpUGen — Apply a unary operation to the values of an input ugen" }, { "role": "user", "content": "What does `UnaryOpUGen.new` do?" }, { "role": "assistant", "content": "return...
[ { "role": "user", "content": "Write a granular texture, through a reverb. (rate 14, dur 0.15, interp 2, mode noise, 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": "Give me a sine kick with a 0.06 s pitch sweep. (osc sine, sweep 0.06, decay 0.25, f0 150, 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 os...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `InTrig`." }, { "role": "assistant", "content": "```supercollider\ns = Server.local;\nb = Bus.control(s, 1);\n\nSynthDef(\"help-InTrig\", { |out = 0, busnum = 0|\n var inTrig;\n inTrig = InTrig.kr(busnum);\n Out.ar(...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LFDNoise0`." }, { "role": "assistant", "content": "```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\...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n/*\n( // PlayerBinop not yet implemented\n\nPatch(\\monosynth,[\n BeatClockPlayer.new(16) * MIDIGatePlayer.new,\n MIDIFreqPlayer.new,\n CCPlayer(50,[100,3000,\\exp,0.0,1500.0]...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n// Resonator, must subtract blockSize for correct tuning\n(\nSynthDef(\"testRes\", {\n \nvar freq = 300, localIn, input, limitLevel = 0.2, output;\nvar feedbackAmt = 0.999;\n\nfreq = MouseY.kr(20, 678, \\exponential).po...
[ { "role": "user", "content": "Explain this code:\n```supercollider\nPbind(\\degree, Pseq([0, 2, 4, 7], inf), \\dur, 0.25).play;\n```" }, { "role": "assistant", "content": "It plays a four-note major arpeggio in a loop, one note every 250 ms.\n\n`Pbind` builds an event stream: each event is the c...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-ExpRand\", { |out = 0|\n Out.ar(out,\n FSinOsc.ar(\n ExpRand(100.0, 8000.0),\n 0, Line.kr(0.2, 0, 0.01, doneAction: Done.freeSelf))\n )\n}).add;...
[ { "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": "Write an Ndef with a blip source and a 3200 Hz low-pass. (ugens blip, cutoff 3200, lfo 0.1, 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: blip source thro...
[ { "role": "user", "content": "Give me a granular patch with sweep grain position and interp 2." }, { "role": "assistant", "content": "Granulation is `GrainBuf` plus a trigger rate; the position can move:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.waitForBoot {\n var buf = Buff...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `AnalogIn`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n// modulate frequency of a sine oscillator\n\n(\nSynthDef(\"help-AnalogIn\", { |out = 0|\n Out.ar(out,\n SinOs...
[ { "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 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": "Explain `LinLin` in SuperCollider briefly." }, { "role": "assistant", "content": "LinLin — Map a linear range to another linear range Maps a linear range of values to another linear range of values. Category: UGens > Maths." } ]
[ { "role": "user", "content": "Write an Ndef at 165 Hz I can retune while it plays. (ugens tri, cutoff 2400, lfo 0.1, 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 2...
[ { "role": "user", "content": "What does `PdefGui.editString` do?" }, { "role": "assistant", "content": "a compileString that recreates the Pdef's envir at" } ]
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n//Can be very noisy, high pitched and aliases badly: e.g., great fun, but watch out for your ears, filter, try out odd param settings. I've turned all the amplitudes down in the following\n\n\n//defaults, high pitched! WA...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Blip.ar(Latch.ar(WhiteNoise.ar, Impulse.ar(9)) * 400 + 500, 4, 0.2 }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `PV_RectComb`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var sig, chain;\n sig = WhiteNoise.ar(0.2);\n chain = FFT(LocalBuf(2048), sig);\n chain = PV_RectComb(chain, 8, LFTri.kr(0.097, 0, 0.4,...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `ControlSpec`." }, { "role": "assistant", "content": "```supercollider\n// ControlSpec-map can also be used to map ugens\n(\nvar spec;\nspec = [100, 18000, \\exp].asSpec;\n{\n var freq, osc;\n osc = SinOsc.kr(0.1).ra...
[ { "role": "user", "content": "Write a granular texture, dry. (rate 16, dur 0.15, interp 4, mode noise1, 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.waitForBoot {\n ...
[ { "role": "user", "content": "Give me a Pbind with sine voices and a 0.2 rhythm. (scale majorPentatonic, seq Pwalk, dur 0.2, octave 4, 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": "Give me a sine kick with a 0.06 s pitch sweep. (osc sine, sweep 0.06, decay 0.25, 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: sine oscillator, 0.06...
[ { "role": "user", "content": "Write a kick drum with a 0.35 s decay." }, { "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.06 s pitch sweep\n(\nSynthDef(\\kick_synth, { |out = 0, amp = 0...
[ { "role": "user", "content": "What does `Instr.papply` do? What arguments does it take?" }, { "role": "assistant", "content": "partial application : fix certain args with the supplied object. returns a Arguments: ... args — either a dict or a list. if a list then non nil arguments will." } ]
[ { "role": "user", "content": "What is `Server`?" }, { "role": "assistant", "content": "Server — Object representing a server application" }, { "role": "user", "content": "What does `Server.new` do?" }, { "role": "assistant", "content": "Create a new Server instance." },...
[ { "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": "What does `RedAbstractMix.isReady` do?" }, { "role": "assistant", "content": "`true` after the server is booted and the internal mixer is added and" } ]
[ { "role": "user", "content": "I get 'Buffer UGen: no buffer data'. What does it mean?" }, { "role": "assistant", "content": "The UGen got a bufnum that the server has no data for. `Buffer.read` is asynchronous: the Buffer object exists immediately but the samples arrive later, so a Synth created...
[ { "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": "What does this SuperCollider code do?\n```supercollider\n// The finishing of a ZeroXBufRd is not detemined by finite demand rate ugens but by an overall envelope, \n// its release section is triggered by a maximum number of half wavesets ('length') or a maximum time. \n\n// Buf...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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```" }, { "role": "assista...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LatoocarfianC`." }, { "role": "assistant", "content": "```supercollider\n// default initial params\n{ LatoocarfianC.ar(MouseX.kr(20, SampleRate.ir)) * 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\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": "What is Ndef used for?" }, { "role": "assistant", "content": "Ndef is the JITLib node proxy: a named placeholder for a running signal chain that you can redefine while it plays. `Ndef(\\drone, { SinOsc.ar(55) * 0.1 }).play` starts it, and calling Ndef(\\drone, { ......
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// default initial params\n{ LinCongL.ar(MouseX.kr(20, SampleRate.ir)) * 0.2 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the p...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// write a sine oscillator's output to a pin\n\n(\nSynthDef(\"help-DigitalOut\", { |out = 0|\n DigitalOut.ar(0, SinOsc.ar(10));\n}).play;\n```" }, { "role": "assistant...
[ { "role": "user", "content": "What is `Condition`?" }, { "role": "assistant", "content": "Condition — Block the execution of a thread" }, { "role": "user", "content": "What does `Condition.new` do?" }, { "role": "assistant", "content": "Create a new instance, set the test...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `Rand`: bind everything it needs first." }, { "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....
[ { "role": "user", "content": "What does `String.drawAtPoint` do?" }, { "role": "assistant", "content": "Draws the String at the given Point using the Font and Color specified." } ]
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `Dstutter`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var freq, trig;\n var in = Dseq([1, 2, 3], inf);\n var rep = Dstutter(Diwhite(2, 8, inf), in);\n trig =...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ LFPulse.ar(50 * 0.1 }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never closed, so the express...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `ExpRand` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-ExpRand\", { |out = 0|\n Out.ar(out,\n FSinOsc.ar(\n ExpRand(100.0, 8000.0),\n ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// randomly modulate params\n(\n{ FBSineL.ar(\n LFNoise2.kr(1, 1e4, 1e4),\n LFNoise2.kr(1, 32, 33),\n LFNoise2.kr(1, 0.5),\n LFNoise2.kr(1, 0.05, 1.05),\n LFNoise2.kr(1, 0.3...
[ { "role": "user", "content": "Write a kick drum with a 0.18 s decay. (osc saw, sweep 0.06, decay 0.18, f0 180, 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: saw oscillator, ...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// start a server program from the cmdLine for testing\n~pid = unixCmd(Server.program + s.options.asOptionsString(57100));\n// kill just that server program by its pid:\nthisProcess.platform.killProcessByID(~pid);\n```" ...
[ { "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": "Explain `DelayN` in SuperCollider briefly." }, { "role": "assistant", "content": "DelayN — Simple delay line with no interpolation. Simple delay line with no interpolation. See also Category: UGens > Delays." } ]
[ { "role": "user", "content": "What is `Interpreter`?" }, { "role": "assistant", "content": "Interpreter — The interpreter defines a context in which interactive commands are compiled and executed." }, { "role": "user", "content": "What does `Interpreter.clearAll` do?" }, { "r...
[ { "role": "user", "content": "I edited a SynthDef and the running sound did not change." }, { "role": "assistant", "content": "Redefining a SynthDef only affects Synths created after the new definition reaches the server; existing instances keep the graph they were built with. Free and recreate ...
[ { "role": "user", "content": "Give me a complete SuperCollider patch for (thor magnusson) (2006) An instrumentalist inside a synthdef: bind everything it needs before it is used." }, { "role": "assistant", "content": "```supercollider\n// (thor magnusson) (2006)\n\n// An instrumentalist inside a...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// won't work (the output is 0.5*0.0), which is why we need the DC UGen!\n{ 0.5 }.play\n\n// constantly zero\n{ DC.ar(0.0) }.play;\n\n\n// DC offset; will click on start and fini...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\nb = Buffer.read(s, Platform.resourceDir +/+ \"sounds/a11wlk01.wav\");\n\n(\n{\n var snd, envTime, knee, out;\n snd = PlayBuf.ar(1, b, BufRateScale.kr(b), loop: 1);\n envTime = MouseX.kr(1.0e-3, 0.1e-3);\n kne...
[ { "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": "How do I use a metronome or check my timing?" }, { "role": "assistant", "content": "A click on the clock you are using, plus a counter to see where you are in the bar:\n\n```supercollider\n(\nTdef(\\click, {\n var count = 0;\n loop {\n (Synth(\\hat, [\\...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `ControlName`." }, { "role": "assistant", "content": "```supercollider\n(\nd = SynthDef(\\tone, { |out = 0, freq = 200|\n var sig;\n\n freq.spec = ControlSpec(20, 20000);\n sig = SinOsc.ar(freq);\n\n Out.ar(out, si...
[ { "role": "user", "content": "Resizing FreqScope?" }, { "role": "assistant", "content": "SuperCollider forum — Resizing FreqScope?\n\nOddly, this seems to work:\n\n```supercollider\n// max partial = 20 kHz\n// do not play this loudly\na = { Blip.ar(100, 200, 0.02).dup }.play;\n\nv = FreqScope(80...
[ { "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 = Dbrown2(0, 15, 1, [1, 4], inf);\n trig = Dust.kr(MouseX.kr(1, 40, 1));\n freq = Demand.kr(trig, 0, a) * 30 + 340;\n SinOsc.ar(freq) * 0.1\n\n...
[ { "role": "user", "content": "What is `DrawGrid`?" }, { "role": "assistant", "content": "DrawGrid — Draws grid lines on a UserView for plotting" }, { "role": "user", "content": "What does `DrawGrid.draw` do?" }, { "role": "assistant", "content": "This draws to the current...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch for Nuclear Fallout (a SuperCollider snippet). Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var saw, bpf;\n saw = Saw.ar(\n freq: [60,150],\n mul: LFPulse.kr(\n fr...
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n// a Buffer for the UGens to use\nb = Buffer.alloc(s, 44100, 1);\n\n// write a signal into a delay, tap it at multiple times\nSynthDef(\\write, { |buffer, cout|\n var src, tapPhase, tap1, tap2, tap3;\n src = WhiteNoise.ar(0....
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Out.ar(87, SinOsc.ar(MouseX.kr(340, 1000, 1) * [1, 2, 3], 0, 0.2)) }.play;\nx = Monitor.new.play(87, 3, 0, fadeTime: 3;\nx.vol = 0.3;\nx.stop;\n```" }, { "role": "assis...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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(Dust.ar(2), 0.1, PinkNoise.ar), bufnum: b.bufnum)\n}....