conversations
listlengths
2
6
[ { "role": "user", "content": "What is `EventStreamPlayer` in SuperCollider?" }, { "role": "assistant", "content": "EventStreamPlayer — two streams combined by a binary operator An EventStreamPlayer is used by Event based Patterns. Category: Streams-Patterns-Events." } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `FOS`." }, { "role": "assistant", "content": "```supercollider\n(\n// same as OnePole\n{ var x;\n x = LFTri.ar(0.4, 0, 0.99);\n FOS.ar(LFSaw.ar(200, 0, 0.2), 1 - x.abs, 0.0, x)\n}.play;\n);\n\n(\n// same as OneZero\...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nNdef(\\x, { SinOsc.ar(Rand(500, 900)) * 0.1 }).play;\nNdef(\\x).copy(\\y);\nNdef(\\y.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: t...
[ { "role": "user", "content": "What can you do?" }, { "role": "assistant", "content": "Write and explain SuperCollider: SynthDefs, UGens, Patterns, Ndef, buses and envelopes, and tell you why a patch is silent or will not compile. I am 198M parameters, so I am narrow on purpose." } ]
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Gbman2DL.ar(MouseX.kr(20, SampleRate.ir*0.25), MouseX.kr(80, SampleRate.ir), 0.1) }.play(s);\n\n{ Gbman2DL.ar(11025, 22050, -0.7, -2.7, 0.1) }.play(s);\n\n{ Gbman2DL.ar(2200, 8...
[ { "role": "user", "content": "What does `KrNumberEditor.guiClass` do?" }, { "role": "assistant", "content": "a number box and slider for editing a float value [\\kr rate]" } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LFDNoise3`." }, { "role": "assistant", "content": "```supercollider\n// try wiggling mouse quickly:\n// LFNoise2 overshoots when going from high to low freqs, LFDNoise changes smoothly.\n\n{ SinOsc.ar(LFNoise2.ar(Mou...
[ { "role": "user", "content": "What does `Sieve.segmentGreater` do? What arguments does it take?" }, { "role": "assistant", "content": "Returns a new Sieve of mode 'points' with Integers greater than Arguments: lo — Integer.." } ]
[ { "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": "Write a minimal SuperCollider example that uses `Env`." }, { "role": "assistant", "content": "```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)...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// If one wants to start width full width there's the possibility to do this by \n// passing an initOutOffset argument.\n\n// Here we start with initOutOffset = 1, fadeMode = 1 (step first),\n// index = 4 (5th partial) is...
[ { "role": "user", "content": "What is `IdentityBag`?" }, { "role": "assistant", "content": "IdentityBag — A Bag according to identity" }, { "role": "user", "content": "What does `IdentityBag.add` do?" }, { "role": "assistant", "content": "Add anObject to the Bag. A Bag ma...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n// connect will connect to all midi in devices\n// if you need to specify one,\n// check the sources at: MIDIClient.sources\n// and connect using MIDIIn.connect( source_index )\nMIDIIn.connect;\n\n// show incoming contr...
[ { "role": "user", "content": "What does `SoundFile.path` do?" }, { "role": "assistant", "content": "Get the pathname of the file. This variable is set via the #-openRead or #-openWrite" } ]
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\na = Synth(\\MoaningDialogue)\n\n//COOL TWEAKS\n//AngryTweak\na.set(\\feedback, 29,\\freq, 6)\n//CalmTweak\na.set(\\feedback, 60, \\freq, 0.8)\n//WeirdTweak\na.set(\\feedback, 2.8, \\freq, 2)\n\n(\nSynthDef(\\MoaningDialo...
[ { "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": "What does `Env.dadsr` do?" }, { "role": "assistant", "content": "As #*adsr above, but with its onset delayed by delayTime in seconds. The default delay is" } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Fdef`." }, { "role": "assistant", "content": "```supercollider\n// sound example\n(\ns.boot;\nSynthDef(\"gpdef\",\n { |out = 0, freq = 440, sustain = 0.05, amp = 0.1|\n var env;\n env = EnvGen.kr(Env.perc(0.01,...
[ { "role": "user", "content": "What does `ModDif.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "Minimum difference of two values in modulo arithmetics Arguments: x — First input value; y — Second input value; mod — Modulo (maximum value, double of the maximal differen...
[ { "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 `RedAGrain.bufBus` do?" }, { "role": "assistant", "content": ".ar control bus for selecting which buffer to get the grain source audio" } ]
[ { "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 is `Psync` in SuperCollider?" }, { "role": "assistant", "content": "Psync — synchronise and limit pattern duration Psync behaves somewhat like Pfindur — it has a `maxdur` argument that limits the total duration of the event stream. Category: Streams-Patterns-Ev...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `ControlSpec`. Define every value it uses." }, { "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...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Latch`." }, { "role": "assistant", "content": "```supercollider\n{ Blip.ar(Latch.ar(WhiteNoise.ar, Impulse.ar(9)) * 400 + 500, 4, 0.2) }.play;\n```" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Lorenz2DN.ar(11025, 44100) }.play(s);\n\n// randomly modulate params\n(\n{ Lorenz2DN.ar(\n 11025, 44100,\n LFNoise0.kr(1, 2, 10),\n 20,\n LFNoise0.kr(1, 1.5, 2),\n 0.02\n)...
[ { "role": "user", "content": "What does `TreeViewItem.view` do? What arguments does it take?" }, { "role": "assistant", "content": "The view in the given data Arguments: column — An integer index of a data field.." } ]
[ { "role": "user", "content": "Write a SuperCollider patch that uses `SharedOut` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\n// only works with the internal server\ns = Server.internal;\ns.boot;\n);\n\n(\nSynthDef(\"help-Shared...
[ { "role": "user", "content": "Write a SuperCollider patch for Digital Bird sounds that runs as it is, with nothing assumed about the session." }, { "role": "assistant", "content": "```supercollider\n(\nNdef(\\birdy, {arg freq=1500, amp=0.5, rate=10;\n var osc, son, convIn, rand;\n osc=LFCub;\n...
[ { "role": "user", "content": "I get 'server not running' or nothing happens at all." }, { "role": "assistant", "content": "The server is not booted. In the IDE press Ctrl+B, or evaluate `s.boot`. If code depends on a SynthDef being there, put it inside `s.waitForBoot { ... }`. When a script runs...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nx = { |freq = 440| SinOsc.ar(freq, 0, 0.3) }.play; // this returns a Synth object;\nx.set(\\freq, 880); // note you can set the freq argument\nx.defName; // the name of the resul...
[ { "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 48, amp 0.8, rev 0)" }, { "role": "assistant", "content": "The pitch envelope is what makes it read as a drum, not the oscillator:\n\n```supercollider\n// kick drum: sine os...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// Compare with Ex. 2 from DXFan help.\n// As DXFanOut, other than DXFan, doesn't return an array, a mix is not necessary, \n// by internal use of Out ugens the signal is mixed to the referred buses anyway.\n\n// For the ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Dxrand`." }, { "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 = Demand.kr(trig, 0, a) * 30 + 340;...
[ { "role": "user", "content": "Show another SuperCollider example using `Symbol`." }, { "role": "assistant", "content": "```supercollider\na = { Ringz.ar(T2A.ar(\\trig.tr), \\freq.kr(500, 1), 0.8) }.play;\na.set(\\freq, 330, \\trig, 1);\na.set(\\freq, 830, \\trig, 1);\na.release;\n```" } ]
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `ProxySpace`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\np = ProxySpace.new;\np.fadeTime = 2; // fadeTime specifies crossfade\np[\\out].play; // monitor an em...
[ { "role": "user", "content": "What does `String.standardizePath` do?" }, { "role": "assistant", "content": "Expand ~ to your home directory, and resolve aliases on macOS. See PathName for more complex needs. See File#*realpath if you want to resolve symlinks. `\"~/\".standardizePath; // This wil...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `BiPanB2`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var w, x, y, p, q, a, b, c, d;\n\n p = LFSaw.ar(200);\n q = LFSaw.ar(301);\n\n // B-format encode\n #w, x, y = BiPanB2.ar(p, q, MouseX.kr(...
[ { "role": "user", "content": "Give me a granular patch with noise grain position and interp 2. (rate 6, dur 0.15, interp 2, mode noise, rev 0)" }, { "role": "assistant", "content": "Granulation is `GrainBuf` plus a trigger rate; the position can move:\n\n```supercollider\n// granular synth with ...
[ { "role": "user", "content": "Write a Pbind in minorPentatonic using Pseq for the degrees. (scale minorPentatonic, seq Pseq, dur 0.25, octave 4, instr sine, root 0)" }, { "role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```superc...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `Pwrap` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\\help_sinegrain,\n { |out = 0, freq = 440, sustain = 0.05|\n var env;\n env = EnvGen.kr(Env.perc(0.01, sustain,...
[ { "role": "user", "content": "What is `Lag` in SuperCollider?" }, { "role": "assistant", "content": "Lag — Exponential lag This is essentially the same as OnePole except that instead of supplying the coefficient directly, it is calculated from a 60 dB lag time. This is the time required for the ...
[ { "role": "user", "content": "Explain `CombN` in SuperCollider briefly." }, { "role": "assistant", "content": "CombN — Comb delay line with no interpolation. Comb delay line with no interpolation. See also CombL which uses linear interpolation, and CombC which uses cubic interpolation. Cubic and...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// check blockSize before (or reset blockSize in examples)\n\n(\nif (s.options.blockSize != 64) {\n s.options.blockSize = 64;\n s.quit.reboot;\n}\n);\n\n// func can take an index as third arg, it runs from 0 to blockSiz...
[ { "role": "user", "content": "I made a synth and I hear nothing. Where do I start?" }, { "role": "assistant", "content": "Start with the node tree, not the code: evaluate `s.plotTree`. If your Synth is not there, it never started or it already freed itself; if it is there, the problem is in the ...
[ { "role": "user", "content": "What is `PostWindowURLHandler` in SuperCollider?" }, { "role": "assistant", "content": "PostWindowURLHandler — Used to respond when clicking links in the post window. Used to respond to specific URLs when clicking links in the post window. For example, when clicking...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Fdef`." }, { "role": "assistant", "content": "```supercollider\n// sound example\n(\ns.boot;\nSynthDef(\"gpdef\",\n { |out = 0, freq = 440, sustain = 0.05, amp = 0.1|\n var env;\n env = EnvGen.kr(Env.perc(0.01,...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `StandardN`." }, { "role": "assistant", "content": "```supercollider\n// vary frequency\n{ StandardN.ar(MouseX.kr(20, SampleRate.ir)) * 0.3 }.play(s);\n```" } ]
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `InTrig`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\ns = Server.local;\nb = Bus.control(s, 1);\n\nSynthDef(\"help-InTrig\", { |out = 0, busnum = 0|\n var inTrig;\n inT...
[ { "role": "user", "content": "Write an Ndef with a blip source and a 400 Hz low-pass. (ugens blip, cutoff 400, lfo 0.1, 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: blip source through...
[ { "role": "user", "content": "Give me a granular patch with noise grain position and interp 4. (rate 14, dur 0.1, interp 4, 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(\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 minimal SuperCollider example that uses `LPZ2`." }, { "role": "assistant", "content": "```supercollider\n// Compare:\n\n{ WhiteNoise.ar(0.25) }.play;\n\n{ LPZ2.ar(WhiteNoise.ar(0.25)) }.play;\n```" } ]
[ { "role": "user", "content": "What is `PLFClipNoise` in SuperCollider?" }, { "role": "assistant", "content": "PLFClipNoise — UGenPatterns quark library Based on LFClipNoise Category: Streams-Patterns-Events > UGenPatterns > Generators." } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `FoldIndex`." }, { "role": "assistant", "content": "```supercollider\n// indexing into a table\n(\n{\n var buf = LocalBuf.newFrom([200, 300, 400, 500, 600, 800]);\n var freq = FoldIndex.kr(buf, MouseX.kr(0, BufFrames...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `DelayN`." }, { "role": "assistant", "content": "```supercollider\n(\n// Dust randomly triggers Decay to create an exponential\n// decay envelope for the WhiteNoise input source\n{\nz = Decay.ar(Dust.ar(1, 0.5), 0.3, W...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Dseq`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a, freq, trig;\n a = Dseq([1, 3, 2, 7, 8], 3);\n trig = Impulse.kr(MouseX.kr(1, 40, 1));\n freq = Demand.kr(trig, 0, a) * 30 + 340;\n Sin...
[ { "role": "user", "content": "Write a kick at amp 0.6 with no click." }, { "role": "assistant", "content": "The pitch envelope is what makes it read as a drum, not the oscillator:\n\n```supercollider\n// kick drum: fm oscillator, 0.06 s pitch sweep\n(\nSynthDef(\\kick_synth, { |out = 0, amp = 0....
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `FreqScope`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\n// create a new analyzer\nFreqScope.new(400, 200, 0, server: s);\n\n// basic sine\n{ SinOsc.ar(2000, 0, 0.25) }.play(s);\n\n// random saw...
[ { "role": "user", "content": "Show another SuperCollider example using `Array`." }, { "role": "assistant", "content": "```supercollider\n(\nx = {\n SinOsc.ar([0.1, 0.2], 0).poll * 0.1\n}.play;\n);\nx.trace; // By tracing the Synth you can see the two Poll units we created\nx.free\n```" } ]
[ { "role": "user", "content": "What is `LeastChange` in SuperCollider?" }, { "role": "assistant", "content": "LeastChange — Output least changed Given two inputs `a` and `b`, let `da[t] = abs(a[t] - a[t - 1])` and `db[t] = abs(b[t] - b[t - 1])`. Output `a[t]` if `da[t]` is smaller, and output `b[...
[ { "role": "user", "content": "Give me a Pbind with pluck voices and a 0.2 rhythm. (scale minorPentatonic, seq Pshuf, dur 0.2, octave 5, instr pluck, root 0)" }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nSynthDef(\...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `AnalogOut` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n// write a sine oscillator's output to a pin\n\n(\nSynthDef(\"help-AnalogOut\", { |out = 0|\n AnalogOu...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nb = BusPlug.new;\n{ Blip.ar(b + 5) }.play;\nb.bus.set(12;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is ...
[ { "role": "user", "content": "What is `FoaEncoderMatrix` in SuperCollider?" }, { "role": "assistant", "content": "FoaEncoderMatrix — First Order Ambisonic (FOA) encoder matrices Generates encoding matrices required by the Ambisonic Toolkit's first order encoder, FoaEn`.` The ATK matrices are req...
[ { "role": "user", "content": "Explain `SpectralEntropy` in SuperCollider briefly." }, { "role": "assistant", "content": "SpectralEntropy — Spectral feature extraction Spectral Entropy, with a choice of number of sub-bands. If one band, a measure of general peakiness of the spectral distribution....
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LinCongN`." }, { "role": "assistant", "content": "```supercollider\n// default initial params\n{ LinCongN.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\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": "Write a minimal SuperCollider example that uses `Logistic`." }, { "role": "assistant", "content": "```supercollider\n// default values\n{ Logistic.ar }.play\n\n// onset of chaos\n{ Logistic.ar(Line.kr(3.55, 3.6, 5), 1000) }.play\n\n// explore via Mouse\n{ Logistic.a...
[ { "role": "user", "content": "How do I granulate a sample with 0.1 s grains? (rate 14, dur 0.1, interp 2, 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 with GrainBuf\n(\ns...
[ { "role": "user", "content": "What is `OnePole` in SuperCollider?" }, { "role": "assistant", "content": "OnePole — One pole filter. A one pole filter. Implements the formula: Category: UGens > Filters > Linear." } ]
[ { "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,2048,1);\n\n(\nSynthDef(\"help-brick\", { arg out=0, bufnum=0;\n var in, chain;\n in = {WhiteNoise.ar(0.2)}.dup;\n chain = FFT(bufnum, in);\n ch...
[ { "role": "user", "content": "Give me a Pbind with fm voices and a 0.25 rhythm." }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nSynthDef(\\fm_voice, { |out = 0, freq = 440, amp = 0.2|\n var env = EnvGen.kr(Env.pe...
[ { "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 SuperCollider patch for batuhan's buzzer parametrized that runs as it is, with nothing assumed about the session." }, { "role": "assistant", "content": "```supercollider\n// A beautiful sc140 tweet by Batuhan Bozkurt, parametrized for real-time changes\n(\n/...
[ { "role": "user", "content": "What is `Bus`?" }, { "role": "assistant", "content": "Bus — Representation of a bus on the server" }, { "role": "user", "content": "What does `Bus.control` do?" }, { "role": "assistant", "content": "Allocate a control bus on the server." },...
[ { "role": "user", "content": "Explain `PMouseButton` in SuperCollider briefly." }, { "role": "assistant", "content": "PMouseButton — UGenPatterns quark library Based on MouseButton Category: Streams-Patterns-Events > UGenPatterns > Generators." } ]
[ { "role": "user", "content": "What does this SuperCollider code do?\n```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.ar;\n chain = FFT(LocalBuf(2048), in);\n IFFT.ar(chain) * -20.d...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Unpack1FFT`." }, { "role": "assistant", "content": "```supercollider\n// Let's extract the DC component - i.e. the magnitude at binindex zero.\n(\n{\n var sig, chain, stream, windowStarts, demand;\n var fftsize = 10...
[ { "role": "user", "content": "What are the server's default sample rate and block size?" }, { "role": "assistant", "content": "44100 Hz and 64 samples per block by default, so the control rate is 44100/64 = 689.06 Hz. You can read them from the language with `s.sampleRate` and `s.options.blockSi...
[ { "role": "user", "content": "Write a Pbind in majorPentatonic using Pshuf for the degrees. (scale majorPentatonic, seq Pshuf, dur 0.25, octave 4, instr pluck, root 0)" }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\nSynthDef(\\bird,{\n var sig, freqenv, env, trig;\n trig = Dust.ar(2);\n env = EnvGen.ar(Env.perc(0.01,0.4,0.8,-8), trig, doneAction: 2);\n freqenv = EnvGen.ar(Env([Rand(1000,3000), Rand(3000,6000), Rand(1000,2000)...
[ { "role": "user", "content": "What is `ArrayedCollection`?" }, { "role": "assistant", "content": "ArrayedCollection — Abstract superclass of Collections of fixed maximum size" }, { "role": "user", "content": "What does `ArrayedCollection.newClear` do?" }, { "role": "assistant...
[ { "role": "user", "content": "How do I build a live drone with Ndef at 110 Hz? (ugens blip, cutoff 2400, lfo 0.3, freq 110, 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": "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": "Show me a self-contained SuperCollider patch using `BufSampleRate`: bind everything it needs first." }, { "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 ...
[ { "role": "user", "content": "How do I build a live drone with Ndef at 220 Hz? (ugens saw, cutoff 1400, lfo 0.3, freq 220, amp 0.12)" }, { "role": "assistant", "content": "Use `Ndef` when the patch has to change without stopping:\n\n```supercollider\n// Ndef drone: saw source through a 1400 Hz l...
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n(\nx = {\n |lookBack = 3, thr = 1|\n var trig = Impulse.ar(7);\n // for a non-integer source it makes sense to take a sufficiently large threshold thr\n var midi = Demand.ar(trig, 0, DIdev(SinOsc.ar(0.2, 0, 15, 82), 5, -6,...
[ { "role": "user", "content": "What is `AudioEventSpec` in SuperCollider?" }, { "role": "assistant", "content": "AudioEventSpec — datatype specifying an 'audio' rate function which will end the synth with an EnvGen This is an example of very usage dependent spec. It has been used to mark the outp...
[ { "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": "Write a minimal SuperCollider example that uses `RLPF`." }, { "role": "assistant", "content": "```supercollider\n{ RLPF.ar(Saw.ar(200, 0.1), SinOsc.ar(XLine.kr(0.7, 300, 20), 0, 3600, 4000), 0.2) }.play;\n\n\n(\n{ var ctl = RLPF.ar(Saw.ar(5, 0.1), 25, 0.03);\n SinO...
[ { "role": "user", "content": "What is `SendTrig` in SuperCollider?" }, { "role": "assistant", "content": "SendTrig — Send a trigger message from the server back to the client. On receiving a trigger (a non-positive to positive transition), send a trigger message from the server back to the clien...
[ { "role": "user", "content": "Explain `Psubdivide` in SuperCollider briefly." }, { "role": "assistant", "content": "Psubdivide — partition a value into n equal subdivisions A filter pattern designed for a stream of float durations. Category: Streams-Patterns-Events > Patterns > Repetition." } ...
[ { "role": "user", "content": "How do I play a random majorPentatonic scale at octave 4? (scale majorPentatonic, seq Pseq, dur 0.25, octave 4, instr fm, root 0)" }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nSynthDe...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Gbman2DC.ar(MouseX.kr(20, SampleRate.ir*0.25), MouseX.kr(80, SampleRate.ir), 0.1) }.play(s);\n\n{ Gbman2DC.ar(11025, 22050, -0.7, -2.7, 0.1) }.play(s);\n\n{ Gbman2DC.ar(2200, 8...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// hear the difference, LinPan having a slight drop in the middle (yeah, it's subtle)...\n{ LinPan2.ar(SinOsc.ar(440), Line.kr(-1, 1, 5)) }.play;\n\n// ... whereas Pan2 is more smooth\n{ Pan2.ar(SinOsc.ar(440), Line.kr(-1...
[ { "role": "user", "content": "What is `PLshuf` in SuperCollider?" }, { "role": "assistant", "content": "PLshuf — dynamic scope Pshuf variant Takes Symbol args for later reference by the Streams, which will read from variables in the Environments of their instantiation. See PLx_suite. A PLshuf st...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Dwhite`." }, { "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(trig, 0, a) * 30 + 340;\n SinOsc....
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n~x.play;\n\n~x = { var alpha,beta; alpha = rrand(99,399); beta = alpha = rrand(99,399);Pan2.ar(LeakDC.ar(Normalizer.ar(BPeakEQ.ar(BPeakEQ.ar(BPeakEQ.ar(BPeakEQ.ar(\nFreeVerb.ar(Formant.ar(TRand.kr(alpha,alpha+(rrand(5,20...