conversations
listlengths
2
6
[ { "role": "user", "content": "What does `Int16Array.readFromStream` do?" }, { "role": "assistant", "content": "an array whose indexed slots are all of the same type" } ]
[ { "role": "user", "content": "What is `Breakcore` in SuperCollider?" }, { "role": "assistant", "content": "Breakcore — breakcore simulator This is noisy. Category: UGens > Generators > Chaotic." } ]
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// Since the allpass delay has no audible effect as a resonator on\n// steady state sound ...\n\n{ AllpassL.ar(WhiteNoise.ar(0.1), 0.01, XLine.kr(0.0001, 0.01, 20), 0.2) }.play;\n\n// ...these examples add the input to th...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{\n var f, sf, g;\n sf = LFPulse.ar(0.6, 0.2, 0.5);\n g = MouseY.kr(0.1, 10, 1);\n d = MouseX.kr(0.0001, 1, 1);\n f = Ball.ar(sf, g, d);\n f = f * 140 + 400;\n SinOsc.a...
[ { "role": "user", "content": "What does `SimpleNumber.lgamma` do?" }, { "role": "assistant", "content": "Returns the natural logarithm of the gamma" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Streson.ar(LFSaw.ar([220, 180], 0, mul:EnvGen.kr(Env.asr(0.5, 1, 0.02), 1.0) * 0.2), LinExp.kr(LFCub.kr(0.1, 0.5*pi), -1, 1, 280, 377).reciprocal, 0.9, 0.3 }.play\n```" }, ...
[ { "role": "user", "content": "What are the arguments of EnvGen?" }, { "role": "assistant", "content": "`EnvGen.ar(envelope, gate, levelScale, levelBias, timeScale, doneAction)` — or the .kr form. Envelope is an Env; gate is the signal that holds the envelope open (a number for a one-shot, a trig...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ LFSaw.ar(500, 1, 0.1) }.play\n\n// used as both Oscillator and LFO:\n{ LFSaw.ar(LFSaw.kr(4, 0, 200, 400), 0, 0.1 }.play\n```" }, { "role": "assistant", "content": "...
[ { "role": "user", "content": "What is the difference between ~foo and a local variable?" }, { "role": "assistant", "content": "`var foo` is a local: it exists only inside the function or file block that declares it. `~foo` is an environment variable: it lives in the current Environment, survives...
[ { "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": "Give me a sine kick with a 0.06 s pitch sweep. (osc sine, sweep 0.06, decay 0.18, f0 220, f1 40, 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: sine os...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `ReplaceOut`." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"ReplaceOutHelp\", { |out = 0, freq = 440|\n var source;\n source = SinOsc.ar(freq, 0, 0.1);\n\n // write to the bus, replacing...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nx = { SinOsc.ar(440, 0, 0.3) }.asDefName; // this must complete first\ny = Synth(x;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the pare...
[ { "role": "user", "content": "What is `SystemSynthDefs`?" }, { "role": "assistant", "content": "SystemSynthDefs — SynthDefs assumed to exist on the server" }, { "role": "user", "content": "What does `SystemSynthDefs.numChannels` do?" }, { "role": "assistant", "content": "...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `Dwhite`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a, freq, trig;\n a = Dwhite(0, 15, inf);\n trig = Impulse.kr(MouseX.kr(1, 40, 1));\n freq = Demand.kr(t...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\ns = Server.local;\nServer.default = s;\ns.boot;\n);\n\n// definition for future reference in arbitrary Environments\n\np = PLtuple(\\a);\n\n\n// prepare current Environment\n// PLtuple defaults to repeats = inf,\n// so...
[ { "role": "user", "content": "What does `UnicodeResponder.remove` do?" }, { "role": "assistant", "content": "register responder functions for unicode and modifier combinations" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\ns.bind {\n a = { |freq = 100| SinOsc.ar(freq, LFTri.ar(freq)) * 0.2 }.play;\n s.sync;\n a.set(\\freq, 400);\n}\n```" }, { "role": "assistant", "content": "A clo...
[ { "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": "Write a minimal SuperCollider example that uses `DigitalIn`." }, { "role": "assistant", "content": "```supercollider\n// turn on and off a sine oscillator\n\n(\nSynthDef(\"help-DigitalIn\", { |out = 0|\n Out.ar(out,\n SinOsc.ar(500, 0, 0.1 * DigitalIn.ar(0))\n ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ var source = SinOsc.ar(40); var env = EnvFollow.ar(source, 0.999); [source,env] }.plot(0.5)\n\n\n{ var source = SoundIn.ar; var env = EnvFollow.ar(source, MouseX.kr(0.9,0.999);...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n//Chaos engine hum\n(\n{\n SinOsc.ar(10 + (50 * SinOsc.kr([50, 51], 0, SinOsc.kr(101, Saw.kr(0.12345, 678, 9), 0.2, 0.8), Pulse.kr([25, 25.5], 0.25, 0.125, -0.25))), 0, 0.5, 0);\n}.play();\n)\n```" }, { "role": ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Resonz`." }, { "role": "assistant", "content": "```supercollider\n{ Resonz.ar(WhiteNoise.ar(0.5), 2000, 0.1) }.play\n\n// modulate frequency\n{ Resonz.ar(WhiteNoise.ar(0.5), XLine.kr(1000, 8000, 10), 0.05) }.play\n\n/...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `Dxrand`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a, freq, trig;\n a = Dxrand([1, 3, 2, 7, 8], inf);\n trig = Impulse.kr(MouseX.kr(1, 400, 1));\n freq ...
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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.set(\\freq, 880, \\out, 1); // two pairs\nx.set(0, 660...
[ { "role": "user", "content": "Write a closed hi-hat in SuperCollider." }, { "role": "assistant", "content": "High-passed noise with a very short envelope — the filter is what makes it a hat rather than a hiss.\n\n```supercollider\n(\nSynthDef(\\hat, { |out = 0, amp = 0.3, dur = 0.06|\n var en...
[ { "role": "user", "content": "Show another SuperCollider example using `Duty`." }, { "role": "assistant", "content": "```supercollider\n(\n {\n var freq;\n freq = Duty.kr(\n Dseq([0.2, 0.3, 0.4, Dseq([1, 1, 1, 2, 1, 2], inf)]) / 2,\n Dust.kr(1), // control rate reset\n ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nNdef(\\lfo2, { LFNoise1.kr(LFNoise1.kr(0.1).exprange(1, 300) ! 2, 400, 800) });\nNdef(\\sound, { Blip.ar(Ndef.kr(\\lfo2), 30) * 0.2 }).play;\n\nNdef(\\lfo2, { [MouseX.kr(10, 300,...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `IFFT`." }, { "role": "assistant", "content": "```supercollider\n// without any modification, convert FFT chain (frequency domain signal) back to audio (time domain signal)\n(\n{ var in, chain;\n in = WhiteNoise.a...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `BinaryOpUGen` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\na = WhiteNoise.ar; // a WhiteNoise\nb = a + 2; // a BinaryOpUGen.\nb.operator; // +\n\n// sound exampl...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// We'll hear the sawtooth wave when the two sine oscillators are both in the region x = 0.0 to 0.5, y = 0.5 to 1.0\n(\n{\n InRect.ar(\n SinOsc.ar(1), SinOsc.ar(1.3), Rect(0, 0.5, 0.5, 0.5)\n ) * LFSaw.ar(44, 0, 0.1)...
[ { "role": "user", "content": "What does `Fb1_Duffing.kr` do? What arguments does it take?" }, { "role": "assistant", "content": "Creates a new Fb1_Duffing kr Arguments: f — Defaults to 0.; alpha — Defaults to 0.; beta — Defaults to 1.; gamma — Defaults to 1.; delta — Defaults to 1.; omega — Defa...
[ { "role": "user", "content": "What does `SimpleNumber.legendreP` do?" }, { "role": "assistant", "content": "Returns the Legendre Polynomial of the first kind. Requires -1 <= `x` <=" } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `QuadN`." }, { "role": "assistant", "content": "```supercollider\n// default params\n{ QuadN.ar(SampleRate.ir/4) * 0.2 }.play(s);\n```" } ]
[ { "role": "user", "content": "What is `SmoothFoldS2` in SuperCollider?" }, { "role": "assistant", "content": "SmoothFoldS2 — wave folding pseudo ugen using sine segments, two fold ranges Wave folding using SmoothClipS. Values outside the range lo-hi are folded back, if the concerned foldRange > ...
[ { "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(QuadN.ar(40, r.neg, r, 0, 0.1, 800, 900)) * 0.4;\n}.play(s);\n```" ...
[ { "role": "user", "content": "Write a Pbind whose degrees repeat every Pwalk cycle. (scale majorPentatonic, seq Pwalk, dur 0.2, octave 5, instr sine, 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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Blip.ar(Blip.kr(4, 5, 500, 60), 59, 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{ 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": "What does `Pdef.condition` do?" }, { "role": "assistant", "content": "Provide a condition under which the pattern is switched when a new one is inserted. The stream value and a count value is passed into the" } ]
[ { "role": "user", "content": "What is the difference between \\degree, \\midinote and \\freq in a Pbind?" }, { "role": "assistant", "content": "`\\freq` is the frequency in Hz and is used as-is. `\\midinote` is a MIDI note number, converted to frequency by the default instrument. `\\degree` is a...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `LFClipNoise` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\nx = { var inA, chainA, chainB;\n inA = LFClipNoise.ar(100);\n chainA = FFT(LocalBuf(2048, 1), inA)...
[ { "role": "user", "content": "What does `UScoreEditor.muteEvents` do? What arguments does it take?" }, { "role": "assistant", "content": "(describe method Arguments: events — (describe argument here). Returns: (returnvalue)" } ]
[ { "role": "user", "content": "Explain `SoundFileFormats` in SuperCollider briefly." }, { "role": "assistant", "content": "SoundFileFormats — a widget for selecting SoundFile format for recording `(` Category: Libraries > crucial > GUI." } ]
[ { "role": "user", "content": "What is `Rest`?" }, { "role": "assistant", "content": "Rest — Represents a rest in event patterns" }, { "role": "user", "content": "What does `Rest.new` do?" }, { "role": "assistant", "content": "Create an instance of Rest, with a value to be...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n//code that utilizes the glitch.\n//warning! extremely loud.\n//note: might not sound the same on all soundcards\n(\n{GlitchHPF.ar(\n BrownNoise.ar(1.dup),\n 0.5,\n Saw.kr(1,...
[ { "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": "What is `Fb1_MSD` in SuperCollider?" }, { "role": "assistant", "content": "Fb1_MSD — mass spring damper model pseudo ugen Fb1_ODE wrapper for the mass spring damper equation of motion: Category: Libraries > miSCellaneous > Nonlinear." } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `FBSineC`." }, { "role": "assistant", "content": "```supercollider\n// default initial params\n{ FBSineC.ar(SampleRate.ir/4) * 0.2 }.play(s);\n```" } ]
[ { "role": "user", "content": "Who made you?" }, { "role": "assistant", "content": "I am sc-mind, trained by this repository from a six-source SuperCollider corpus and a supervised set whose code answers were compiled with sclang before they were written." } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `UnaryOpUGen`." }, { "role": "assistant", "content": "```supercollider\na = WhiteNoise.ar; // a WhiteNoise\nb = a.squared; // a UnaryOpUGen.\nb.operator; // squared\n\n// sound example\n\n{ var a = LFSaw.ar(300).range(...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// world's most expensive patchcord (use headphones to avoid feedback)\n{ SoundIn.ar(0) }.play;\n\n// stereo version\n{ SoundIn.ar([0, 1]) }.play;\n\n// scope input; silent outpu...
[ { "role": "user", "content": "Give me a granular patch with noise grain position and interp 4. (rate 14, dur 0.2, interp 4, mode noise, rev 1)" }, { "role": "assistant", "content": "Granulation is `GrainBuf` plus a trigger rate; the position can move:\n\n```supercollider\n// granular synth with ...
[ { "role": "user", "content": "Explain `Updater` in SuperCollider briefly." }, { "role": "assistant", "content": "Updater — simple MVC utility; calls an update handler when the model changes A simple utility object that adds itself as a dependant on a model and calls the handler whenever the mode...
[ { "role": "user", "content": "Give me an Ndef with an LFO at 0.8 Hz. (ugens sine, cutoff 2400, lfo 0.8, freq 165, amp 0.12)" }, { "role": "assistant", "content": "Use `Ndef` when the patch has to change without stopping:\n\n```supercollider\n// Ndef drone: sine source through a 2400 Hz low-pass\...
[ { "role": "user", "content": "What is `RedSamp` in SuperCollider?" }, { "role": "assistant", "content": "RedSamp — playing buffers This class uses PlayBuf to play back parts of a buffer. With `overlap` one can set the number of voices. It uses the same interface as RedDiskInSampler and RedSample...
[ { "role": "user", "content": "How do I build a live drone with Ndef at 220 Hz? (ugens blip, cutoff 1400, lfo 0.1, freq 220, 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: blip source throug...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `BufSampleRate`." }, { "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 Hz tone (right)\n// the apollo samp...
[ { "role": "user", "content": "How do I put a pluck in a reverb at mix 0.45? (verb freeverb, room 0.7, damp 0.5, mix 0.45, source pluck)" }, { "role": "assistant", "content": "A send-style patch: dry signal plus the reverb on the tail:\n\n```supercollider\n// reverb: freeverb on a pluck\n(\nSynth...
[ { "role": "user", "content": "How do I play a random minorPentatonic scale at octave 6? (scale minorPentatonic, seq Prand, dur 0.4, octave 6, instr sine, root 0)" }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nSynth...
[ { "role": "user", "content": "Explain `InRange` in SuperCollider briefly." }, { "role": "assistant", "content": "InRange — Tests if a signal is within a given range. If `lo ≤ in ≤ hi`, output 1.0, otherwise output 0.0. Category: UGens > Maths." } ]
[ { "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 BLowPass.ar(\n SoundIn.ar([0, 1]),\n MouseX.kr(10, 20000, \\exponential), // cutoff freq.\n MouseY.kr(0.0, 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{ 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": "How big are you?" }, { "role": "assistant", "content": "198.42M parameters in total, 63.94M active per token. Eight layers, 768 wide, four experts with top-1 routing, and a 6,400-token vocabulary." } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `NodeProxy`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\na = NodeProxy.new.play; // play to hardware output.\na.fadeTime = 2; // fadeTime specifies crossfade\n// set the source\na.source = { Sin...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Lag2`." }, { "role": "assistant", "content": "```supercollider\n(\n// used to lag pitch\n{\n SinOsc.ar( // sine wave\n Lag2.kr( // lag the modulator\n LFPulse.kr(4, 0, 0.5, 50, 400), // frequency mod...
[ { "role": "user", "content": "Write an Ndef with a tri source and a 3200 Hz low-pass. (ugens tri, cutoff 3200, lfo 0.3, freq 110, 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 ...
[ { "role": "user", "content": "Write a Pbind whose degrees repeat every Pshuf cycle. (scale minorPentatonic, seq Pshuf, dur 0.3, 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```supercol...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `HilbertFIR`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\ns.scope;\na = { HilbertFIR.ar(SinOsc.ar(100) * -20.dbamp, LocalBuf(2048)) }.play;\na.release;\n```" } ]
[ { "role": "user", "content": "What does `SplineMapper.makeBuf` do? What arguments does it take?" }, { "role": "assistant", "content": "Makes a LocalBuf containing the transfer Arguments: divisions — Number of points in the interpolation; dimension — 0: x is input, y is output 1: y is input, x is...
[ { "role": "user", "content": "How do I add a reverb send to a whole group?" }, { "role": "assistant", "content": "Same shape as the delay: a private stereo bus, one effect reading it, instruments writing both dry\nand wet.\n\n```supercollider\n(\n~verbBus = Bus.audio(s, 2);\nSynthDef(\\verb, { |...
[ { "role": "user", "content": "What is `PV_ConformalMap` in SuperCollider?" }, { "role": "assistant", "content": "PV_ConformalMap — Complex plane attack. Applies the conformal mapping Category: UGens > FFT." } ]
[ { "role": "user", "content": "Explain `PLFTri` in SuperCollider briefly." }, { "role": "assistant", "content": "PLFTri — UGenPatterns quark library Based on LFTri Category: Streams-Patterns-Events > UGenPatterns > Generators." } ]
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n// augmentation of nonlinearity:\n// GFIS itself used as time-varying control of another GFIS\n\nb = Buffer.read(s, Platform.miSCellaneousDirs[0] +/+ \"Sounds\" +/+ \"kitchen_sounds_1.wav\");\n\n// load to array and fill new b...
[ { "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 `File.delete` do?" }, { "role": "assistant", "content": "Deletes the file at that path. Use only for good, never for Returns: a Boolean, as follows:" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// stepper cycles between 0 and 1, average hovers around 0.5\na = { AverageOutput.kr(Stepper.kr(Impulse.kr(1), min: 0, max: 1).poll }.play;\n\na.free;\n```" }, { "role": ...
[ { "role": "user", "content": "Give me a sine kick with a 0.06 s pitch sweep. (osc sine, sweep 0.06, decay 0.18, f0 180, f1 40, amp 0.8, rev 1)" }, { "role": "assistant", "content": "The pitch envelope is what makes it read as a drum, not the oscillator:\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\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": "What does `BlitB3Saw.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "BLIT derived sawtooth Arguments: freq — Maximum frequency is a period of 4 samples, so a quarter of the sampling rate. You may start to hear aliasing over 5000 Hz or so,...
[ { "role": "user", "content": "Write a granular texture, through a reverb. (rate 16, dur 0.04, interp 4, mode noise1, rev 1)" }, { "role": "assistant", "content": "Granulation is `GrainBuf` plus a trigger rate; the position can move:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.wait...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Dreset`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a, freq;\n a = Dreset(Dseries(0, 2, inf), Drand([0, 0, 0, 1], inf));\n freq = Duty.kr(1/MouseX.kr(1, 40, 1), 0, a) * 30 + 340;\n SinOsc....
[ { "role": "user", "content": "Explain `RandID` in SuperCollider briefly." }, { "role": "assistant", "content": "RandID — Set the synth's random generator ID. Choose which random number generator to use for this synth. All synths that use the same generator reproduce the same sequence of numbers ...
[ { "role": "user", "content": "What is `IRand` in SuperCollider?" }, { "role": "assistant", "content": "IRand — Single integer random number generator. Generates a single random integer value in uniform distribution from `lo` to `hi` . It generates this when the SynthDef first starts playing, and...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `Pan2` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\ng = Group.new;\n\n// make 4 synths in g\n// 1.0.rand2 returns a random number from -1 to 1.\n4.do({ { arg amp ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// Add two NodeProxies\nNdef(\\x, { SinOsc.ar(440, 0, 0.2) });\nNdef(\\y, { PinkNoise.ar(0.1) });\nNdef(\\z, Ndef(\\x) + Ndef(\\y).play;\n```" }, { "role": "assistant", ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LFDClipNoise`." }, { "role": "assistant", "content": "```supercollider\n// try wiggling the mouse quickly;\n// LFNoise frequently seems stuck, LFDNoise changes smoothly.\n\n{ LFClipNoise.ar(MouseX.kr(0.1, 1000, 1), 0....
[ { "role": "user", "content": "Write a Pbind whose degrees repeat every Prand cycle. (scale minorPentatonic, seq Prand, dur 0.25, octave 5, 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": "Explain `PitchShift` in SuperCollider briefly." }, { "role": "assistant", "content": "PitchShift — Time domain pitch shifter. A time domain granular pitch shifter. Grains have a triangular amplitude envelope and an overlap of 4:1, and use linear interpolation of the...
[ { "role": "user", "content": "What does `Collection.maxSizeAtDepth` do? What arguments does it take?" }, { "role": "assistant", "content": "Returns the maximum size of all subcollections at a certain depth Arguments: rank — The depth at which the size of the collection is measured `Set[Set[1, 2,...
[ { "role": "user", "content": "How do I play a random majorPentatonic scale at octave 6? (scale majorPentatonic, seq Pshuf, dur 0.3, octave 6, 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```supe...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\n//Its not the spline that loops (that would be a loop in 2 dimensional space) but the SplineGen that is set to loop.\n\n// the spline does NOT loop,\nb = BSpline( Array.fill(16,{ arg i; [ i * 0.25,1.0.rand ] }), 3.0,fa...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `LFSaw`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n(\nfork {\n ~group = Group();\n\n 2.wait;\n\n SynthDef(\\buzz, {\n |out = 0, freq = 300, amp = 0.1, filter = 1....
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `Node`. Define every value it uses." }, { "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);...
[ { "role": "user", "content": "Write a Pbind in minorPentatonic using Pshuf for the degrees." }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nSynthDef(\\pluck, { |out = 0, freq = 440, amp = 0.2|\n var env = EnvGen....
[ { "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(QuadL.ar(40, r.neg, r, 0, 0.1, 800, 900)) * 0.4;\n}.play(s);\n```" ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Blip.ar(LFNoise0.kr(9, 400, 500), 4, 0.2 }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never c...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\na = { |x, root = 60| x + root }; b = a.midicps; [a.value(9), b.value(9)];\na = Pseries(60, 1, inf).midicps; a.asStream.nextN(12);\n{ a = LFNoise1.ar(1) * 5 + 60; Pulse.ar(a.round...
[ { "role": "user", "content": "Write an Ndef at 220 Hz I can retune while it plays. (ugens saw, cutoff 400, lfo 0.3, freq 220, 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 throu...