conversations
listlengths
2
6
[ { "role": "user", "content": "Add freeverb to a pluck patch at room 0.85. (verb freeverb, room 0.85, damp 0.5, mix 0.3, source pluck)" }, { "role": "assistant", "content": "Put the reverb inside the `SynthDef` so it is part of the voice:\n\n```supercollider\n// reverb: freeverb on a pluck\n(\nSy...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `In` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\n(\nSynthDef(\"help-PinkNoise\", { |out = 0|\n Out.ar(out, PinkNoise.ar(0.1))\n}).add;\n\nSynthDef(\"...
[ { "role": "user", "content": "Add freeverb2 to a pluck patch at room 0.7. (verb freeverb2, room 0.7, damp 0.2, mix 0.3, source pluck)" }, { "role": "assistant", "content": "A send-style patch: dry signal plus the reverb on the tail:\n\n```supercollider\n// reverb: freeverb2 on a pluck\n(\nSynthD...
[ { "role": "user", "content": "Give me a sine kick with a 0.06 s pitch sweep. (osc sine, sweep 0.06, decay 0.18, f0 220, 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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ BPF.ar(Saw.ar(200, 0.5), FSinOsc.kr(XLine.kr(0.7, 300, 20), 0, 3600, 4000), 0.3) }.play;\n\n{ BPF.ar(Saw.ar(200, 0.5), MouseX.kr(100, 10000, 1), 0.3) }.play;\n\n // BPF on con...
[ { "role": "user", "content": "What is `OSCresponderNode` in SuperCollider?" }, { "role": "assistant", "content": "OSCresponderNode — client side network responder Category: External Control > OSC." } ]
[ { "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": "Show another SuperCollider example using `Stethoscope`." }, { "role": "assistant", "content": "```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...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `Pan2` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\ng = Group.new;\n\n// make 4 synths in g\n// 1.0.rand2 returns a random number from -1 to 1.\n4.do({ { arg amp ...
[ { "role": "user", "content": "What does `MIDIMessageDispatcher.getKeysForFuncProxy` do? What arguments does it take?" }, { "role": "assistant", "content": "Get the keys at which a responder func's functions are stored in this dispatcher's active dictionary. The keys will be MIDI message Argument...
[ { "role": "user", "content": "Write a kick drum with a 0.25 s decay. (osc sine, sweep 0.06, decay 0.25, f0 180, f1 48, 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: sine oscillator...
[ { "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{ LPZ2.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{ Gbman2DN.ar(MouseX.kr(20, SampleRate.ir*0.25), MouseX.kr(80, SampleRate.ir), 0.1) }.play(s);\n\n{ Gbman2DN.ar(11025, 22050, -0.7, -2.7, 0.1) }.play(s);\n\n{ Gbman2DN.ar(2200, 8...
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n// Pantophonic (2D) decoder with four channels arranged in a rectangle:\n// [ 30, -30, -150, 150 ]\n\n// specify 1/2 the desired directions\n~directions = [ 30, -30 ].degrad;\n~decoder = FoaDecoderMatrix.newDiametric(~directio...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```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.1) }.play\n\n{ LFDClipNoise.ar(MouseX.kr(0.1, 1000, 1), 0.1) }.play\n\n// si...
[ { "role": "user", "content": "What does `Float.clip` do? What arguments does it take?" }, { "role": "assistant", "content": "Return this if lo <= this <= hi, otherwise return the nearest boundary: lo if this < lo, hi if this > Arguments: lo — The low threshold of clipping.; hi — The high thresho...
[ { "role": "user", "content": "Give me a complete SuperCollider patch for electric hum: bind everything it needs before it is used." }, { "role": "assistant", "content": "```supercollider\n(\nNdef(\\eHum).addSpec(\\fFreq, ControlSpec(25, 1000, \\lin, step: 25));\nNdef(\\eHum).addSpec(\\fRq, [0.01...
[ { "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.5, f0 150, f1 48, amp 0.8, rev 0)" }, { "role": "assistant", "content": "Start with a swept sine, then shorten the decay to taste:\n\n```supercollider\n// kick drum: saw osc...
[ { "role": "user", "content": "Show another SuperCollider example using `Compander`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var z;\n\n // signal (clean)\n z = Decay2.ar(\n Impulse.ar(8, 0, LFSaw.kr(0.3, 1, -0.3, 0.3)),\n 0.001,\n 0.3\n )\n * Mix.ar(Pulse.ar(...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LFTri`." }, { "role": "assistant", "content": "```supercollider\n// plot:\n{ LFTri.ar(40) }.plot(0.1);\n{ LFTri.ar(XLine.kr(1, 800, 0.1)) }.plot(0.1);\n\n{ LFTri.ar(500, 0, 0.1) }.play\n\n// used as both Oscillator an...
[ { "role": "user", "content": "Write a closed hi-hat in SuperCollider." }, { "role": "assistant", "content": "High-passed noise with a very short envelope — the filter is what makes it a hat rather than a hiss.\n\n```supercollider\n(\nSynthDef(\\hat, { |out = 0, amp = 0.3, dur = 0.06|\n var en...
[ { "role": "user", "content": "What does `EZRanger.font` do? What arguments does it take?" }, { "role": "assistant", "content": "Set the Font used by all the Arguments: font — An instance of Font.." } ]
[ { "role": "user", "content": "What is `HilbertWRe` in SuperCollider?" }, { "role": "assistant", "content": "HilbertWRe — Applies the Real part of the Hilbert Transform to an input signal. [1] Offers the Hilbert Transform of an input signal via Weaver's Third Method. footWeaver, Donald. “A Third ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `PV_Mul`." }, { "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.5);\n inB = SinOsc.ar(Line.kr(...
[ { "role": "user", "content": "What does `BufAllpassC.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "Buffer based all pass delay line with cubic interpolation. Arguments: buf — Buffer number.; in — The input signal.; delaytime — Delay time in seconds.; decaytime — Tim...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// Ndef\nNdef(\\a, { Saw.ar(12) }).asCode;\n\n// in a pushed proxy space\np = ProxySpace.push(s.boot);\n~x = { Saw.ar(123, 0.1 };\n~x.play;\n~x.asCode;\n\np.end.pop;\n\n// anonym...
[ { "role": "user", "content": "What is `ListTrig2` in SuperCollider?" }, { "role": "assistant", "content": "ListTrig2 — Emit a sequence of triggers at specified time offsets Just like ListTrig, but takes a list of time-intervals (\"deltas\") rather than a list of time offsets. Category: UGens > B...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// allocate buffer\nb = Buffer.alloc(s, 44100, 1);\n\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, WhiteNoise.ar);\n...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// Create a new empty collections with size 3:\nx = Array.new(3);\ny = Array.new(3);\nz = List.new(3);\n\n// Try to add 7 items to the array and list.\n// If the array exceeds maxSize, it will only\n// grow to an internal...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\na = NodeProxy(s);\na.source = { |freq = 444| Blip.ar(freq * [1, 1.03], 200) * 0.1 };\na.play;\na.set(\\freq, 555);\nb = a.copy;\nb.play;\nb.set(\\freq, 222;\n```" }, { "r...
[ { "role": "user", "content": "What does `MIDIMKtlDevice.closeDevice` do?" }, { "role": "assistant", "content": "Close the device and clean up anything that it" } ]
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\n{\n NLFiltN.ar(\n LFSaw.ar([120, 180], 0, mul:0.1),\n 0.5,\n -0.04,\n 0.8,\n 0.2,\n LFCub.kr(0.2, [0, 0.5 * pi], 63, 103)\n )\n}.play\n);\n\n(\n{\n NLFiltN.ar(\n LFSaw.ar(XLine.kr([60, 90], [360...
[ { "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": "Show me a self-contained SuperCollider patch using `GVerb`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n(\n// CAUTION: THE FOLLOWING CAN BE EXTREMELY LOUD\n// set the following variable to true if you want to run this cod...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `PackFFT` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n// Reminder: This isn't the intended typical usage! It's OK to do this though.\n(\nx = {\n var mags, phase...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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 = 0|\n DigitalIO.ar(0, SinOsc.ar(10), LFPulse.kr(...
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n// playing two interval lines in parallel\n\n(\n~a = Pseq([4, 2, 0]) + [0, -5];\n~b = Pseq([7, 5, 4]) + [0, 5];\n \np = Pbind(\n \\dur, Pseq([0.4, 0.2, 0.2], inf),\n \\note, PLn(\\a)\n);\n \nq = Pbindf(p, \\note, PLn(\...
[ { "role": "user", "content": "What is `Cepstrum` in SuperCollider?" }, { "role": "assistant", "content": "Cepstrum — Quefrency analysis and liftering Fourier analysis of the shape of a signal's log-power spectrum. Because this transform applies to magnitudes and not the phases (i.e. it ignores h...
[ { "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{ LinCongL.ar(\n LFNoise2.kr(1, 1e4, 1e4),\n LFNoise2.kr(0.1, 0.5, 1.4),\n LFNoise2.kr(0.1, 0.1, 0.1),\n LFNoise2.kr(0.1)\n) * 0.2 }.play(s);\...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\na = {LFTri.ar(100+(1000*Maths.ar(MouseX.kr, MouseY.kr, 0.2, 1-MouseButton.kr(lag:0.001))[0]), 0, 0.1)}.play //notice how I am taking the [0th channel of the Maths and ignoring th...
[ { "role": "user", "content": "What is `Instr` in SuperCollider?" }, { "role": "assistant", "content": "Instr — An enhanced version of SynthDef with a library An Instrument is a function that has a unique name attached to it and Specs that describe the input and output datatypes. Category: Librar...
[ { "role": "user", "content": "What does `PlayerMixer.beatDuration` do?" }, { "role": "assistant", "content": "takes multiple players as input, mixes them to a single (stereo) output" } ]
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `Duty`: bind everything it needs first." }, { "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 ...
[ { "role": "user", "content": "Explain `RedBase64` in SuperCollider briefly." }, { "role": "assistant", "content": "RedBase64 — base64 encoding/decoding See http://en.wikipedia.org/wiki/Base64 Category: Red > redTools." } ]
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `LFSaw`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n(\nfork {\n ~group = Group();\n\n 2.wait;\n\n SynthDef(\\buzz, {\n |out = 0, freq = 300, amp = 0.1, filter = 1....
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\n// Simple amplitude tracker sending values to sclang\nSynthDef(\\ampTracker, { |in|\n var freq = 30; // num of values per second\n SendReply.kr(Impulse.kr(freq), '/amp', Amplitude.kr(SoundIn.ar(in)));\n}).add;\n);\n...
[ { "role": "user", "content": "Write a Pbind whose degrees repeat every Prand cycle. (scale majorPentatonic, seq Prand, dur 0.3, octave 6, instr fm, root 0)" }, { "role": "assistant", "content": "Put the scale and the degree pattern in the `Pbind` and it will pick notes for you:\n\n```supercollid...
[ { "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": "How do I make a kick that starts at 150 Hz and falls to 40 Hz? (osc fm, sweep 0.06, decay 0.12, f0 150, f1 40, amp 0.8, rev 0)" }, { "role": "assistant", "content": "Start with a swept sine, then shorten the decay to taste:\n\n```supercollider\n// kick drum: fm osci...
[ { "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": "Explain `Demand` in SuperCollider briefly." }, { "role": "assistant", "content": "Demand — Demand results from demand rate UGens. When there is a trigger at the trig input, a value is demanded each UGen in the list and output. The unit generators in the list should ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-NRand\", { |out = 0, n = 0|\n Out.ar(out,\n FSinOsc.ar(\n NRand(1200.0, 4000.0, n),\n 0, Line.kr(0.2, 0, 0.01, doneAction: Done.freeSelf))\n )\n...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\na = AllGui.new;\n // test adding things that should show up: \na = 12;\nz = 42;\n~bar = 345;\n~foo = 345;\nTdef(\\a); \nTdef(\\b); \nPdef(\\a);\nPdef(\\b);\nPdefn(\\trala);\nPdefn(\\hopsa);\nNdef(\\a);\nNdef(\\b);\n /...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nfork {\n { SinOsc.ar(440 ! 2) * Line.kr(0, 1, 5, doneAction: Done.freeSelf) }.play.waitForFree;\n { PinkNoise.ar(1) * Line.kr(1, 0, 2, doneAction: Done.freeSelf) }.play....
[ { "role": "user", "content": "What is `SequenceableCollection`?" }, { "role": "assistant", "content": "SequenceableCollection — Abstract superclass of indexable collections" }, { "role": "user", "content": "What does `SequenceableCollection.series` do?" }, { "role": "assistan...
[ { "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": "What does `UnicodeResponder.report` do?" }, { "role": "assistant", "content": "register responder functions for unicode and modifier combinations" } ]
[ { "role": "user", "content": "Explain `Int32Array` in SuperCollider briefly." }, { "role": "assistant", "content": "Int32Array — an array whose indexed slots are all of the same type These classes implement arrays whose indexed slots are all of the same type. Category: Collections > Ordered." ...
[ { "role": "user", "content": "Write a random pentatonic melody that plays by itself." }, { "role": "assistant", "content": "Pick degrees from a pentatonic scale; `\\scale` and `\\root` define the pitch space, and `\\degree`\npicks within it.\n\n```supercollider\n(\nPbind(\n \\instrument, \\de...
[ { "role": "user", "content": "How do I put a kick in a reverb at mix 0.45?" }, { "role": "assistant", "content": "Put the reverb inside the `SynthDef` so it is part of the voice:\n\n```supercollider\n// reverb: gverb on a kick\n(\nSynthDef(\\reverb_synth, { |out = 0, freq = 330, amp = 0.2|\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{ FBSineC.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 `Archive`." }, { "role": "assistant", "content": "```supercollider\n// make a storage place for various objects:\nq = (); // Event\n\nq[\\a_long_array] = Array.rand(128, 0.0, 1.0);\nq[\\pi_squared] = pi * pi;\nq[\\favo...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `RunningSum`." }, { "role": "assistant", "content": "```supercollider\n// distorts of course - would need scaling\n{ RunningSum.ar(SoundIn.ar) }.play\n\n// Running Average over x samples\n(\n{\n var x = 100;\n Ru...
[ { "role": "user", "content": "Write a granular texture, through a reverb. (rate 10, dur 0.07, 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(\ns.w...
[ { "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": "Write a complete SuperCollider patch built around `SelectXFocus` that runs as it is." }, { "role": "assistant", "content": "```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 ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Dgeom`." }, { "role": "assistant", "content": "```supercollider\n// example\n\n(\n{\n var a, freq, trig;\n a = Dgeom(1, 1.2, 15);\n trig = Impulse.kr(MouseX.kr(1, 40, 1));\n freq = Demand.kr(trig, 0, a) * 30 + 340...
[ { "role": "user", "content": "What does `HasSubject.subject` do?" }, { "role": "assistant", "content": "parent class for Players that have subplayers" } ]
[ { "role": "user", "content": "How do I build a live drone with Ndef at 55 Hz? (ugens blip, cutoff 200, 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 200 Hz low...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `NdefGui`." }, { "role": "assistant", "content": "```supercollider\n(\np = ProxySpace.push(s.boot);\n\nl = NdefGui(nil, 3).moveTo(10, 120);\nm = NdefGui(nil, 3).moveTo(10, 240);\nn = NdefGui(nil, 3).moveTo(10, 360);\no...
[ { "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 = Dbrown2(0, 15, 1, [1, 4], inf);\n trig = Dust.kr(MouseX.kr(1, 40, 1));\n freq = Demand.kr(trig, 0, a) * 30 + 340;\n SinOsc.ar(freq) * 0.1\n\n...
[ { "role": "user", "content": "Explain `Pprob` in SuperCollider briefly." }, { "role": "assistant", "content": "Pprob — random values with arbitrary probability distribution Creates an integral table on instantiation (cpu intensive) which is then used by the streams to generate random values effi...
[ { "role": "user", "content": "Explain this SuperCollider patch.\n```supercollider\n// python preprocessor, given that you have python installed\n// thanks to tasos tsesmetzis\n\n(\nthis.preProcessor = PreProcessor.new.startDelimiter_(\"{-\").endDelimiter_(\"-}\");\n\n// a simple python call\ne = (\n lang:...
[ { "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": "What is `LinCongC` in SuperCollider?" }, { "role": "assistant", "content": "LinCongC — Linear congruential chaotic generator A cubic-interpolating sound generator based on the difference equation: Category: UGens > Generators > Chaotic." } ]
[ { "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{ LPZ1.ar(WhiteNoise.ar(0.25) }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the pa...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\nNdef(\\nodeTest, {\n // the input\n var input = Impulse.ar([1, 3, 5].reciprocal, phase: [0, 0.133, 0.5]).sum;\n\n // the nodes, each takes its predecessor as input and estimates the duration between two events. \n...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `PackFFT`." }, { "role": "assistant", "content": "```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 undulati...
[ { "role": "user", "content": "What is `Plotter`?" }, { "role": "assistant", "content": "Plotter — Plot numerical data on a window or view" }, { "role": "user", "content": "What does `Plotter.plotGraph` do?" }, { "role": "assistant", "content": "`{ |x| sin(x) }.plotGraph(3...
[ { "role": "user", "content": "What is `UScoreEditor` in SuperCollider?" }, { "role": "assistant", "content": "UScoreEditor — (put short description here) (put long description here) Category: UnitLib." } ]
[ { "role": "user", "content": "What is the difference between the language and the server?" }, { "role": "assistant", "content": "sclang runs your code, the clock and Patterns, and builds UGen graphs. scsynth performs the DSP in real time. They communicate over OSC, which is why a language-side m...
[ { "role": "user", "content": "What does `SoundFileView.readFile` do? What arguments does it take?" }, { "role": "assistant", "content": "Reads a section of an open instance of SoundFile, and displays it in the view. For large files, you may want to use the method readWithTask instead. The 'block...
[ { "role": "user", "content": "Write a SuperCollider patch for sound of an alien weapon firing. Start by defining the values the patch depends on." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"raygun\", {arg amp = 0.5, sinfreq = 1000, glissf = 0.001, att = 0.01, rel = 0.9...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\n// given a simple instrument\nInstr(\\Pulse,{ arg freq=440.0,width=0.5,mul=0.1;\n Pulse.ar( freq, width, mul )\n});\n\n// a patch specifies inputs (arguments) to that instrument\np = Patch( \\Pulse, [ 300, 0.2, 0.1 ])...
[ { "role": "user", "content": "What is `ControlSpec`?" }, { "role": "assistant", "content": "ControlSpec — numerical input specification" }, { "role": "user", "content": "What does `ControlSpec.map` do?" }, { "role": "assistant", "content": "Maps and constrains a value bet...
[ { "role": "user", "content": "How do I make a delay line?" }, { "role": "assistant", "content": "`CombN.ar(in, maxdelaytime, delaytime, decaytime)` is a feedback delay: maxdelaytime is the buffer size, delaytime the actual delay (and it can modulate), decaytime how long the repeats take to die. ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Klank.ar(`[[800, 1071, 1153, 1723], nil, [1, 1, 1, 1]], Impulse.ar(2, 0, 0.1) }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `VarLag`." }, { "role": "assistant", "content": "```supercollider\n(\n// used to lag pitch\n{\n SinOsc.ar( // sine wave\n VarLag.kr( // lag the modulato...
[ { "role": "user", "content": "What is `Pdup` in SuperCollider?" }, { "role": "assistant", "content": "Pdup — repeat input stream values repeat each element n times. If the value of n is less than 1, the input element is skipped and no event is produced. This behavior is intentional and can be us...
[ { "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": "Explain `Latch` in SuperCollider briefly." }, { "role": "assistant", "content": "Latch — Sample and hold Holds input signal value when triggered. Latch will output 0 until it receives its first trigger. Category: UGens > Triggers." } ]
[ { "role": "user", "content": "Write a granular texture, dry." }, { "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 = Buffer.read(s, Platform.resourceDir +/+ \"sounds/...
[ { "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 Pbind whose degrees repeat every Pwalk cycle. (scale minorPentatonic, seq Pwalk, dur 0.3, octave 4, instr fm, root 0)" }, { "role": "assistant", "content": "Put the scale and the degree pattern in the `Pbind` and it will pick notes for you:\n\n```supercollid...
[ { "role": "user", "content": "Show another SuperCollider example using `LinCongN`." }, { "role": "assistant", "content": "```supercollider\n// randomly modulate params\n(\n{ LinCongN.ar(\n LFNoise2.kr(1, 1e4, 1e4),\n LFNoise2.kr(0.1, 0.5, 1.4),\n LFNoise2.kr(0.1, 0.1, 0.1),\n LFNoise2.kr(0.1...
[ { "role": "user", "content": "Explain `Crackle` in SuperCollider briefly." }, { "role": "assistant", "content": "Crackle — Chaotic noise function. A noise generator based on a chaotic function. Category: UGens > Generators > Stochastic." } ]
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\nf = ();\nf.beatAndBar = {\n var t = currentEnvironment.clock; // t= TempoClock.new;\n var text = \"xB: \";\n\n var nBeatsPerBar = { arg n, beats, clock;\n var nBpb = clock.beatsPerBar * n;\n \"\" ++ n ++ te...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\nb = Buffer.read(s, Platform.resourceDir +/+ \"sounds/a11wlk01.wav\");\n\n(\n{\n var snd, envTime, knee, out;\n snd = PlayBuf.ar(1, b, BufRateScale.kr(b), loop: 1);\n envTime = MouseX.kr(1.0e-3, 0.1e-3);\n kne...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LFClipNoise`." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-LFClipNoise\", { |out = 0|\n Out.ar(out,\n LFClipNoise.ar(1000, 0.25)\n )\n}).play;\n);\n\n// modulate frequency\n(\nSynth...
[ { "role": "user", "content": "How do I granulate a sample with 0.15 s grains? (rate 14, dur 0.15, interp 4, mode noise1, rev 0)" }, { "role": "assistant", "content": "Granulation is `GrainBuf` plus a trigger rate; the position can move:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns....