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 = WhiteNoise.ar; // a WhiteNoise\nb = a + 2; // a BinaryOpUGen.\nb.operator; // +\n\n// sound example\n(\n{\n var a = LFSaw.ar(300);\n var b = LFSaw.ar(329.1);\n a % b * 0.1...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `TChoose`." }, { "role": "assistant", "content": "```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": "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": "Write a Pbind in minorPentatonic using Pshuf for the degrees. (scale minorPentatonic, seq Pshuf, dur 0.3, octave 6, 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```s...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch for Swarm of sound files. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\nb = SoundFile.collectIntoBuffers(\"yourSoundFileFolder/*\"); // By Bjørn Houdorf, December 21, 2012\n\n(\n{\nvar...
[ { "role": "user", "content": "Explain `SOMRd` in SuperCollider briefly." }, { "role": "assistant", "content": "SOMRd — Map an input using a Self-Organising Map Once you have created a self-organising map using SOMTrain, you can query it using SOMRd. This UGen takes an input vector (i.e. multicha...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\ns.boot;\n\n(\nvar winenv;\n// a custom envelope\nwinenv = Env([0, 1, 0], [0.5, 0.5], [8, -8]);\nz = Buffer.sendCollection(s, winenv.discretize, 1);\n\nSynthDef(\\sin_grain_test, { |out, gate = 1, amp = 1, envbuf|\n var p...
[ { "role": "user", "content": "What is `UGen`?" }, { "role": "assistant", "content": "UGen — Abstract superclass of all unit generators" }, { "role": "user", "content": "What does `UGen.multiNew` do?" }, { "role": "assistant", "content": "These methods are responsible for ...
[ { "role": "user", "content": "What is `Sum3` in SuperCollider?" }, { "role": "assistant", "content": "Sum3 — Sum three signals Sum three signals. Internal ugen to efficiently mix three signals. Should be used via Mix. Category: UGens > Algebraic." } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `OnePole`." }, { "role": "assistant", "content": "```supercollider\n{ OnePole.ar(WhiteNoise.ar(0.5), 0.95) }.play\n\n{ OnePole.ar(WhiteNoise.ar(0.5), -0.95) }.play\n\n{ OnePole.ar(WhiteNoise.ar(0.5), Line.kr(-0.99, 0.9...
[ { "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": "Explain this SuperCollider code.\n```supercollider\nPdef(\\x).play;\nPdef(\\x).quant = 0; // we don't want quant here.\nPdef(\\x, Pbind(\\degree, Pseq((0..5), inf), \\dur, 0.3)).condition_({ |val, i| i.postln % 6 == 0 });\nPdef(\\x, Pbind(\\degree, Pseq((0..7) + 5.rand, inf), \...
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n// ZoomH2 records two stereo .wav files:\n// SRxxxF.wav\n// SRxxxR.wav\n// correct input for FoaEncoderMatrix.newZoomH2 is:\n\n~in = [ SRxxxR[0], SRxxxR[1], SRxxxF[0], SRxxxF[1] ]\n```" }, { "role": "assist...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ SinOsc.ar(MouseX.kr(40, 10000, 1), 0, 0.1) }.play;\n{ SinOsc.ar(MouseX.kr(500, 10000, 1).poll, 0, 0.1 }.play;\n```" }, { "role": "assistant", "content": "A closing ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `ProxySpace`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\np = ProxySpace.new;\np.fadeTime = 2; // fadeTime specifies crossfade\np[\\out].play; // monitor an empty placeholder through hardware ou...
[ { "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": "What does this SuperCollider patch do?\n```supercollider\n// By Bjørn Houdorf March 2013, Play your (short) soundfiles with some delay.\n\nb = SoundFile.collectIntoBuffers(\"yourSoundFileFolder/*\"); // 1. rund this\n\n( // 2. and then run this\nt = Task({\n({\n var num=...
[ { "role": "user", "content": "Write a GrainBuf synth at 20 grains per second. (rate 20, dur 0.04, interp 2, mode noise1, 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 `MemoRoutine.copySets` do?" }, { "role": "assistant", "content": "Instance variable getter and setter methods. If used directly the Integer copy code must be passed (see" } ]
[ { "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{ FBSineC.ar(SampleRate.ir/4) * 0.2 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis ope...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `QuadC` that runs as it is." }, { "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 QuadC.ar(SampleRate...
[ { "role": "user", "content": "How do I make a kick that starts at 220 Hz and falls to 55 Hz? (osc saw, sweep 0.06, decay 0.35, f0 220, f1 55, 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// kic...
[ { "role": "user", "content": "What is `Color` in SuperCollider?" }, { "role": "assistant", "content": "Color — An object which stores color values An object which stores red, green, blue, and alpha values in instance variables, and provides numerous class and instance methods for creating and ma...
[ { "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": "Explain `KDTree` in SuperCollider briefly." }, { "role": "assistant", "content": "KDTree — kd-tree data structure for efficient spatial search A kd-tree is a data structure for storing points in a Euclidean space. It is not optimised for data that changes (insertion...
[ { "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 BLowPass4.ar(\n SoundIn.ar([0, 1]),\n MouseX.kr(10, 20000, \\exponential), // cutoff freq.\n MouseY.kr(0.1, 1.0, \\linear), // rq - compensate for 2...
[ { "role": "user", "content": "Write a granular texture, dry. (rate 16, 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 {\n var buf = B...
[ { "role": "user", "content": "What should I ask you?" }, { "role": "assistant", "content": "SuperCollider questions: how a UGen works, how to write a SynthDef or a Pattern, why a patch does not compile. I am sc-mind, a 198M domain model, not a general assistant." } ]
[ { "role": "user", "content": "How do I play a random minorPentatonic scale at octave 4?" }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nSynthDef(\\sine_pad, { |out = 0, freq = 440, amp = 0.2|\n var env = EnvGen.k...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Dwrand`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a, freq, trig;\n a = Dwrand([0, 1, 2, 7], [0.4, 0.4, 0.1, 0.1], inf).dpoll;\n trig = Impulse.kr(MouseX.kr(1, 400, 1));\n freq = Demand.k...
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\ns.boot;\n(\n// send a synth def to server\nSynthDef(\"tpulse\", { |out = 0, freq = 700, sawFreq = 440.0|\n Out.ar(out, SyncSaw.ar(freq, sawFreq, 0.1));\n}).add;\n);\n\n// Here the defaults for *new will result in a Synth at t...
[ { "role": "user", "content": "What does `PLPZ1.new` do? What arguments does it take?" }, { "role": "assistant", "content": "UGenPatterns quark library Arguments: pattern; mul; add." } ]
[ { "role": "user", "content": "What does `MIDIIn.findPort` do?" }, { "role": "assistant", "content": "searches for a connected MIDIEndPoint by name. `// list connected" } ]
[ { "role": "user", "content": "What is `CXAbstractLabel` in SuperCollider?" }, { "role": "assistant", "content": "CXAbstractLabel — parent class for Label classes Category: Libraries > crucial > GUI > abstract." } ]
[ { "role": "user", "content": "What is `BinaryOpFunction`?" }, { "role": "assistant", "content": "BinaryOpFunction — represent a binary operation on a function" }, { "role": "user", "content": "What does `BinaryOpFunction.value` do?" }, { "role": "assistant", "content": "E...
[ { "role": "user", "content": "What is `Node`?" }, { "role": "assistant", "content": "Node — Abstract superclass of Synth and Group" }, { "role": "user", "content": "What does `Node.free` do?" }, { "role": "assistant", "content": "Stop this Node and free it from its parent...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `SelectX` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a;\n a = [\n SinOsc.ar,\n Saw.ar(300),\n Pulse.ar(230)\n ];\n\n SelectX.ar(MouseX.kr(0, 1) * a.si...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// modulating the frequency\n\n{ Saw.ar(XLine.kr(40, 4000, 6), 0.2) }.play;\n\n// two band limited sawtooth waves through a resonant low pass filter\n\n{ RLPF.ar(Saw.ar([100, 250...
[ { "role": "user", "content": "What does `SDrone.xsetFrequencies` do? What arguments does it take?" }, { "role": "assistant", "content": "convenience method for CODE.xset(\\frequencies, ...) will Arguments: arr — an array of floats in Hz.." } ]
[ { "role": "user", "content": "What is `ServerLog` in SuperCollider?" }, { "role": "assistant", "content": "ServerLog — records OSC traffic to and from a Server and displays this in a browseable searchable interface Records OSC traffic to and from a Server and displays this in a browseable search...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n//Should really only do this in NRT, but does work if low load in RT \n(\na = {\n \n~featuresave = FeatureSave.kr(SinOsc.kr,Impulse.kr(10)-0.5); \n \n}.play \n);\n\ns.send...
[ { "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": "Write an Ndef at 165 Hz I can retune while it plays. (ugens tri, cutoff 1400, lfo 0.8, freq 165, 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: tri source thro...
[ { "role": "user", "content": "Explain `LFDNoise1` in SuperCollider briefly." }, { "role": "assistant", "content": "LFDNoise1 — Dynamic ramp noise Like LFNoise1, it generates linearly interpolated random values at a rate given by the `freq` argument, with two differences: Category: UGens > Genera...
[ { "role": "user", "content": "What does `EaseInAtan.value` do? What arguments does it take?" }, { "role": "assistant", "content": "Atan ease-in Arguments: t — a Float between 0.0 and 1.0.; a — overshoot. The default is 15.." } ]
[ { "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": "What does `MembraneHexagon.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "Waveguide mesh physical models of drum membranes Arguments: excitation — sound in; tension; loss; mul; add." } ]
[ { "role": "user", "content": "Write a SuperCollider patch for gabber kick (a SuperCollider snippet) that runs as it is, with nothing assumed about the session." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\\gabberkick, {\n var snd;\n snd = SinOsc.ar(Env([1000, 69, 6...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nNdef(\\maus, { MouseX.kr });\nNdef(\\haus, { Pan2.ar(Blip.ar(Ndef.kr(\\maus, 1) * 70), SinOsc.kr(Ndef.ar(\\maus, 1) * 5)) }.play;\n```" }, { "role": "assistant", "con...
[ { "role": "user", "content": "Write a granular texture in SuperCollider." }, { "role": "assistant", "content": "Read a sound file into a buffer, then trigger grains from it. Grain density is the Impulse rate and\ngrain length is dur; keep the density times the length under maxGrains or raise it....
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `MultiplexAnalogIn` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n// modulate frequency of a sine oscillator\n\n(\nSynthDef(\"help-MultiplexAnalogIn\", { |out = 0|\n Out.ar(out,\n S...
[ { "role": "user", "content": "What does `RingBuffer.overwrite` do?" }, { "role": "assistant", "content": "Add value and increase LINK#-writePos by overwriting oldest readable" } ]
[ { "role": "user", "content": "What is `Harmonics`?" }, { "role": "assistant", "content": "Harmonics — Convenient factory for filling buffers with harmonics on the server" }, { "role": "user", "content": "What does `Harmonics.new` do?" }, { "role": "assistant", "content": ...
[ { "role": "user", "content": "What does `Mx.gotoBeat` do? What arguments does it take?" }, { "role": "assistant", "content": "A mixer and dynamic patching Arguments: beat; q; bundle." } ]
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n// another example\n\n(\n// must have power of two framesize- FFT size will be sorted by Convolution2 to be double this\n// maximum is currently a = 8192 for FFT of size 16384\na = 2048;\n// kernel buffer\ng = Buffer.alloc(s, ...
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n// The driven pendulum is interesting as it's a quite simple model\n// that includes parameter zones of chaotic behaviour:\n// http://lampx.tugraz.at/~hadley/physikm/apps/numerical_integration/pendulum.en.php\n\n// y here deno...
[ { "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": "Synth Iteration Help?" }, { "role": "assistant", "content": "SuperCollider forum — Synth Iteration Help\n\n```supercollider\n(\nSynthDef (\\sine_tone) {\narg freq = 440, amp = 1, len = 1, bus = 0;\nvar sig, env;\nenv = Env.step ([ amp ], [ len ]);\nenv = EnvGen.kr (...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nd = { |freq = 440| SinOsc.ar(LastValue.ar(freq, 20), 0, 0.2) }.play;\n\nd.set(\\freq, 400);\nd.set(\\freq, 200);\nd.set(\\freq, 670);\nd.set(\\freq, 680);\nd.set(\\freq, 695;\nd....
[ { "role": "user", "content": "Write a SuperCollider patch for Just experimenting with patterns that runs as it is, with nothing assumed about the session." }, { "role": "assistant", "content": "```supercollider\n/* Some Funky Klangs - Totally botched the math on what I was trying to do but it so...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{\n var env = Env([0.0, 0.5, 0.0, 1.0, 0.9, 0.0], [0.05, 0.1, 0.01, 1.0, 1.5], -4);\n var envgen = EnvGen.ar(env, doneAction: Done.freeSelf);\n env.plot;\n SinOsc.ar(\n ...
[ { "role": "user", "content": "Explain `Shaper` in SuperCollider briefly." }, { "role": "assistant", "content": "Shaper — Wave shaper. Performs waveshaping on the input signal by indexing into the table. Category: UGens > Buffer." } ]
[ { "role": "user", "content": "Explain this code:\n```supercollider\nNdef(\\x, { Saw.ar(110) * 0.1 }).play;\nNdef(\\x)[1] = \\filter -> { |in| RLPF.ar(in, 800, 0.4) };\n```" }, { "role": "assistant", "content": "Two nodes in one named proxy: a saw source, then a resonant low-pass filter fed by it...
[ { "role": "user", "content": "How do I make a kick that starts at 220 Hz and falls to 55 Hz? (osc saw, sweep 0.06, decay 0.12, f0 220, f1 55, amp 0.8, rev 0)" }, { "role": "assistant", "content": "Start with a swept sine, then shorten the decay to taste:\n\n```supercollider\n// kick drum: saw os...
[ { "role": "user", "content": "What does `RedDiskInSampler.play` do? What arguments does it take?" }, { "role": "assistant", "content": "Play the sample preloaded at Arguments: key — A number or a symbol.; attack — In seconds.; sustain — In seconds. If this is `nil` then the total length of the s...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\n{\nvar noise, out;\nnoise = LFNoise0.kr(8);\n\nout = if( noise > 0.0,\n if(noise > 0.5, \n if(noise > 0.9, WhiteNoise.ar(0.2), Pulse.ar(60, 0.5, 0.4)),\n SinOsc.ar(500, 0, 0.25)\n ),\n Saw.ar(160, 0.5)\n);\n\no...
[ { "role": "user", "content": "Give me a granular patch with noise grain position and interp 2. (rate 28, dur 0.1, 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(...
[ { "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{GlitchBPF.ar(\n    ClipNoise.ar(1.dup),\n    0.5,\n    SinO...
[ { "role": "user", "content": "Show another SuperCollider example using `Ball`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var f, sf, g;\n sf = LFNoise0.ar(MouseX.kr(1, 100, 1));\n g = MouseY.kr(0.1, 10, 1);\n f = Ball.ar(sf, g, 0.01, 0.01);\n f = f * 140 + 500;\n SinOs...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `PV_BrickWall`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\n(\n{\n var in, chain;\n in = WhiteNoise.ar(0.2);\n chain = FFT(LocalBuf(2048), in);\n chain = PV_BrickWall(chain, SinOsc.kr(0.1));...
[ { "role": "user", "content": "Give me an Ndef with an LFO at 0.8 Hz. (ugens blip, cutoff 2400, lfo 0.8, freq 220, 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 through a 2400 Hz low-p...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Impulse.ar(800, 0.0, 0.5, 0) }.play\n\n{ Impulse.ar(XLine.kr(800, 100, 5), 0.0, 0.5, 0 }.play\n```" }, { "role": "assistant", "content": "A closing bracket is missi...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LastValue`." }, { "role": "assistant", "content": "```supercollider\nd = { |freq = 440| SinOsc.ar(LastValue.ar(freq, 20), 0, 0.2) }.play;\n\nd.set(\\freq, 400);\nd.set(\\freq, 200);\nd.set(\\freq, 670);\nd.set(\\freq,...
[ { "role": "user", "content": "How do I make a kick that starts at 220 Hz and falls to 40 Hz? (osc saw, sweep 0.06, decay 0.5, f0 220, 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...
[ { "role": "user", "content": "Show another SuperCollider example using `QuadC`." }, { "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 QuadC.ar(SampleRate.ir/4, r.neg, r, 0, 0.1) * 0...
[ { "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": "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 `AbstractGridLines.looseRange` do? What arguments does it take?" }, { "role": "assistant", "content": "Returns the logical minimum and maximum that will contain the min and max, determed internally using Arguments: min — Minimum value to include in the ret...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n‎{h={|f|1-LFTri.ar(f)};l={|s,e|Line.ar(s,e,1200,1,0,2)};FreeVerb.ar(h.(l.(147,5147))*h.(l.(1117,17))*h.(100)*h.([55,55.1])*0.05,0.7,1)}.play\n\n//Explanation of this piece - http://schemawound.com/post/40100438722/11-13-...
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nVowel().brightenExp(1).dBs.postln; \nVowel().brightenExp(0.1).dBs.postln;\nVowel().brightenExp(1.5).dBs.postln;\n\n{Formants.ar(100, Vowel(\\a, \\bass).brightenExp(MouseX.kr(0,5)...
[ { "role": "user", "content": "What are the arguments of PlayBuf.ar?" }, { "role": "assistant", "content": "`PlayBuf.ar(numChannels, bufnum, rate, trigger, startPos, loop)`. numChannels must match what is in the buffer, or you get a channel mismatch; bufnum is the Buffer's integer number; rate is...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Dust2`." }, { "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\", { |out = 0|\n Out.ar(o...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LinRand`." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-LinRand\", { |out = 0, minmax = 1|\n Out.ar(out,\n FSinOsc.ar(\n LinRand(200.0, 10000.0, minmax),\n 0, Line.kr(0.2, 0...
[ { "role": "user", "content": "What does `Knob.mode` do? What arguments does it take?" }, { "role": "assistant", "content": "The way value is controlled with respect to mouse movement after clicking on the Arguments: One of the symbols listed above.." } ]
[ { "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": "Explain `PV_Copy` in SuperCollider briefly." }, { "role": "assistant", "content": "PV_Copy — Copy an FFT buffer Copies the spectral frame in `bufferA` to `bufferB`. This allows for parallel processing of spectral data without the need for multiple FFT UGens. Further...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\ns=Server.default;\n\na= CutProcStream(BBCutProc11.new);\n\n//no offsets set (usually this would be decided by cut synthesisers\n10.do {a.next(Event.default).postln};\n\na= CutProcStream(RecursiveCutProc1.new);\n\n//offset...
[ { "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": "Write a minimal SuperCollider example that uses `MoogFF`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n// Play it with the mouse...\nx = { MoogFF.ar(WhiteNoise.ar(01.1), MouseY.kr(100, 10000, 1), MouseX.kr(0, 4)) }.play(s);\nx.free;\n\n// Mmmm, ...
[ { "role": "user", "content": "How do I play a random majorPentatonic scale at octave 5? (scale majorPentatonic, seq Pwalk, 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```sup...
[ { "role": "user", "content": "Give me a fm kick with a 0.06 s pitch sweep. (osc fm, sweep 0.06, decay 0.5, f0 150, f1 55, 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 oscillato...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{\n SinOsc.ar(\n RunningMin.ar(Dust.ar(20), Impulse.ar(0.4)) * 500 + 200,\n 0, 0.2\n )\n\n}.play;\n);\n\n// follow a sine lfo, reset rate controlled by mouse x\n(\...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `NRand`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-NRand\", { |out = 0, n = 0|\n Out.ar(out,\n FSinOsc.ar(\n NRand(1200.0, 4000.0, n),\n ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Standard2DL.ar(220, 11025, mul:0.3) }.play(s);\n\n// mouse-controlled param\n{ Standard2DL.ar(11025, 44100, MouseX.kr(0.9,4), mul:0.3) }.play(s);\n\n// as a frequency control\n...
[ { "role": "user", "content": "What is `FoaPanB` in SuperCollider?" }, { "role": "assistant", "content": "FoaPanB — First Order Ambisonic (FOA) panner Encode a monophonic input to a First Order Ambisonic signal (B-format), as a planewave. PanB is the SuperCollider inbuilt equivalent. Category: Li...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ MoogLadder.ar(Mix(LFSaw.ar([120, 180], 0, 0.33)), LinExp.kr(LFCub.kr(0.1, 0.5*pi), -1, 1, 180, 8500), 0.75.dup }.play\n```" }, { "role": "assistant", "content": "A ...
[ { "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": "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 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)...