conversations
listlengths
2
6
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `BinaryOpUGen`." }, { "role": "assistant", "content": "```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 ...
[ { "role": "user", "content": "Explain `PSloop` in SuperCollider briefly." }, { "role": "assistant", "content": "PSloop — Pattern to derive loops from a given Pattern Although PSloop is not a subclass of PStream, instances of PSloop have a state by storing a PStream of the source pattern in an in...
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nb = Buffer.read(s, ExampleFiles.child);\n\n{ BufRd.ar(1, b, Sweep.ar(Impulse.ar(BufDur.kr(b).reciprocal), BufSampleRate.kr(b)) }.play;\n\nb.free\n```" }, { "role": "assis...
[ { "role": "user", "content": "Show another SuperCollider example using `LorenzL`." }, { "role": "assistant", "content": "```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 }.pla...
[ { "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": "Write a minimal SuperCollider example that uses `Hilbert`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\ns.scope;\na = { Hilbert.ar(SinOsc.ar(100)) * -20.dbamp }.play;\na.release;\n```" } ]
[ { "role": "user", "content": "Explain `Document` in SuperCollider briefly." }, { "role": "assistant", "content": "Document — Editor-specific text document editing The Document class represents a text document within the context of your text editing environment. You can use the class to programma...
[ { "role": "user", "content": "What does `MarkovSynth.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "First order Markov Chain implementation for audio signals Arguments: in — Signal input. Should be a signal between -1 and 1. Higher and lower values are clipped and in...
[ { "role": "user", "content": "What is `Fb1` in SuperCollider?" }, { "role": "assistant", "content": "Fb1 — single sample feedback / feedforward pseudo ugen Fb1 provides an interface for single sample feedback and feedforward at audio and control rate, the defining relation with (formal) access t...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `PV_MagFreeze`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\nb = Buffer.read(s, ExampleFiles.child);\n\n\n(\nSynthDef(\"help-magFreeze\", { |out = 0|\n var in, chain;\n in = SinOsc.ar(LFNoise1.kr...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `SortedList`." }, { "role": "assistant", "content": "```supercollider\nt = SortedList.new(8, {|a,b| a.first < b.first });\nt.add([10, \"last\"]);\nt.add([1, \"first\"]);\nt.postln;\n```" } ]
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n// fadeTimes should be above blockSize\n// for shorter grains you can use smaller blocksizes\n\n(\ns.options.blockSize = 2;\ns.reboot;\n);\n\n// as the effect is AM on single outs we get side bands\n\n(\ns.doWhenBooted {\n x ...
[ { "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": "Give me a fm kick with a 0.06 s pitch sweep. (osc fm, sweep 0.06, decay 0.25, f0 220, f1 40, 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: fm oscillat...
[ { "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 an Ndef at 110 Hz I can retune while it plays. (ugens tri, 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: tri source through a 40...
[ { "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{ 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 is `EnvelopeView` in SuperCollider?" }, { "role": "assistant", "content": "EnvelopeView — A configurable view with nodes and connections A view which can graphically display nodes at x/y coordinates, connection lines, cross-connections, node markers, and labels...
[ { "role": "user", "content": "What does `Every.list` do?" }, { "role": "assistant", "content": "holds a list of Contraints, validates that the test object satisifes all of those" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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.99, 10) }.play\n```" }, {...
[ { "role": "user", "content": "Explain `CytonWifi` in SuperCollider briefly." }, { "role": "assistant", "content": "CytonWifi — for communicating with a Cyton board (8ch) this class is for communication via wifi osc (wifishield). use CytonSerial for the bluetooth dongle. Category: External Contro...
[ { "role": "user", "content": "Write a Pbind whose degrees repeat every Prand cycle. (scale majorPentatonic, seq Prand, dur 0.2, octave 5, instr sine, root 0)" }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nSynthDef(...
[ { "role": "user", "content": "How do I make a kick that starts at 150 Hz and falls to 48 Hz? (osc fm, sweep 0.06, decay 0.18, f0 150, f1 48, amp 0.6, rev 1)" }, { "role": "assistant", "content": "The pitch envelope is what makes it read as a drum, not the oscillator:\n\n```supercollider\n// kick...
[ { "role": "user", "content": "What does `OSCdef.freeAll` do?" }, { "role": "assistant", "content": "Clears and deactivates all OSCdefs from the global" } ]
[ { "role": "user", "content": "What is `RedWorld3` in SuperCollider?" }, { "role": "assistant", "content": "RedWorld3 — world with hard walls See also RedWorld, RedWorld1, RedWorld2. Category: Red > redUniverse." } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Crackle`." }, { "role": "assistant", "content": "```supercollider\n{ Crackle.ar(1.95, 0.5) }.play;\n\n// modulate chaos parameter\n{ Crackle.ar(Line.kr(1.0, 2.0, 3), 0.5, 0.5) }.play;\n```" } ]
[ { "role": "user", "content": "What does `View.keyDown` do?" }, { "role": "assistant", "content": "Handles response to a key press event. First evaluates Returns: A Boolean, stating whether the event was handled or not (and will not or will propagate to the parent view, respectively), or the view...
[ { "role": "user", "content": "What does `Slider.defaultGetDrag` do?" }, { "role": "assistant", "content": "A view consisting of a sliding handle. Returns: The #-value." } ]
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n//listen to x and y output\n{Out.ar(0,Brusselator.ar(Impulse.kr(MouseY.kr(1,50,'exponential')),MouseX.kr(0.01,1,'exponential')))}.play\n\n//avoid DC offset (default gamma is 1.0, listening to x only, so take off gamma\n{O...
[ { "role": "user", "content": "What does `Plotter.findSpecs` do?" }, { "role": "assistant", "content": "If `true`, specs are derived from new data (using min and max values) automatically. Default:" } ]
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `PV_Mul`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\n(\nSynthDef(\"help-mul\", { |out = 0|\n var inA, chainA, inB, chainB, chain ;\n inA = SinOsc.ar(500, 0, 0...
[ { "role": "user", "content": "How do I make a kick that starts at 180 Hz and falls to 40 Hz? (osc fm, sweep 0.06, decay 0.18, 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...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n//Version 1\n//P(eace)Bind\n//If error messages could experience Nirvanna, it would sound like this.\n(\n{\nSaw.ar(\n freq: SinOsc.kr([60, 63, 67, 70]).range(440,880),\n mul:LFNoise0.kr(freq: [0.25,1]).range(0,1),\...
[ { "role": "user", "content": "What does `ServerOptions.numOutputBusChannels` do?" }, { "role": "assistant", "content": "The number of audio output bus channels. This need not correspond to the number of hardware outputs (this can be useful for instance in the case of recording). The default is" ...
[ { "role": "user", "content": "What does `DataSmoothing.filterLog` do? What arguments does it take?" }, { "role": "assistant", "content": "smooth in dB power Arguments: data — an Array of values.. Returns: an Array of smoothed values." } ]
[ { "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 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\n(\np = Pbind(\n \\midinote, PLnaryop('+', \\src, [\\dev]),\n \\dur, 0.1\n);\n);\n\n...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Dswitch1`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a, freq, trig;\n a = Dswitch1([1, 3, MouseY.kr(1, 15), 2, Dwhite(0, 3, 2)], MouseX.kr(0, 4));\n trig = Impulse.kr(3);\n freq = Demand....
[ { "role": "user", "content": "What is `Ringz` in SuperCollider?" }, { "role": "assistant", "content": "Ringz — Ringing filter. This is the same as Resonz, except that it is a constant skirt gain filter, meaning that the peak gain depends on the value of Q. Also, instead of the resonance paramete...
[ { "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, 512, 1);\nb.sine1(1.0 / [1, 2, 3, 4], true, true, true);\nx = { Osc.ar(b, 200, 0, 0.5) }.play;\n;\nx.free; b.free;\n```" }, { "role": "ass...
[ { "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": "Give me an Ndef with an LFO at 0.8 Hz. (ugens saw, cutoff 400, lfo 0.8, freq 55, amp 0.12)" }, { "role": "assistant", "content": "`Ndef` is a named proxy you can redefine while it is playing:\n\n```supercollider\n// Ndef drone: saw source through a 400 Hz low-pass\n...
[ { "role": "user", "content": "Give me a saw kick with a 0.06 s pitch sweep. (osc saw, sweep 0.06, decay 0.25, f0 180, f1 55, 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: saw oscil...
[ { "role": "user", "content": "What does `PBlip.new` do? What arguments does it take?" }, { "role": "assistant", "content": "UGenPatterns quark library Arguments: freq; numharm; mul; add; length — Number of values produced.." } ]
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// as a frequency control\n{ SinOsc.ar(StandardL.ar(40, MouseX.kr(0.9, 4))*800+900)*0.4 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracket is mis...
[ { "role": "user", "content": "Write a Pbind in minorPentatonic using Pseq for the degrees. (scale minorPentatonic, seq Pseq, dur 0.2, octave 5, instr fm, root 0)" }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nSynth...
[ { "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": "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": "Write a complete SuperCollider patch built around `Dust2` that runs as it is." }, { "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\", { ...
[ { "role": "user", "content": "Show another SuperCollider example using `Duty`." }, { "role": "assistant", "content": "```supercollider\n(\n {\n var freq;\n freq = Duty.kr(\n Dseq([0.2, 0.3, 0.4, Dseq([1, 1, 1, 2, 1, 2], inf)]) / 2,\n Dust.kr(1), // control rate reset\n ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Ddup`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var freq, trig;\n var in = Dseq([1, 2, 3], inf);\n var rep = Ddup(Diwhite(2, 8, inf), in);\n trig = Impulse.kr(MouseX.kr(1, 40, 1));\n freq =...
[ { "role": "user", "content": "What does this SuperCollider code do?\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;...
[ { "role": "user", "content": "Give me a pluck with damping 0.2 on the reverb. (verb freeverb, room 0.7, damp 0.2, mix 0.45, source pluck)" }, { "role": "assistant", "content": "A send-style patch: dry signal plus the reverb on the tail:\n\n```supercollider\n// reverb: freeverb on a pluck\n(\nSyn...
[ { "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": "Write a self-contained SuperCollider patch that uses `LeastChange`. Define every value it uses." }, { "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(...
[ { "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": "What does `Brusselator.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "Prigogine oscillator Arguments: reset — If > 0.0, restart with new initial conditions sampled from initx, inity; rate — update rate for a sample step; mu — equation co...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ LFNoise1.ar(1000, 0.25) }.play;\n\n// modulate frequency\n\n{ LFNoise1.ar(XLine.kr(1000, 10000, 10), 0.25) }.play;\n\n// as frequency modulator\n(\n{ SinOsc.ar(\n LFNoise1.a...
[ { "role": "user", "content": "What is `Spring` in SuperCollider?" }, { "role": "assistant", "content": "Spring — physical model of resonating spring models the force of a resonating spring Category: UGens > Filters > Nonlinear, UGens > Generators > PhysicalModels." } ]
[ { "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": "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{\n var w, x, y, p, a, b, c, d;\n\n p = PinkNoise.ar; // source\n\n // B-format encode\n #w, x, y = PanB2.ar(p, MouseX.kr(-1, 1), 0.1);\n\n // B-format decode to quad\n ...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// For most cases the symmetric symplectic procedures with prefix 'sym' should be used (default 'sym2').\n// They deliver best results with regard to long-term stability, see links at top.\n// In case you suspect instabil...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch for nothing much ). Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n(\n{|atk=0.05,dur=10,freq=50,amp=0.8|\n PMOsc.ar(\n Line.kr(1,2,dur,freq),\n LFNoise2.kr([1,2]).range(1,2)*freq...
[ { "role": "user", "content": "Explain `Logistic` in SuperCollider briefly." }, { "role": "assistant", "content": "Logistic — Chaotic noise function A noise generator based on the logistic map: `y = chaosParam * y * (1.0 - y)` Category: UGens > Generators > Chaotic." } ]
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `AnalogIn`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n// modulate frequency of a sine oscillator\n\n(\nSynthDef(\"help-AnalogIn\", { |out = 0|\n Out.ar(out,\n SinOs...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ PinkNoise.ar(1) * Line.kr(1, 0, 2, doneAction: Done.freeSelf }.play.onFree { \"done\".postln };\n```" }, { "role": "assistant", "content": "A closing bracket is mis...
[ { "role": "user", "content": "Show another SuperCollider example using `LinLin`." }, { "role": "assistant", "content": "```supercollider\n// linlin\n(\n{\n var mod = LFNoise2.ar(80);\n SinOsc.ar(mod.linlin(-1, 1, MouseX.kr(200, 8000, 1), MouseY.kr(200, 8000, 1))) * 0.1\n}.play;\n);\n\n// range...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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": "assistant...
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// constant source (72), max deviation +/- 3\n// no repetition within 5 pitches\n\n(\nx = {\n var trig = Impulse.ar(5);\n var midi = Demand.ar(trig, 0, DIdev(72, 2, -1, 2));\n ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `PinkNoise`." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-PinkNoise\", { |out = 0|\n Out.ar(out,\n PinkNoise.ar(0.4)\n )\n}).play;\n)\n```" } ]
[ { "role": "user", "content": "What does `Class.initClass` do?" }, { "role": "assistant", "content": "When SuperCollider starts up, just after it has compiled the library, it initializes all the classes from Object down, a depth first traversal of subclasses. This method can be overloaded in any ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.boot;\n(\nx = SynthDef(\"help-node-set\", { |freq = 440, out = 0|\n Out.ar(out, SinOsc.ar(freq, 0, 0.1))\n}).play\n);\nx.run(false;\nx.run; // default is true\nx.free;\n```" ...
[ { "role": "user", "content": "Explain `FreeVerb` in SuperCollider briefly." }, { "role": "assistant", "content": "FreeVerb — A reverb Coded from experiments with faust. Category: UGens > Reverbs." } ]
[ { "role": "user", "content": "What does `RunningSum.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "Running sum over n frames Arguments: in — Input signal; numsamp — How many samples to take the running sum over (initialisation time only, not modulatable. default: 40)...
[ { "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": "What is `AbstractFunction`?" }, { "role": "assistant", "content": "AbstractFunction — An object which responds to a set of messages that represent mathematical functions" }, { "role": "user", "content": "What does `AbstractFunction.neg` do?" }, { ...
[ { "role": "user", "content": "What are the arguments of EnvGen?" }, { "role": "assistant", "content": "`EnvGen.ar(envelope, gate, levelScale, levelBias, timeScale, doneAction)` — or the .kr form. Envelope is an Env; gate is the signal that holds the envelope open (a number for a one-shot, a trig...
[ { "role": "user", "content": "What does `Monitor.copy` do?" }, { "role": "assistant", "content": "Return a copy of the receiver, with the same channel setting, but not running. You can run it with the settings by sending it the #-play message, and pass in any modifications you want to" } ]
[ { "role": "user", "content": "Give me an Ndef with an LFO at 0.3 Hz. (ugens blip, cutoff 3200, lfo 0.3, freq 55, amp 0.12)" }, { "role": "assistant", "content": "Use `Ndef` when the patch has to change without stopping:\n\n```supercollider\n// Ndef drone: blip source through a 3200 Hz low-pass\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{ BPZ2.ar(WhiteNoise.ar(0.25) }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the pa...
[ { "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": "How should I check an answer you give me?" }, { "role": "assistant", "content": "Three quick checks, cheapest first. Does it evaluate without a syntax error — the post window points at the exact character. Does the node appear in `s.plotTree` — if yes, the problem i...
[ { "role": "user", "content": "What does `Instr.spawnEvent` do? What arguments does it take?" }, { "role": "assistant", "content": "sets the Event 'type' = 'instr' and 'instr' = this and then .plays the Arguments: event." } ]
[ { "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": "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": "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": "Explain `WhiteNoise` in SuperCollider briefly." }, { "role": "assistant", "content": "WhiteNoise — White noise. Generates noise whose spectrum has equal power at all frequencies. Category: UGens > Generators > Stochastic." } ]
[ { "role": "user", "content": "How do I granulate a sample with 0.15 s grains? (rate 28, dur 0.15, 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 ...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `TChoose` that runs as it is." }, { "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)...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `Ball` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var f, sf;\n sf = K2A.ar(MouseX.kr > 0.5) > 0;\n f = Ball.ar(sf, MouseY.kr(0.01, 20, 1), 0.01);\n f...
[ { "role": "user", "content": "Write a kick whose tail uses freeverb2. (verb freeverb2, room 0.7, damp 0.2, mix 0.3, source kick)" }, { "role": "assistant", "content": "Put the reverb inside the `SynthDef` so it is part of the voice:\n\n```supercollider\n// reverb: freeverb2 on a kick\n(\nSynthDe...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\n{\n var saw, bpf;\n saw = Saw.ar(\n freq: [1700,2000],\n mul: LFPulse.kr(\n freq: [2,7],\n width: 0.115));\n bpf = LPF.ar(in: saw, freq: SinOsc.kr(1/3).range(250, 4000)); \n}.play;\n)\n```" }, {...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `Dwrand` that runs as it is." }, { "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)...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `NodeProxy` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\na = NodeProxy.new.play; // play to hardware output.\na.fadeTime = 2; // fadeTime specifies cro...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `RunningMin`." }, { "role": "assistant", "content": "```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...