conversations
listlengths
2
6
[ { "role": "user", "content": "Show another SuperCollider example using `Monitor`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\ns.scope(16);\n\n{ Out.ar(87, SinOsc.ar(MouseX.kr(40, 10000, 1) * [1, 2, 3], 0, 0.2)) }.play;\nx = Monitor.new;\nx.play(87, 3, 1, 2);\nx.out = 0;\nx....
[ { "role": "user", "content": "Explain `PLshuf` in SuperCollider briefly." }, { "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 P...
[ { "role": "user", "content": "Explain `PInRange` in SuperCollider briefly." }, { "role": "assistant", "content": "PInRange — UGenPatterns quark library Based on InRange Category: Streams-Patterns-Events > UGenPatterns > Modifiers." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Integrator.ar(LFPulse.ar(300, 0.2, 0.1), MouseX.kr(0.001, 0.999, 1)) }.play\n\n// used as an envelope\n{ Integrator.ar(LFPulse.ar(3, 0.2, 0.0004), 0.999, FSinOsc.ar(700), 0) }....
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// These examples compare the variants, so that you can hear the difference in interpolation\n\n// Comb used as a resonator. The resonant fundamental is equal to\n// reciprocal of the delay time.\n{ CombN.ar(WhiteNoise.ar...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `SinOsc`." }, { "role": "assistant", "content": "```supercollider\n// create an audio-rate sine wave at 200 Hz,\n// starting with phase 0 and an amplitude of 0.5\n{ SinOsc.ar(200, 0, 0.5) }.play;\n\n// modulate the fre...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch for Kepler 22-b atmosphere. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n(\nfork { \n Ndef(\\ttwnd).play;//(d,2,addAction:\\addToHead);\n loop {\n var seed = thisThread.randSeed...
[ { "role": "user", "content": "Explain `FoaWp` in SuperCollider briefly." }, { "role": "assistant", "content": "FoaWp — First Order Ambisonic (FOA) Soundfield Potential Energy Return the Potential Energy, Wp, of a first order ambisonic (B-format) signal. Category: Libraries > Ambisonic Toolkit > ...
[ { "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": "What does this SuperCollider code do?\n```supercollider\n(\nSynthDef(\"help-Infreq\", { |bus|\n Out.ar(0, FSinOsc.ar(In.kr(bus), 0, 0.5));\n}).add;\n\nSynthDef(\"help-Outfreq\", { |freq = 400, bus|\n Out.kr(bus, SinOsc.kr(1, 0, freq/40, freq));\n}).add;\n\nb = Bus.control(s, ...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `Dust` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-Dust\", { |out = 0|\n Out.ar(out,\n Dust.ar(200, 0.5)\n )\n}).play;\n);\n\n(\nSynthDef...
[ { "role": "user", "content": "Write an Ndef at 165 Hz I can retune while it plays. (ugens sine, cutoff 200, 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: sine source thr...
[ { "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": "What is `SendPeakRMS`?" }, { "role": "assistant", "content": "SendPeakRMS — Track peak and power of a signal for GUI applications." }, { "role": "user", "content": "What does `SendPeakRMS.ar` do?" }, { "role": "assistant", "content": "Unlike ...
[ { "role": "user", "content": "Give me an Ndef with an LFO at 0.3 Hz. (ugens saw, cutoff 800, lfo 0.3, freq 82.5, 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 800 Hz low-pass\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 does `BeatSched.time` do? What arguments does it take?" }, { "role": "assistant", "content": "just in time scheduler utility Arguments: seconds." } ]
[ { "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": "What does `Array.sputter` do? What arguments does it take?" }, { "role": "assistant", "content": "Return a new Array of length maxlen with the items partly repeated (random choice of given probability). `// Arguments: probability — Probability of repeat.; maxlen — T...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `ControlName`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n(\nd = SynthDef(\\tone, { |out = 0, freq = 200|\n var sig;\n\n freq.spec = ControlSpec(20, 20000);\n sig = Sin...
[ { "role": "user", "content": "Give me a sine kick with a 0.06 s pitch sweep. (osc sine, sweep 0.06, decay 0.12, f0 180, f1 40, amp 0.8, rev 1)" }, { "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": "Give me an Ndef with an LFO at 0.1 Hz. (ugens sine, cutoff 200, 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: sine source through a 200 Hz low-pas...
[ { "role": "user", "content": "Write a kick drum with a 0.5 s decay. (osc sine, sweep 0.06, decay 0.5, f0 180, 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: sine oscillator, ...
[ { "role": "user", "content": "What is the difference between TempoClock and SystemClock?" }, { "role": "assistant", "content": "SystemClock runs in real time and is what `.wait` uses by default. TempoClock runs in beats and has a tempo, so it can be changed while things are playing and Patterns ...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n{ Pan2.ar(Klank.ar(`[[1, 2.2, 3.5, 4.9], nil, Array.series(4, 1, -0.2)], PinkNoise.ar(EnvGen.ar(Env.perc(0.001,0.01), Impulse.ar(4))), 0), 0); }.play;\n```" }, { "role": "assistant", "content": "I accidentall...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\ns.waitForBoot {\n // Open a plotTree window with a refresh rate of 2 seconds:\n s.plotTree(2);\n\n // Define and play a repeating pattern that generates a new synth every 0.5 seconds:\n x = Pn((dur: 0.5, midinote: ...
[ { "role": "user", "content": "What is `Stream`?" }, { "role": "assistant", "content": "Stream — Stream is the base class for classes that define streams" }, { "role": "user", "content": "What does `Stream.play` do?" }, { "role": "assistant", "content": "Streams that retur...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ LFPulse.ar(XLine.kr(1, 200, 10), 0, 0.2, 0.1 }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is nev...
[ { "role": "user", "content": "Write an Ndef with a tri source and a 1400 Hz low-pass. (ugens tri, cutoff 1400, lfo 0.3, 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 t...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `NamedControl` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n// compare this:\n(\na = {\n var x, y;\n x = NamedControl.kr(\\freq, 440).lag(3.5);\n y = NamedControl.kr(\\freq, 4...
[ { "role": "user", "content": "Write a Pbind whose degrees repeat every Pshuf cycle. (scale majorPentatonic, seq Pshuf, dur 0.2, octave 6, 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": "What are you good at?" }, { "role": "assistant", "content": "SuperCollider. I can explain its classes and UGens, write SynthDefs and patches, read a patch back to you, and tell you why one does not compile. I am 198M parameters; I am not a general assistant." } ]
[ { "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": "Give me a complete SuperCollider patch for Re: Dark sea horns: bind everything it needs before it is used." }, { "role": "assistant", "content": "```supercollider\n(\n Ndef(\\x, {\n var output;\n var delayTime;\n var delayMax = 0.2;\n var delayAdd = 0....
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Formant`." }, { "role": "assistant", "content": "```supercollider\n// modulate fundamental frequency, formant freq stays constant\n{ Formant.ar(XLine.kr(400, 1000, 8), 2000, 800, 0.125) }.play\n\n// modulate formant f...
[ { "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 `Dser`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a, freq, trig;\n a = Dser([1, 3, 2, 7, 8], 8);\n trig = Impulse.kr(MouseX.kr(1, 40, 1));\n freq = Demand.kr(trig, 0, a) * 30 + 340;\n Sin...
[ { "role": "user", "content": "How do I put a bell in a reverb at mix 0.45? (verb gverb, room 0.5, damp 0.5, mix 0.45, source bell)" }, { "role": "assistant", "content": "`FreeVerb` is in the core library; the room and damp arguments do the work:\n\n```supercollider\n// reverb: gverb on a bell\n(...
[ { "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": "What does `GravityGrid.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "dynamical system simulation (Newtonian gravitational force) Arguments: reset — Restart the moving mass at a random position within the square (k-rate input); rate — am...
[ { "role": "user", "content": "Write an Ndef with a tri source and a 800 Hz low-pass. (ugens tri, cutoff 800, lfo 0.1, freq 110, amp 0.12)" }, { "role": "assistant", "content": "Use `Ndef` when the patch has to change without stopping:\n\n```supercollider\n// Ndef drone: tri source through a 800 ...
[ { "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{ LorenzL.ar(\n SampleRate.ir,\n LFNoise0.kr(1, 2, 10),\n LFNoise0.kr(1, 20, 38),\n LFNoise0.kr(1, 1.5, 2)\n) * 0.2 }.play(s);\n```" }, { ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `BHiPass`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n(\nz = {\n BHiPass.ar(\n SoundIn.ar([0, 1]),\n MouseX.kr(10, 20000, \\exponential), // cutoff freq.\n MouseY.kr(0.0, 1.0, \\linear)...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `Padd`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n// sound example\n(\nSynthDef(\\sinegrain,\n { |out = 0, freq = 440, gate = 1|\n var env;\n env = EnvGen.kr(Env.a...
[ { "role": "user", "content": "How do I make a kick that starts at 150 Hz and falls to 48 Hz? (osc saw, sweep 0.06, decay 0.25, f0 150, f1 48, 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// kic...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `SharedIn`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n(\n// only works with the internal server\ns = Server.internal;\ns.boot;\n);\n\n(\nSynthDef(\"help-SharedIn1\", {\n ...
[ { "role": "user", "content": "Explain `RedBMP` in SuperCollider briefly." }, { "role": "assistant", "content": "RedBMP — bitmap images Read and write .bmp files from disk. Handles 1, 4, 8, 16, 24 and 32bit depths. Includes simple #-makeWindow and #-plot methods to display the pixels (but you sho...
[ { "role": "user", "content": "How do I build a live drone with Ndef at 165 Hz? (ugens tri, cutoff 2400, lfo 0.3, 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 through ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ BPF.ar(BrownNoise.ar(0.1.dup), MouseX.kr(40, 17000, 1), 0.2 }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened...
[ { "role": "user", "content": "What is `ClassNameLabel` in SuperCollider?" }, { "role": "assistant", "content": "ClassNameLabel — a button for displaying an Class name that links to a ClassGui in debugging interfaces When clicked this opens a ClassGui which shows the structure and variables of th...
[ { "role": "user", "content": "What does `Char.asAscii` do?" }, { "role": "assistant", "content": "ASCII character Returns: the object itself." } ]
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `Pseq` 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": "Give me a fm kick with a 0.06 s pitch sweep. (osc fm, sweep 0.06, decay 0.18, f0 180, f1 40, amp 0.8, 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: fm oscillat...
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{\n var a;\n a = [\n Saw.ar(LFSaw.kr(3 * [1, 1.01], 0, 100, 230)),\n SinOsc.ar,\n Pulse.ar(LFPulse.kr(3 * [1, 1.02], 0, 0.4, 100, 230)),\n SinOsc.ar(SinO...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Latoocarfian2DL.ar(MouseX.kr(20, SampleRate.ir * 0.5), MouseX.kr(40, SampleRate.ir), mul:0.2) }.play(s);\n\n\n(\n{ Latoocarfian2DL.ar(\n SampleRate.ir/4,\n SampleRate.ir,\n ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ SinOsc.ar(ControlRate.ir * 0.1 }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never closed, so ...
[ { "role": "user", "content": "What does `Magnitude.>` do?" }, { "role": "assistant", "content": "Comparable value in a linear continuum Returns: a Boolean whether the receiver is greater than aMagnitude." } ]
[ { "role": "user", "content": "Explain `Knob` in SuperCollider briefly." }, { "role": "assistant", "content": "Knob — A rotary controller view Knob displays a value from 0.0 to 1.0 in rotary fashion, and allows to control it with either circular or linear mouse motion. Category: GUI > Views." }...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `NamedControl` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n// compare this:\n(\na = {\n var x, y;\n x = NamedControl.kr(\\freq, 440).lag(3.5);\n y = NamedControl.kr(\\freq, 4...
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n(\n// Function to check an array for repetitions within a maximum test span\n\n~repetitionCheck = { |array, maxTestSpan|\n maxTestSpan.do { |i|\n var result = (array.drop(i+1) - array).drop((i+1).neg).includes(0).not;\n ...
[ { "role": "user", "content": "What does `SOMTrain.kr` do? What arguments does it take?" }, { "role": "assistant", "content": "Create (train) a Self-Organising Map Arguments: bufnum — A reference to the buffer where the map will be created. Initialising the map is up to you (see below).; inputdat...
[ { "role": "user", "content": "What does `SimpleNumber.gammaPDerivative` do?" }, { "role": "assistant", "content": "Implements the partial derivative with respect to x of the incomplete gamma function" } ]
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\ns.boot;\n(\n{\n SinOsc.ar([225, 450, 900], 0, 0.2)\n + LPF.ar(\n LFPulse.ar(226 * [1, 2, 5], [0, 0.1, 0.1], 0.2, 0.2),\n MouseX.kr(20, 10000, 1)\n )\n}.scope;\n);\n\n// server.scope only changes the ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{Formants.ar(100, Vowel([\\e, \\o], [\\bass])) * 0.1 }.play\n{Formants.ar(100, Vowel(\\e, [\\bass,\\alto])) * 0.1 }.play\n{Formants.ar(100, Vowel([\\e, \\o], [\\bass,\\alto]) * 0...
[ { "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 is `MFCC` in SuperCollider?" }, { "role": "assistant", "content": "MFCC — Mel frequency cepstral coefficients Generates a set of MFCCs; these are obtained from a band-based frequency representation (using the Mel scale by default), and then a discrete cosine tr...
[ { "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 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": "Show me a self-contained SuperCollider patch using `Stethoscope`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var f = { |l,h| SinOsc.kr(0.1, {pi.rand}).range(l, h) } ;\n Pulse.ar({ f.(20, 1000) }!6, { f.(0.0, 1) ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.boot;\nb = Buffer.new(s);\n// read only the first channel (a Sine wave) of a stereo file\nb.allocReadChannel(ExampleFiles.sinedPink, channels: [0]);\nx = { PlayBuf.ar(1, b, Buf...
[ { "role": "user", "content": "Explain this code:\n```supercollider\n{ LPF.ar(Saw.ar(100), SinOsc.kr(0.5).exprange(200, 2000)) * 0.2 }.play;\n```" }, { "role": "assistant", "content": "A sawtooth through a low-pass filter whose cutoff is swept slowly up and down — a classic filter\nsweep.\n\n- `S...
[ { "role": "user", "content": "Give me a complete SuperCollider patch for seeking an Array!: bind everything it needs before it is used." }, { "role": "assistant", "content": "```supercollider\n(// * //watch the postWindow\na=[\"m\",\"x\",\"f\",\"k\",\"d\",\"p\"];\nx=Array;\ny=x.newClear(6);\n~mx...
[ { "role": "user", "content": "What does `Amplitude.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "Amplitude follower Arguments: in — Input signal; attackTime — 20dB convergence time for following attacks.; releaseTime — 20dB convergence time for following decays.; mu...
[ { "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// logistic map\n// equation: x1 = -r*x0^2 + r*x0\n(\n{ var r;\n r = MouseX.kr(3.5441, 4); // stable range\n QuadN.ar(SampleRate.ir/4, r.neg, r, 0, 0.1) * 0.4;\n}.play(s);\n``...
[ { "role": "user", "content": "Explain `VDiskIn` in SuperCollider briefly." }, { "role": "assistant", "content": "VDiskIn — Stream in audio from a file, with variable rate Continuously play a longer soundfile from disk. This requires a buffer to be preloaded with one buffer size of sound. Categor...
[ { "role": "user", "content": "Write a Pbind whose degrees repeat every Prand cycle. (scale majorPentatonic, seq Prand, dur 0.4, octave 5, instr pluck, root 0)" }, { "role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```supercollide...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n// time warped analog bubbles, time scale is mouse x position\n{\n\n Bend.time(MouseX.kr(0.02, 20, 1), {\n var f = LFSaw.kr(0.4, 0, 24, LFSaw.kr([8,7.23], 0, 3, 80)).midic...
[ { "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 minimal SuperCollider example that uses `Synth`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n// create a Synth at the head of the default Server's default group\n// based on the SynthDef \"default\"\nx = Synth.new(\"default\");\ns.query...
[ { "role": "user", "content": "Show another SuperCollider example using `LatoocarfianN`." }, { "role": "assistant", "content": "```supercollider\n// randomly modulate all params\n(\n{ LatoocarfianN.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": "What is `BBCutBuffer` in SuperCollider?" }, { "role": "assistant", "content": "BBCutBuffer — A buffer in BBCut2 Holds data on a buffer including any segmentation (event positions). Derived from the Buffer class and has methods for choosing playback segments. Categor...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LinLin`." }, { "role": "assistant", "content": "```supercollider\n// examples:\n\n(\n{\n var mod = SinOsc.kr(Line.kr(1, 10, 10));\n SinOsc.ar(LinLin.kr(mod, -1, 1, 100, 900)) * 0.1\n}.play;\n);\n\n// modulating dest...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n Patch.new(\n [ 'help', 'Sample' ], [ Sample.new(\"a11wlk01.wav\", 1.6347258775994),\n 0.46511627906977, 0.17441860465116 ]\n ).play\n```" }, { "role": "assi...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\ns = Server.local;\nServer.default = s;\ns.boot;\n);\n\n(\n// PLseq not used as proxy, only taken as it defaults to repeats = inf\n\np = Pbind(\n \\midinote, PLseq([PLser(\\a, \\r), 60, 61]),\n \\dur, 0.2\n);\n\n/...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// The following files are test materials on my machine; you will subsitute your own filenames here\n// A major\nd = Buffer.read(s, \"/Volumes/data/stevebeattrack/samples/100.wav\");\n// F major; hard to track!\nd = Buffe...
[ { "role": "user", "content": "Write a Pbind whose degrees repeat every Pshuf cycle. (scale majorPentatonic, seq Pshuf, dur 0.4, 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```supercol...
[ { "role": "user", "content": "What is `DecodeB2` in SuperCollider?" }, { "role": "assistant", "content": "DecodeB2 — 2D Ambisonic B-format decoder. Decode a two dimensional ambisonic B-format signal to a set of speakers in a regular polygon. The outputs will be in clockwise order. The position o...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Pwrap`." }, { "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, 0.2), doneAction: Do...
[ { "role": "user", "content": "What does `Instr.prMakeSynth` do? What arguments does it take?" }, { "role": "assistant", "content": "An enhanced version of SynthDef with a library Arguments: targetStyle; anode; args — array or dict; bundle; atTime — see atTime; out — out bus index." } ]
[ { "role": "user", "content": "What is `NamedControl`?" }, { "role": "assistant", "content": "NamedControl — Named reference to a control" }, { "role": "user", "content": "What does `NamedControl.ar` do?" }, { "role": "assistant", "content": "add a new instance of AudioCon...
[ { "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 = 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.kr(trig, 0, a) * 30 + 340;\n...
[ { "role": "user", "content": "What does `Plotter.domainSpecs` do?" }, { "role": "assistant", "content": "Set or get the ControlSpec##spec for the x-axis (domain). `a = { (40..300).scramble }.dup(2).plot;` See also the #Explicit domain and axis specs example" } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Symbol`." }, { "role": "assistant", "content": "```supercollider\na = { SinOsc.ar(\\freq.kr(440, 1.2)) }.play;\na.set(\\freq, 330);\na.release;\na = { SinOsc.ar(\\freq.kr([440, 460], 1.2)) }.play;\na.setn(\\freq, [330...
[ { "role": "user", "content": "What does `PathName.pathOnly` do?" }, { "role": "assistant", "content": "returns the full path up to the file name itself; i.e. everything up to and including the last slash. This is handy e.g. for storing several files in the same folder." } ]
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\n// p = ProxySpace.push(s.boot);\n\nl = NodeProxyEditor(nil, 3); l.w.bounds_(l.w.bounds.moveBy(0, 120));\nm = NodeProxyEditor(nil, 3); m.w.bounds_(m.w.bounds.moveBy(0, 240));\nn = NodeProxyEditor(nil, 3); n.w.bounds_(n....
[ { "role": "user", "content": "How do I make a kick that starts at 220 Hz and falls to 55 Hz?" }, { "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 oscillator, 0.06 s pitch sweep\n(\nSynthDef(\\kick_s...
[ { "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 `QuadC`." }, { "role": "assistant", "content": "```supercollider\n// default params\n{ QuadC.ar(SampleRate.ir/4) * 0.2 }.play(s);\n```" } ]
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\nSynthDef(\\pluck, {|freq = 440, dur = 1|\nvar klang,note;\ndur = dur * 2;\nnote = freq.cpsmidi;\nnote = note + (LFNoise2.ar(20).range(-1,1) * (1/8));\nklang = SinOsc.ar((note * [1,1.002]).midicps, phase: VarSaw.ar(note.m...