conversations
listlengths
2
6
[ { "role": "user", "content": "How do I build a live drone with Ndef at 165 Hz? (ugens saw, cutoff 2400, lfo 0.1, 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: saw source through ...
[ { "role": "user", "content": "Show another SuperCollider example using `Recorder`." }, { "role": "assistant", "content": "```supercollider\nr = Recorder(s);\n{ GVerb.ar(Dust.ar(4)) }.play; // play on bus 64\nr.record(numChannels: 2);\nr.stopRecording;\n```" } ]
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `IFFT` that runs as it is." }, { "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...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// create a window for a given Ndef\nNdef(\\sound).edit\n(\nNdef(\\sound, { |freq = 440, rate = 2|\n SinOsc.ar(freq * [1, 1.625]) * SinOsc.kr(rate).max(0) * 0.2\n}).play;\n);\n\...
[ { "role": "user", "content": "What does `MxUnit.mx` do? What arguments does it take?" }, { "role": "assistant", "content": "Container for a musical object (Instr, NDef, Spline etc); this is a single unit that has inlets and outlets which can be connected to other units Arguments: mx." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-GrayNoise\", { |out = 0|\n Out.ar(out,\n GrayNoise.ar(-20.dbamp)\n )\n}).play;\n```" }, { "role": "assistant", "content": "A closing bracket i...
[ { "role": "user", "content": "What is `RedRamp` in SuperCollider?" }, { "role": "assistant", "content": "RedRamp — resettable phasor with per period rate control Useful for scanning through a buffer with different speeds each time. Category: Red > redUGens." } ]
[ { "role": "user", "content": "Write a Pbind in majorPentatonic using Prand for the degrees. (scale majorPentatonic, seq Prand, dur 0.25, octave 6, instr pluck, root 0)" }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// Compare:\n\n{ WhiteNoise.ar(0.25) }.play;\n\n{ HPZ1.ar(WhiteNoise.ar(0.25)) }.play;\n\n// HPZ1 is useful to detect changes in a signal:\n// see also HPZ2\n(\n{\n var changing...
[ { "role": "user", "content": "What is `StereoConvolution2L` in SuperCollider?" }, { "role": "assistant", "content": "StereoConvolution2L — Stereo real-time convolver with linear interpolation Strict convolution with fixed kernel which can be updated using a trigger signal. There is a linear cros...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `Resonz` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n// 1st, evaluate a synthdef\n(\nSynthDef(\"pitchFromNoise\", { arg out = 0;\n Out.ar(\n out,\n Resonz.ar(\n WhiteNoise...
[ { "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": "What does `Color.subtract` do? What arguments does it take?" }, { "role": "assistant", "content": "An object which stores color values Arguments: aColor — An instance of Color.; opacity — A value between 0 and 1. Default value is 1.0.." } ]
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n// Pn advances Pgate each time its subpattern is repeated\n(\nPbind(\n \\degree, Pn(Pseq((0..7)), inf, \\step),\n \\mtranspose, Pgate(Pwhite(0, 5), inf, \\step),\n \\dur, 0.2\n).play\n);\n\n\n// Two different Pgates advance...
[ { "role": "user", "content": "What does `Decay2.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "Exponential decay Arguments: in — The input signal.; attackTime — 60 dB attack time in seconds.; decayTime — 60 dB decay time in seconds.; mul — The output will be multipli...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `BufRd`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\nb = Buffer.read(s, ExampleFiles.child);\n\n(\nx = { |rate = 1|\n BufRd.ar(1, b, Phasor.ar(0, BufRateScale.kr(b) * ra...
[ { "role": "user", "content": "How do I record my output to a file?" }, { "role": "assistant", "content": "`s.record(path)` starts recording the server's output; `s.stopRecording` stops it.\n\n```supercollider\ns.record(\"C:/audio/take1.wav\");\n// play for a while\ns.stopRecording;\n```\n\nThe p...
[ { "role": "user", "content": "What does `Environment.use` do?" }, { "role": "assistant", "content": "Evaluates the function within the environment, returns the return value of the" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// won't work (the output is 0.5*0.0), which is why we need the DC UGen!\n{ 0.5 }.play\n\n// constantly zero\n{ DC.ar(0.0) }.play;\n\n\n// DC offset; will click on start and fini...
[ { "role": "user", "content": "What is `NonControlSpec` in SuperCollider?" }, { "role": "assistant", "content": "NonControlSpec — datatype specifying an input to an Instr that will not be in the SynthDef/Synth Category: Spec, Libraries > crucial > Spec." } ]
[ { "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": "How do I granulate a sample with 0.04 s grains? (rate 20, dur 0.04, interp 4, mode noise1, rev 0)" }, { "role": "assistant", "content": "A working granular patch, with the buffer loaded before the synth starts:\n\n```supercollider\n// granular synth with GrainBuf\n(...
[ { "role": "user", "content": "What is `BLowPass`?" }, { "role": "assistant", "content": "BLowPass — 12db/oct rolloff - 2nd order resonant Low Pass Filter" }, { "role": "user", "content": "What does `BLowPass.sc` do?" }, { "role": "assistant", "content": "calculate filter ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Ndef`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\nNdef(\\a).play; // play to hardware output.\nNdef(\\a).fadeTime = 2; // fadeTime specifies crossfade\n// set the source\nNdef(\\a, { SinOsc.ar...
[ { "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 `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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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(0, 2pi); a.sin * 0.1 }.play;\n\n...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\n{\n var mod = SinOsc.ar([0.1,0.15,0.2]).range(0,1);\n var saw = LFSaw.ar([10,12,15]);\n var out = (saw - ((saw>0)*mod)+(mod*0.5));\n Splay.ar(out)*0.4;\n}.play;\n\n{\n var mod = SinOsc.ar([0.1,0.15,0.2]).range(0,...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n{ Hasher.ar(Line.ar(0, 1, 1), 0.2) }.play;\n\n// Even adding a small amount to the input can result in a very different output. Compare these two examples:\n(\n{\n SinOsc.ar(\n Hasher.kr(MouseX.kr(0, 10).round(1), 300...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `DigitalIn`. Define every value it uses." }, { "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(5...
[ { "role": "user", "content": "Write a granular texture, dry. (rate 20, dur 0.04, interp 4, 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 = ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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(out,\n Dust2.ar(XLine.kr...
[ { "role": "user", "content": "What is `NamedControl` in SuperCollider?" }, { "role": "assistant", "content": "NamedControl — Named reference to a control A NamedControl directly combines a ControlName and a Control UGen conveniently. Also this makes it safe even if several identical controls exi...
[ { "role": "user", "content": "Write a GrainBuf synth at 16 grains per second. (rate 16, dur 0.07, interp 4, 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 ...
[ { "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": "What is `PSVsect_o` in SuperCollider?" }, { "role": "assistant", "content": "PSVsect_o — Sieve pattern for intersection of integer generators with offsets and point output Pattern for intersection of integer generators with offsets and point output. Corresponds to S...
[ { "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 `Annotations.unpackNotes` do? What arguments does it take?" }, { "role": "assistant", "content": "stores names and notations for Nodes, identifying the Node's owner and its purpose Arguments: notes." } ]
[ { "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": "What does this SuperCollider code do?\n```supercollider\nMIDIClient.init;\nm = MIDIOut(0); // Linux users: MIDIOut(0, MIDIClient.destinations[0].uid)\n\n// Simplest way for sending \\note-type events to MIDI\n// define a Pattern of note-events:\na = Pbind(degree: Prand([1, 2, ...
[ { "role": "user", "content": "Write a kick drum with a 0.18 s decay. (osc sine, sweep 0.06, decay 0.18, f0 220, f1 48, 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 oscillator...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\ns = Server.local;\nServer.default = s;\ns.boot;\n);\n\n\n// definition for future reference in arbitrary Environments,\n// Cauchy distribution is not bounded, so do clip !\n\n(\np = Pbind(\n \\midinote, PLcauchy(\\m...
[ { "role": "user", "content": "Explain `SQPushFXAmp2` in SuperCollider briefly." }, { "role": "assistant", "content": "SQPushFXAmp2 — CutMixer amplitude algorithm SQPushFXAmp2 is intended to be used in the ampfunc parameter of CutMixer . It randomly drops repeats according to a table of probabili...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n Instr(\\helpTempoPlayer,{\n Impulse.ar( Tempo.kr )\n });\n\n Patch(\\helpTempoPlayer).play(atTime:1)\n```" }, { "role": "assistant", "content": "A closing b...
[ { "role": "user", "content": "Write a GrainBuf synth at 10 grains per second. (rate 10, dur 0.2, interp 4, mode noise1, rev 0)" }, { "role": "assistant", "content": "A working granular patch, with the buffer loaded before the synth starts:\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// 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": "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": "Write a self-contained SuperCollider patch that uses `Dser`. Define every value it uses." }, { "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....
[ { "role": "user", "content": "What is `Buffer`?" }, { "role": "assistant", "content": "Buffer — Client-side representation of a buffer on a server" }, { "role": "user", "content": "What does `Buffer.alloc` do?" }, { "role": "assistant", "content": "Create and return a Buf...
[ { "role": "user", "content": "How do I play a random minorPentatonic scale at octave 4? (scale minorPentatonic, seq Pseq, dur 0.2, octave 4, instr pluck, root 0)" }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nSynth...
[ { "role": "user", "content": "Give me an Ndef with an LFO at 0.3 Hz. (ugens blip, cutoff 400, 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: blip source through a 400 Hz low-pas...
[ { "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.stop;\nx.play;\n```" }, { "role": "assistant"...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Duty`." }, { "role": "assistant", "content": "```supercollider\n(\n {\n var freq;\n freq = Duty.kr(\n Drand([0.01, 0.2, 0.4], inf), // demand ugen as durations\n 0,\n Dseq([204, 400, 201, 5...
[ { "role": "user", "content": "What is `FoaWh` in SuperCollider?" }, { "role": "assistant", "content": "FoaWh — First Order Ambisonic (FOA) Soundfield Heyser's Total Energy Density Return the Heyser's Total Energy Density, Wh, of a first order ambisonic (B-format) signal. Category: Libraries > Am...
[ { "role": "user", "content": "What does `KeyCodeResponder.commandModifier` do?" }, { "role": "assistant", "content": "register responder functions for keycode and modifier combinations" } ]
[ { "role": "user", "content": "What is `CondVar`?" }, { "role": "assistant", "content": "CondVar — Condition variable: block one or more threads until some condition is true" }, { "role": "user", "content": "What does `CondVar.wait` do?" }, { "role": "assistant", "content"...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nvar pitches = [43.0, 55.0, 58.86, 57.42, 67.0];\nfork {\n pitches.size.do{ |i|\n {\n var freq = pitches[i].midicps;\n var env = Env.perc.ar(Done.freeSelf);\n ...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `KeyTrack`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n// alternating major and minor chords as a test\n(\n{\n var in, fft, resample;\n var key, transientdetection;\n\...
[ { "role": "user", "content": "What does `Node.nodeID` do?" }, { "role": "assistant", "content": "Abstract superclass of Synth and Group Returns: the Node's node ID number." } ]
[ { "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": "Give me a saw kick with a 0.06 s pitch sweep." }, { "role": "assistant", "content": "A kick is a sine with a fast pitch drop and a short amplitude envelope:\n\n```supercollider\n// kick drum: saw oscillator, 0.06 s pitch sweep\n(\nSynthDef(\\kick_synth, { |out = 0, ...
[ { "role": "user", "content": "How do I granulate a sample with 0.04 s grains? (rate 10, dur 0.04, interp 2, mode noise, 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(\...
[ { "role": "user", "content": "Write a kick drum with a 0.12 s decay. (osc fm, sweep 0.06, decay 0.12, f0 220, f1 55, 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: fm oscillator, 0....
[ { "role": "user", "content": "How do I build a live drone with Ndef at 110 Hz? (ugens blip, cutoff 200, 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 through...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `BufSamples`." }, { "role": "assistant", "content": "```supercollider\n// example; this buffer is mono, so the number of samples matches the number of frames\nb = Buffer.read(s, ExampleFiles.child);\n\n// indexing with...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\np = Pmono(\\default, \\dur, 0.2, \\freq, Pwhite(1, 8) * 100).play\n\np.stop\n\n// multi channel expansion is supported:\np = Pmono(\\default, \\dur, 0.2, \\freq, Pwhite(1, 8) * 100, \\detune, [0, 2, 5, 1]).play\n\np.stop\...
[ { "role": "user", "content": "Give me a sine kick with a 0.06 s pitch sweep." }, { "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, 0.06 s pitch sweep\n(\nSynthDef(\\kick_synth, { |out = 0...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ SinOsc.ar(SinOsc.ar(0.3).range(440, 660), 0, 0.5 * 0.1 }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earl...
[ { "role": "user", "content": "Give me a fm kick with a 0.06 s pitch sweep. (osc fm, sweep 0.06, decay 0.35, f0 180, f1 40, amp 0.8, rev 1)" }, { "role": "assistant", "content": "A kick is a sine with a fast pitch drop and a short amplitude envelope:\n\n```supercollider\n// kick drum: fm oscillat...
[ { "role": "user", "content": "Explain `PinkNoise` in SuperCollider briefly." }, { "role": "assistant", "content": "PinkNoise — Pink Noise. Generates noise whose spectrum falls off in power by 3 dB per octave, which gives equal power over the span of each octave. This version is band-limited to 8...
[ { "role": "user", "content": "Show another SuperCollider example using `List`." }, { "role": "assistant", "content": "```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 ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// Compare:\n\n{ WhiteNoise.ar(0.25) }.play;\n\n{ HPZ2.ar(WhiteNoise.ar(0.25)) }.play;\n\n// HPZ2 is useful to detect changes in a signal:\n// see also HPZ1\n(\n{\n var changing...
[ { "role": "user", "content": "Write a GrainBuf synth at 20 grains per second. (rate 20, 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....
[ { "role": "user", "content": "Write a SuperCollider patch that uses `Limiter` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\n// example signal to process\n{\n var z;\n z = Decay2.ar(\n Impulse.ar(8, LFSaw.kr(0.25, -0.6, 0.7)...
[ { "role": "user", "content": "Show another SuperCollider example using `Scale`." }, { "role": "assistant", "content": "```supercollider\n(\nr = {\n var scale = Scale.choose.postln;\n SinOsc.ar(\n (\n DegreeToKey.kr(\n scale.as(LocalBuf),\n MouseX.kr(0, 15), // mouse index...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Latoocarfian2DN.ar(MouseX.kr(20, SampleRate.ir * 0.5), MouseX.kr(40, SampleRate.ir), mul:0.2) }.play(s);\n\n\n(\n{ Latoocarfian2DN.ar(\n SampleRate.ir/4,\n SampleRate.ir,\n ...
[ { "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": "Write a kick at amp 0.6 with no click. (osc saw, sweep 0.06, decay 0.5, f0 180, f1 55, amp 0.6, 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: saw oscillator, 0...
[ { "role": "user", "content": "Show another SuperCollider example using `List`." }, { "role": "assistant", "content": "```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 ...
[ { "role": "user", "content": "Write a kick drum with a 0.18 s decay. (osc sine, sweep 0.06, decay 0.18, f0 150, f1 55, 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: sine oscillator...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `TwoZero`." }, { "role": "assistant", "content": "```supercollider\n{ TwoZero.ar(WhiteNoise.ar(0.125), XLine.kr(20, 20000, 8), 1) }.play\n```" } ]
[ { "role": "user", "content": "What does `HilbertFIR.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "Applies the Hilbert transform to an input signal. Arguments: in — The input signal to transform.; buffer — A Buffer to be used for the inter FFT processing. Best result...
[ { "role": "user", "content": "What is `Event`?" }, { "role": "assistant", "content": "Event — an environment that represents an action" }, { "role": "user", "content": "What does `Event.parentEvents` do?" }, { "role": "assistant", "content": "An extendible IdentityDiction...
[ { "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": "What is `HLayoutView` in SuperCollider?" }, { "role": "assistant", "content": "HLayoutView — A container view that arranges its children horizontally Category: GUI > Views." } ]
[ { "role": "user", "content": "Explain `Henon2DC` in SuperCollider briefly." }, { "role": "assistant", "content": "Henon2DC — henon map 2D chaotic generator `y = b * x(n)` Category: UGens > Generators > Stochastic." } ]
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// Reminder: This isn't the intended typical usage! It's OK to do this though.\n(\nx = {\n var mags, phases, chain, sig;\n // Create simple undulating magnitudes\n mags = { FSinOsc.kr(ExpRand(0.1, 1)).range(0, 1) }.dup...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n//MUST be a buffer with data in format [sizeofcurrentsieve,sieveentry1,sieveentry2,...] where currentsize always less than initially allocated buffer length -1. \n\n{ Sieve1.ar(LocalBuf.newFrom([10]++({0.75.rand}!10)),Mou...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Diwhite`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a, freq, trig;\n a = Diwhite(0, 15, inf);\n trig = Impulse.kr(MouseX.kr(1, 40, 1));\n freq = Demand.kr(trig, 0, a) * 30 + 340;\n SinOs...
[ { "role": "user", "content": "How should I organise a SuperCollider project on disk?" }, { "role": "assistant", "content": "One folder per piece, with a fixed shape:\n\n```text\nmy-piece/\n synthdefs.scd // only SynthDef(...).add, loaded first\n material.scd // buffers, samples, scales\n ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nNdef(\\sound, { SinOsc.ar([600, 635], Ndef.ar(\\sound), LFNoise1.kr(2).max(0) * 0.2) });\nNdef(\\sound.play;\nNdef.clear;\n```" }, { "role": "assistant", "content": "...
[ { "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 is `Pdefn`?" }, { "role": "assistant", "content": "Pdefn — non event stream reference definition" }, { "role": "user", "content": "What does `Pdefn.all` do?" }, { "role": "assistant", "content": "A global IdentityDictionary with all prox...
[ { "role": "user", "content": "What is `PBRZ2` in SuperCollider?" }, { "role": "assistant", "content": "PBRZ2 — UGenPatterns quark library Based on BRZ2 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(\n{ Latoocarfian2DC.ar(\n SampleRate.ir/8,\n SampleRate.ir/2,\n LFNoise2.kr(2.dup, 1.5, 1.5),\n d:LFNoise2.kr(2.dup, 0.5, 1.5),\n mul:0.2\n) }.play(s);\n```" }, { "...
[ { "role": "user", "content": "Explain this SuperCollider patch.\n```supercollider\n// NTMI.zoom sets all the influx'es inScalers AND RandomOrbit's excursion from current state.\n\nNTMI.zoom = NTMI.zoom?1;\n\n// tune this for jitter on zoom pot on NTMI\nSpec.add(\\zoom, [0, 1, \\lin, 0.025]);\n\nNTMI.setZoom...
[ { "role": "user", "content": "Show another SuperCollider example using `BusPlug`." }, { "role": "assistant", "content": "```supercollider\nb = BusPlug.new;\n{ Blip.ar(b + 5) }.play;\nb.bus.set(12);\n```" } ]
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `PV_RectComb`. Define every value it uses." }, { "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(...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `DigitalIO` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n// write a sine oscillator's output to a pin, and read the pin value at other times\n\n(\nSynthDef(\"help-DigitalIO\", { |out =...
[ { "role": "user", "content": "Write an Ndef with a blip source and a 800 Hz low-pass. (ugens blip, cutoff 800, 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...