conversations
listlengths
2
6
[ { "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 = 5, m = 64;\n a = {\n var x;\n x = { 0.2.rand2 } ! m;\n x = x ++ ({ Drand({ 0.2.rand2 } ! n) } ! m.rand);\n Dseq(x.scramble, inf)\n ...
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ SinOsc.ar(MouseX.kr(40, 10000, 1), 0, 0.1) }.play;\n{ SinOsc.ar(MouseX.kr(500, 10000, 1).poll, 0, 0.1 }.play;\n```" }, { "role": "assistant", "content": "A closing ...
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// modulate frequency\n{ Blip.ar(XLine.kr(20000, 200, 6), 100, 0.2) }.play;\n\n// modulate numharmonics\n{ Blip.ar(200, Line.kr(1, 100, 20), 0.2 }.play;\n```" }, { "role"...
[ { "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": "Explain `TaskProxy` in SuperCollider briefly." }, { "role": "assistant", "content": "TaskProxy — event stream reference Keeps a reference to a task (time pattern) that can be replaced while playing. It plays on when the old stream ended and a new stream is set and s...
[ { "role": "user", "content": "What does `PHSparUse.new` do? What arguments does it take?" }, { "role": "assistant", "content": "Creates a new PHSparUse Arguments: helpSynth — A HSpar object.; pbindArgs — Collection of the form [ dur1, pbindData1, ... , durN, pbindDataN ], whereby; hsIndices — Pe...
[ { "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": "Write a minimal SuperCollider example that uses `DigitalOut`." }, { "role": "assistant", "content": "```supercollider\n// write a sine oscillator's output to a pin\n\n(\nSynthDef(\"help-DigitalOut\", { |out = 0|\n DigitalOut.ar(0, SinOsc.ar(10));\n}).play;\n)\n``...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ LFSaw.ar(500, 1, 0.1) }.play\n\n// used as both Oscillator and LFO:\n{ LFSaw.ar(LFSaw.kr(4, 0, 200, 400), 0, 0.1 }.play\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// Add two UGens\n{ SinOsc.ar(440, 0, 0.2) + PinkNoise.ar(0.1; }.play\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n Instr(\\beatClockPlayerTest,{ arg gate=0.0;\n var a,t;\n\n t = gate;\n a = Decay2.kr(t,0.01,0.1).clip2(1.0);\n a * SinOsc.ar(300);\n },[\n \\gate\n ]);\n\n ...
[ { "role": "user", "content": "Give me a Pbind with fm voices and a 0.4 rhythm. (scale minorPentatonic, seq Pseq, dur 0.4, octave 6, instr fm, root 0)" }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nSynthDef(\\fm_voi...
[ { "role": "user", "content": "Write a SuperCollider patch for phasemodulation feedback and allpass network. Start by defining the values the patch depends on." }, { "role": "assistant", "content": "```supercollider\nn=LFNoise1;Ndef(\\x,{a=SinOsc.ar(65,Ndef(\\x).ar*n.ar(0.1,3),n.ar(3,6)).tanh;9.d...
[ { "role": "user", "content": "Give me a granular patch with noise1 grain position and interp 2. (rate 20, dur 0.2, interp 2, mode noise1, rev 1)" }, { "role": "assistant", "content": "`GrainBuf` needs a buffer, a trigger and a grain duration:\n\n```supercollider\n// granular synth with GrainBuf\...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Ball`." }, { "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 = f * 10 + 500;\n SinOsc.ar(f, 0, 0.2)\n}...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `ExpRand` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-ExpRand\", { |out = 0|\n Out.ar(out,\n FSinOsc.ar(\n ExpRand(100.0, 8000.0),\n ...
[ { "role": "user", "content": "Give me an Ndef with an LFO at 0.3 Hz. (ugens tri, cutoff 1400, 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: tri source through a 1400 Hz low-pass\n...
[ { "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": "Give me a complete SuperCollider patch for little experiment with periodicity: bind everything it needs before it is used." }, { "role": "assistant", "content": "```supercollider\n/* An little experiment with periodicity. \n Maybe there can be some sync artifac...
[ { "role": "user", "content": "Write an Ndef at 55 Hz I can retune while it plays. (ugens sine, cutoff 2400, lfo 0.1, freq 55, 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 thro...
[ { "role": "user", "content": "What is `FoaMagAa` in SuperCollider?" }, { "role": "assistant", "content": "FoaMagAa — First Order Ambisonic (FOA) Magnitude of Soundfield Active Admittance Vector Return the Magnitude of Active Admittance Vector, ||Aa||, of a first order ambisonic (B-format) signal...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\nt = TempoClock(120/60).permanent_(true);\n\n(\n~change_clock_tempo = {|clock, tempo, beats=1|\n beats.do {|beat|\n var stepTempo = beat.linexp(0, beats-1, clock.tempo, tempo);\n clock.schedAbs(clock.next...
[ { "role": "user", "content": "What is `RedInstrumentModuleGUI` in SuperCollider?" }, { "role": "assistant", "content": "RedInstrumentModuleGUI — gui for instrument modules Category: Red > redModule." } ]
[ { "role": "user", "content": "Write a Pbind whose degrees repeat every Pshuf cycle. (scale minorPentatonic, seq Pshuf, dur 0.4, octave 5, instr pluck, root 0)" }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nSynthDef...
[ { "role": "user", "content": "How do I play a random majorPentatonic scale at octave 4? (scale majorPentatonic, seq Pseq, dur 0.4, octave 4, 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```super...
[ { "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 me a self-contained SuperCollider patch using `LPF`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\nSynthDef(\\default, { arg out=0, freq=440, amp=0.1, pan=0, gate=1;\n var z;\n z = LPF.ar(\n Mix.new(VarSaw.ar(fr...
[ { "role": "user", "content": "Write an Ndef with a sine source and a 400 Hz low-pass." }, { "role": "assistant", "content": "Use `Ndef` when the patch has to change without stopping:\n\n```supercollider\n// Ndef drone: sine source through a 400 Hz low-pass\n(\nNdef(\\nd_sine_55_400, { |freq = 55...
[ { "role": "user", "content": "Write an Ndef with a saw source and a 2400 Hz low-pass. (ugens saw, cutoff 2400, lfo 0.8, 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: saw source through ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `HPZ2`." }, { "role": "assistant", "content": "```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 H...
[ { "role": "user", "content": "What is `BendResponder` in SuperCollider?" }, { "role": "assistant", "content": "BendResponder — allow functions to be registered to respond to MIDI pitchbend events Category: External Control > MIDI." } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Trig`." }, { "role": "assistant", "content": "```supercollider\n{ Trig.ar(Dust.ar(1), 0.2) * FSinOsc.ar(800, 0.5) }.play\n\n{ Trig.ar(Dust.ar(4), 0.1) }.play\n```" } ]
[ { "role": "user", "content": "Show another SuperCollider example using `FBSineN`." }, { "role": "assistant", "content": "```supercollider\n// increase feedback\n{ FBSineN.ar(SampleRate.ir, 1, Line.kr(0.01, 4, 10), 1, 0.1) * 0.2 }.play(s);\n```" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ LFNoise2.ar(1000, 0.25) }.play;\n\n// modulate frequency\n\n{ LFNoise2.ar(XLine.kr(1000, 10000, 10), 0.25) }.play;\n\n// as frequency modulator\n(\n{ SinOsc.ar(\n LFNoise2.a...
[ { "role": "user", "content": "Explain `PLFNoise1` in SuperCollider briefly." }, { "role": "assistant", "content": "PLFNoise1 — UGenPatterns quark library Based on LFNoise1 Category: Streams-Patterns-Events > UGenPatterns > Generators." } ]
[ { "role": "user", "content": "Give me a granular patch with noise1 grain position and interp 4. (rate 6, dur 0.15, interp 4, mode noise1, rev 0)" }, { "role": "assistant", "content": "`GrainBuf` needs a buffer, a trigger and a grain duration:\n\n```supercollider\n// granular synth with GrainBuf\...
[ { "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": "How do I play a sample from disk?" }, { "role": "assistant", "content": "Load it into a Buffer on the server, then play the buffer. `BufRateScale` keeps the pitch right when\nthe file's sample rate differs from the server's.\n\n```supercollider\n(\ns.waitForBoot {\n...
[ { "role": "user", "content": "What does `Synth.getn` do? What arguments does it take?" }, { "role": "assistant", "content": "Query the server for the current values of a sequential range of Controls Arguments: index — a control name or index; count — the number of sequential controls to query, s...
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Standard2DL.ar(220, 11025, mul:0.3) }.play(s);\n\n// mouse-controlled param\n{ Standard2DL.ar(11025, 44100, MouseX.kr(0.9,4), mul:0.3) }.play(s);\n\n// as a frequency control\n...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nd = { |freq = 440|\n var internalFreq;\n internalFreq = LFNoise0.ar(0.3, 300, 800);\n SinOsc.ar(\n LeastChange.kr(freq, internalFreq) // two sources of change: one exter...
[ { "role": "user", "content": "What does `Dictionary.associationAt` do?" }, { "role": "assistant", "content": "Access the Association that has the given key. Element is checked for equality (not identity). `d = Dictionary[\"robot\" ->" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// modulate frequency and index multiplier\n{ FBSineL.ar(LFNoise2.kr(1, 1e4, 1e4), LFNoise2.kr(1, 16, 17), 1, 1.005, 0.7) * 0.2 }.play(s;\n```" }, { "role": "assistant", ...
[ { "role": "user", "content": "What does `RedBitStream.new` do? What arguments does it take?" }, { "role": "assistant", "content": "stream bits Arguments: collection — An Array of integers.; byte — Number of bits per byte in this collection of integers. If byte is 8 then integers should not be gr...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `FSinOsc`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n{ // distorts and envelopes z\nvar z;\nz = FSinOsc.ar(500);\nz min: FSinOsc.ar(0.1);\n}.play;\n```" } ]
[ { "role": "user", "content": "What is `BelaScope` in SuperCollider?" }, { "role": "assistant", "content": "BelaScope — Bela's Oscilloscope interface Category: UGens > Bela." } ]
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\nSynthDef(\\Synth3,\n {arg ress = 0;\n var klank, env;\n klank = Klank.ar(`[{Rand(70,21000)}!7, {Rand(0.128,0.700)}!7],BrownNoise.ar(0.7));\n klank = klank;\n env = EnvGen.kr(Env.perc(0.07, ress), doneActi...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `Splay` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\nx = { |spread = 1, level = 0.1, center = 0|\n var n = 20;\n var snd = Splay.ar(LFPulse.ar({ 100.exprand(...
[ { "role": "user", "content": "Add freeverb to a kick patch at room 0.5." }, { "role": "assistant", "content": "A send-style patch: dry signal plus the reverb on the tail:\n\n```supercollider\n// reverb: freeverb on a kick\n(\nSynthDef(\\reverb_synth, { |out = 0, freq = 330, amp = 0.2|\n var e...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// next example\n\nb = Buffer.read(s, ExampleFiles.child);\n\n(\n{\n var input = SoundIn.ar(0);\n var framesize = 2048; // must have power of two\n Convolution2L.ar(input, b, ...
[ { "role": "user", "content": "What does `RedInstrumentModule.free` do?" }, { "role": "assistant", "content": "Remove module from `RedAbstractModule.all`. Stops all" } ]
[ { "role": "user", "content": "Show another SuperCollider example using `FBSineL`." }, { "role": "assistant", "content": "```supercollider\n// increase feedback\n{ FBSineL.ar(SampleRate.ir, 1, Line.kr(0.01, 4, 10), 1, 0.1) * 0.2 }.play(s);\n```" } ]
[ { "role": "user", "content": "What does `Quant.quant` do?" }, { "role": "assistant", "content": "Quantization granularity. The routine will begin on the next integer multiple of this number after the baseBarBeat. If negative, it indicates the number of bars in the future to schedule (where the b...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Dibrown`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a, freq, trig;\n a = Dibrown(0, 15, 1, inf);\n trig = Impulse.kr(MouseX.kr(1, 40, 1));\n freq = Demand.kr(trig, 0, a) * 30 + 340;\n Si...
[ { "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*Maths2.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 t...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\na = NodeProxy.new.play;\na.source = { RLPF.ar(\\in.ar(0!2), [4600, 7000], 0.1) };\nb = NodeProxy.new.source_ { Impulse.ar([5, 7] / 2 };\na <<> b;\n```" }, { "role": "assi...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Hasher`." }, { "role": "assistant", "content": "```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 examp...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `Timer`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n// using timer to modulate sine frequency: the slower the trigger is the higher the frequency\n(\n{ var trig;\n trig =...
[ { "role": "user", "content": "Give me a complete SuperCollider patch for Spring saw: bind everything it needs before it is used." }, { "role": "assistant", "content": "```supercollider\nb = Buffer.read(s, Platform.resourceDir +/+ \"sounds/a11wlk01.wav\");\n\n// This is very cool!\n\n(\n{\n Spri...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// result of BufRd is used as index for the next BufRd\n// needs Buffer c prepared above\n\n(\ny = {\n GFIS.ar(\n { |x| BufRd.ar(1, c, c.numFrames * x) },\n (LFDNoise3.ar(3) * [1, 1.1]).range(0.5, 0.51), 7\n ) * 0...
[ { "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": "What does this SuperCollider code do?\n```supercollider\n// try wiggling mouse quickly;\n// LFNoise frequently seems stuck, LFDNoise changes smoothly.\n\n{ LFNoise0.ar(MouseX.kr(0.1, 1000, 1), 0.1) }.play\n\n{ LFDNoise0.ar(MouseX.kr(0.1, 1000, 1), 0.1) }.play\n\n// silent for 2...
[ { "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": "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": "Write a SuperCollider patch that uses `Splay` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\nx = { |spread = 1, level = 0.1, center = 0|\n var n = 20;\n var snd = Splay.ar(LFPulse.ar({ 100.exprand(...
[ { "role": "user", "content": "What does `Object.==` do?" }, { "role": "assistant", "content": "Answer whether the receiver equals anotherObject. The definition of equality depends on the class of the receiver. The default implementation in Object is to answer if the two objects are" } ]
[ { "role": "user", "content": "What is `BHiPass`?" }, { "role": "assistant", "content": "BHiPass — 12db/oct rolloff - 2nd order resonant Hi Pass Filter" }, { "role": "user", "content": "What does `BHiPass.sc` do?" }, { "role": "assistant", "content": "calculate filter coef...
[ { "role": "user", "content": "What is `GaussClass` in SuperCollider?" }, { "role": "assistant", "content": "GaussClass — Gaussian classifier A Gaussian classifier, which classifies an input vector as belonging to one of the gaussian distributions defined in a specially-formatted Buffer. Category...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `DetectSilence`." }, { "role": "assistant", "content": "```supercollider\n// this frees after the Decay has become quiet enough for a long enough time\n{ var signal = Decay.ar(Impulse.ar(0), 2, PinkNoise.ar(0.2)); Dete...
[ { "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": "Write a minimal SuperCollider example that uses `Pause`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\nSynthDef(\\a, { Out.ar(0, SinOsc.ar(800, 0, 0.2)) }).add;\n\nSynthDef(\\b, { |gate = 1| Out.ar(1, PinkNoise.ar(0.3)); Pause.kr(gate, 1001) })...
[ { "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{ LatoocarfianN.ar(MouseX.kr(20, SampleRate.ir)) * 0.2 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: ...
[ { "role": "user", "content": "Explain `Ringz` in SuperCollider briefly." }, { "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 ...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch for Seekers are something you should avoid. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var time = 0.23;\n var freq = (55).midicps;\n var a = VarSaw.ar(freq/2, width: XLine...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n~mdef =\n{\n |key, func, msgNum, permanent = true|\n\n MIDIdef(key, func ?? { MIDIdef(key).func }, msgNum ? MIDIdef(key).msgNum, MIDIdef(key).chan, MIDIdef(key).msgType, MIDIdef(key).srcID).permanent_(permanent)\n}\n``...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `DigitalIn`." }, { "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(500, 0, 0.1 * DigitalIn.ar(0))\n ...
[ { "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": "How current is your SuperCollider knowledge?" }, { "role": "assistant", "content": "It comes from a snapshot of the SuperCollider repository (documentation, class library and examples) plus code I can reason about. So classes and arguments in that snapshot I know we...
[ { "role": "user", "content": "How do I play a sample from disk?" }, { "role": "assistant", "content": "Load it into a Buffer on the server, then play the buffer. `BufRateScale` keeps the pitch right when\nthe file's sample rate differs from the server's.\n\n```supercollider\n(\ns.waitForBoot {\n...
[ { "role": "user", "content": "Give me a granular patch with noise grain position and interp 4. (rate 20, dur 0.1, interp 4, mode noise, rev 0)" }, { "role": "assistant", "content": "A working granular patch, with the buffer loaded before the synth starts:\n\n```supercollider\n// granular synth w...
[ { "role": "user", "content": "What is a UGen graph in SuperCollider?" }, { "role": "assistant", "content": "A UGen graph is the directed acyclic graph of unit generators that a SynthDef describes: sources (SinOsc, WhiteNoise) feed processors (LPF, EnvGen, Pan2) and end at an output such as Out.a...
[ { "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 is `PV_RectComb` in SuperCollider?" }, { "role": "assistant", "content": "PV_RectComb — Make gaps in spectrum. Makes a series of gaps in a spectrum. Category: UGens > FFT." } ]
[ { "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": "Show another SuperCollider example using `In`." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-InKr\", { |out = 0, in = 0|\n Out.ar(out,\n SinOsc.ar(In.kr(in, 1), 0, 0.1)\n )\n}).add;\nSynthDef(\"help-lfo\", { |out = 0|\n Out.kr(out...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n Instr(\\beatClockPlayerTest,{ arg gate=0.0;\n var a,t;\n\n t = gate;\n a = Decay2.kr(t,0.01,0.1).clip2(1.0);\n a * SinOsc.ar(300);\n },[\n \\gate\n ]);\n\n ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// one last example\n(\nb = Buffer.alloc(s, 512, 1);\nb.sine1(1.0/[1, 2, 3, 4, 5, 6], true, true, true);\n);\n\n(\n{\n var input = SoundIn.ar(0);\n var framesize = 512;\n Conv...
[ { "role": "user", "content": "What does `PV_PhaseShift.new` do? What arguments does it take?" }, { "role": "assistant", "content": "Shift phase. Arguments: buffer — FFT buffer.; shift — Phase shift in radians.; integrate — If greater than zero, integrate the phase-shift across calls (for an accu...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `BusPlug` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\ns.boot;\nz = Bus.control(s, 16);\nz.setn({ |i| (i * 5).nthPrime } ! 16 * 5 + 100);\na = BusPlug.for(z);\n{ ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Unpack1FFT`." }, { "role": "assistant", "content": "```supercollider\n// Let's extract the DC component - i.e. the magnitude at binindex zero.\n(\n{\n var sig, chain, stream, windowStarts, demand;\n var fftsize = 10...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Dxrand`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a, freq, trig;\n a = Dxrand([1, 3, 2, 7, 8], inf);\n trig = Impulse.kr(MouseX.kr(1, 400, 1));\n freq = Demand.kr(trig, 0, a) * 30 + 340;...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nr = Recorder(s);\n{ GVerb.ar(Dust.ar(4)) }.play; // play on bus 64\nr.record(numChannels: 2;\nr.stopRecording;\n```" }, { "role": "assistant", "content": "A closing b...
[ { "role": "user", "content": "Explain `OffsetCP1` in SuperCollider briefly." }, { "role": "assistant", "content": "OffsetCP1 — Manual breakbeat specification This cut procedure allows the user to specify the durations in a block and offset, one block at a time. Category: Libraries > BBCut > Cut ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nd = { |gate = 1| { BrownNoise.ar }.dup * EnvGen.kr(Env.asr, gate, doneAction: Done.freeSelf) }.play;\nd.release(3;\n```" }, { "role": "assistant", "content": "A closi...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `MoogFF`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n// Play it with the mouse...\nx = { MoogFF.ar(WhiteNoise.ar(01.1), MouseY.kr(100, 10000, 1), MouseX.kr(0, 4)) }.play(s);\nx.free;\n\n// Mmmm, ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `PeakFollower`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\n// no decay\n(\n{\n SinOsc.ar(\n PeakFollower.ar(Dust.ar(20, Line.kr(0, 1, 4)), 1.0) * 1500 + 200,\n 0, 0.2\n )\n\n}.play;...
[ { "role": "user", "content": "Write a granular texture, dry. (rate 14, dur 0.04, interp 2, mode noise, 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(\ns.waitForBoot {\...