conversations
listlengths
2
6
[ { "role": "user", "content": "Write a Pbind in minorPentatonic using Prand for the degrees. (scale minorPentatonic, seq Prand, dur 0.25, octave 4, instr sine, root 0)" }, { "role": "assistant", "content": "Put the scale and the degree pattern in the `Pbind` and it will pick notes for you:\n\n```...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ SinOsc.ar(300, 0, 0.5) * SinOsc.kr(2.unipolar * 0.1 }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n// used to lag pitch\n{\n SinOsc.ar( // sine wave\n Lag.kr( // lag the modulator\n LFPulse.kr(4, ...
[ { "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": "Write a minimal SuperCollider example that uses `Dswitch`." }, { "role": "assistant", "content": "```supercollider\n(\n {\n var d, trig;\n d = Dswitch([\n Dwhite(3, 4, 2),\n Dwhite(0, 1, 2),\n Dseq([1, 1, 1, 0], 2)\n ], Dseq([0, 1, 2, 1, 0],...
[ { "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": "Write a SuperCollider patch that uses `RunningSum` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n// RMS Power\n(\n{\n var input, numsamp;\n\n input = LFSaw.ar;\n numsamp = 30;\n\n (RunningS...
[ { "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": "Write a kick at amp 0.6 with no click. (osc fm, sweep 0.06, decay 0.18, f0 180, f1 55, amp 0.6, rev 0)" }, { "role": "assistant", "content": "Start with a swept sine, then shorten the decay to taste:\n\n```supercollider\n// kick drum: fm oscillator, 0.06 s pitch swe...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `PV_MagSquared`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\n(\nb = Buffer.alloc(s, 2048, 1);\nc = Buffer.read(s, ExampleFiles.child);\n);\n\n(\nSynthDef(\"help-magSquared\", { |out = 0, bufnum ...
[ { "role": "user", "content": "What is `NamedControl`?" }, { "role": "assistant", "content": "NamedControl — Named reference to a control" }, { "role": "user", "content": "What does `NamedControl.ar` do?" }, { "role": "assistant", "content": "add a new instance of AudioCon...
[ { "role": "user", "content": "Write a SuperCollider patch for Electrode Theremin (a SuperCollider snippet) that runs as it is, with nothing assumed about the session." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var saw, bpf;\n saw = Saw.ar(\n freq: 30, \n mul: SinOsc....
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `NodeControl`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\nd = SynthDef(\"help-NodeControl\", { |out = 0, freq = 400|\n Out.ar(out,\n SinOsc.ar(freq, 0, 0.5)\n )\n});...
[ { "role": "user", "content": "What is `PLine` in SuperCollider?" }, { "role": "assistant", "content": "PLine — UGenPatterns quark library Based on Line Category: Streams-Patterns-Events > UGenPatterns > Generators." } ]
[ { "role": "user", "content": "What is `Warp1` in SuperCollider?" }, { "role": "assistant", "content": "Warp1 — Warp a buffer with a time pointer Inspired by Chad Kirby's SuperCollider2 Warp1 class, which was inspired by Richard Karpen's sndwarp for CSound. A granular time stretcher and pitchshif...
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n(\np = Pbind(\n \\instrument, \\synth_1a,\n \\preAmp, PL(\\preAmp), \n \\amp, PL(\\amp), \n \\midinote, PLseq(\\seq) + PL(\\seqAdd), \n \\dur, 0.2\n);\n\n~spec = 4.collect { |i| [\\seq, [12*i + 24, 12*i + 48, \\...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `SharedOut`." }, { "role": "assistant", "content": "```supercollider\n(\n// only works with the internal server\ns = Server.internal;\ns.boot;\n);\n\n(\nSynthDef(\"help-SharedOut\", {\n SharedOut.kr(0, SinOsc.kr(0.2))...
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n// The driven pendulum is interesting as it's a quite simple model\n// that includes parameter zones of chaotic behaviour:\n// http://lampx.tugraz.at/~hadley/physikm/apps/numerical_integration/pendulum.en.php\n\n// y here deno...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n//try passing a signal through the hair cell; it won't come out like a pure sine, more like an impulse train stimulated by that input\n{ Pan2.ar(HairCell.ar(SinOsc.ar(440)),0.0) }.play;\n\n//modulation effects\n{ Pan2.ar(...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// record a buffer\nb = { Blip.ar(XLine.kr(10000, 4, 3) * [1, 1.2], 20) * 0.1 }.asBuffer(3, fadeTime: 0.1)\nb.plot; // after 3 seconds, you can see it.\n// play the soundfile bac...
[ { "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 var t;\n t = TempoPlayer.new; // default global tempo\n Impulse.ar( t.kr )\n });\n\n Patch(\\helpTempoPlayer).play(atTime:1)\n```" }...
[ { "role": "user", "content": "Write a Pbind in majorPentatonic using Prand for the degrees. (scale majorPentatonic, seq Prand, dur 0.4, octave 6, instr sine, root 0)" }, { "role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```super...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\nNdef(\\bitshift, {\n var t = PulseCount.ar(Impulse.ar(8e3));\n var sig = HPF.ar(\n ( \n ((t * 15) & (t >> 5)) |\n ((t * 5) & (t >> [3, 4])) |\n ((t * 2) & (t >> 9)) |\n ...
[ { "role": "user", "content": "What does `PLorenzN.new` do? What arguments does it take?" }, { "role": "assistant", "content": "UGenPatterns quark library Arguments: freq; s — sigma; r — rho; b — beta; h — step amount; xi — initial value; yi — initial value; zi — initial value." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n/*\n( // PlayerBinop not yet implemented\n\nPatch(\\monosynth,[\n BeatClockPlayer.new(16) * MIDIGatePlayer.new,\n MIDIFreqPlayer.new,\n CCPlayer(50,[100,3000,\\exp,0.0,1500.0]...
[ { "role": "user", "content": "Explain `CutMixer` in SuperCollider briefly." }, { "role": "assistant", "content": "CutMixer — BBCut2 volume and panning control The CutMixer organises the final output from a given rendering CutGroup. It defaults to outputting a stereo centred signal at full volume...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Peak`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n SinOsc.ar(\n Peak.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 rate contro...
[ { "role": "user", "content": "What does `MxUnitApp.dup` do? What arguments does it take?" }, { "role": "assistant", "content": "Duplicate the object to the slot directly below it, insert an open space if there is already something Arguments: num — How many times to duplicate. Returns: unit or ar...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `TRand`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var trig = Dust.kr(10);\n SinOsc.ar(\n TRand.kr(300, 3000, trig)\n ) * 0.1\n}.play;\n);\n\n(\n{\n var trig = Dust.ar(MouseX.kr(1, 8000...
[ { "role": "user", "content": "What does `OpenBCIboard.softReset` do?" }, { "role": "assistant", "content": "send a restart message to the board that will stop streaming and reset most of the" } ]
[ { "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": "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 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": "Explain `MIDIFreqPlayer` in SuperCollider briefly." }, { "role": "assistant", "content": "MIDIFreqPlayer — MIDI note to control rate \\freq convertor. Classic analog monophonic style including hammer on trills Implements classic analog monophonic style MIDI to contr...
[ { "role": "user", "content": "What is `LocalBuf`?" }, { "role": "assistant", "content": "LocalBuf — Allocate a buffer local to the synth" }, { "role": "user", "content": "What does `LocalBuf.newFrom` do?" }, { "role": "assistant", "content": "Allocates a new buffer from a...
[ { "role": "user", "content": "How do I add a reverb send to a whole group?" }, { "role": "assistant", "content": "Same shape as the delay: a private stereo bus, one effect reading it, instruments writing both dry\nand wet.\n\n```supercollider\n(\n~verbBus = Bus.audio(s, 2);\nSynthDef(\\verb, { |...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `InTrig`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\ns = Server.local;\nb = Bus.control(s, 1);\n\nSynthDef(\"help-InTrig\", { |out = 0, busnum = 0|\n var inTrig;\n inT...
[ { "role": "user", "content": "Explain `AmpCompA` in SuperCollider briefly." }, { "role": "assistant", "content": "AmpCompA — Basic psychoacoustic amplitude compensation (ANSI A-weighting curve). Higher frequencies are normally perceived as louder, which AmpCompA compensates. Following the measur...
[ { "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": "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": "Show me a self-contained SuperCollider patch using `BiPanB2`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var w, x, y, p, q, a, b, c, d;\n\n p = LFSaw.ar(200);\n q = LFSaw.ar(301);\n\n // B-format encode\n #w,...
[ { "role": "user", "content": "What is `AbstractServerAction`?" }, { "role": "assistant", "content": "AbstractServerAction — register actions to be taken for a server" }, { "role": "user", "content": "What does `AbstractServerAction.functionSelector` do?" }, { "role": "assista...
[ { "role": "user", "content": "What does `SimpleNumber.sinhcPi` do?" }, { "role": "assistant", "content": "Returns the Hyperbolic Sinus Cardinal of `x`. `sinhcPi(x) = sinh(x) /" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{ SinOsc.ar(\n SinOsc.ar(\n XLine.kr(1, 100, 5)).exprange(*XLine.kr([20, 800], [7000, 200], 10)\n )\n ) * 0.1\n\n}.play;\ns.record(duration: 10);\n```" }, { "...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(// * //watch the postWindow\na=[\"m\",\"x\",\"f\",\"k\",\"d\",\"p\"];\nx=Array;\ny=x.newClear(6);\n~mxfkdp=Task({\n inf.do({y.put(x.series(6,0,1).choose,a.scramble).postln;\n 0.03.wait;})}).play;\nm=fork({inf.do({\n ...
[ { "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": "My Synth runs but I hear nothing. How do I debug it?" }, { "role": "assistant", "content": "Check in this order, because each step eliminates a whole class of causes:\n\n1. **Is anything coming out of the bus you write to?** `Out.ar(0, sig)` for the master. A typo l...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `GrayNoise`." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-GrayNoise\", { |out = 0|\n Out.ar(out,\n GrayNoise.ar(-20.dbamp)\n )\n}).play;\n)\n```" } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LinCongL`." }, { "role": "assistant", "content": "```supercollider\n// default initial params\n{ LinCongL.ar(MouseX.kr(20, SampleRate.ir)) * 0.2 }.play(s);\n```" } ]
[ { "role": "user", "content": "How do I play a random minorPentatonic scale at octave 6? (scale minorPentatonic, seq Prand, dur 0.3, octave 6, instr sine, root 0)" }, { "role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```supercoll...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `PulseDivider`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\nSynthDef(\"help-PulseDivider\", { |out = 0|\n var p, a, b;\n p = Impulse.ar(8);\n a = SinOsc.ar(1200, 0, De...
[ { "role": "user", "content": "What does `TempoClock.isRunning` do?" }, { "role": "assistant", "content": "tempo based scheduler Returns: A Boolean, true if the clock is active or false if the clock has been stopped." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.boot\n{ SinOsc.ar([330, 440], 0, 0.4) }.play;\nStethoscope(s, 2;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened ea...
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// default initial params\n{ LatoocarfianL.ar(MouseX.kr(20, SampleRate.ir)) * 0.2 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: ...
[ { "role": "user", "content": "Explain `ScoreClock` in SuperCollider briefly." }, { "role": "assistant", "content": "ScoreClock — Create a Score by capturing OSC and timings ScoreClock simplifies NRT synthesis by capturing OSC messages and timings of anything sent to the default server, and retur...
[ { "role": "user", "content": "Write a GrainBuf synth at 14 grains per second." }, { "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.resource...
[ { "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 = Dser([1, 3, 2, 7, 8], 8);\n trig = Impulse.kr(MouseX.kr(1, 40, 1));\n freq = Demand.kr(trig, 0, a) * 30 + 340;\n SinOsc.ar(freq) * 0.1\n\n}.p...
[ { "role": "user", "content": "What does `SFPlayer.gui` do? What arguments does it take?" }, { "role": "assistant", "content": "Show a GUI of the `SFPlayer`. This creates an instance of SFPlayerView, stored under Arguments: argBounds — Bounds of the gui. If `nil`, a default size will be used.; do...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `StandardL`." }, { "role": "assistant", "content": "```supercollider\n// vary frequency\n{ StandardL.ar(MouseX.kr(20, SampleRate.ir)) * 0.3 }.play(s);\n```" } ]
[ { "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": "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": "Write a complete SuperCollider patch built around `Pseq` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\\help_sinegrain,\n { |out = 0, freq = 440, sustain = 0.05|\n var env;\n env = EnvGen.kr(Env.perc(0.01, sustain, ...
[ { "role": "user", "content": "Write an Ndef with a saw source and a 200 Hz low-pass. (ugens saw, cutoff 200, lfo 0.8, freq 220, amp 0.12)" }, { "role": "assistant", "content": "Use `Ndef` when the patch has to change without stopping:\n\n```supercollider\n// Ndef drone: saw source through a 200 ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// default values\n{ Logistic.ar }.play\n\n// onset of chaos\n{ Logistic.ar(Line.kr(3.55, 3.6, 5), 1000) }.play\n\n// explore via Mouse\n{ Logistic.ar(MouseX.kr(3, 3.99), MouseY....
[ { "role": "user", "content": "Write a SuperCollider patch for Feedback resonator. Start by defining the values the patch depends on." }, { "role": "assistant", "content": "```supercollider\n// Resonator, must subtract blockSize for correct tuning\n(\nSynthDef(\"testRes\", {\n \nvar freq = 300, ...
[ { "role": "user", "content": "Give me a saw kick with a 0.06 s pitch sweep. (osc saw, sweep 0.06, decay 0.35, f0 150, 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: saw oscil...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Streson.ar(LFSaw.ar([220, 180], 0, mul:EnvGen.kr(Env.asr(0.5, 1, 0.02), 1.0) * 0.2), LinExp.kr(LFCub.kr(0.1, 0.5*pi), -1, 1, 280, 377).reciprocal, 0.9, 0.3 }.play\n```" }, ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `RLPF`." }, { "role": "assistant", "content": "```supercollider\n{ RLPF.ar(Saw.ar(200, 0.1), SinOsc.ar(XLine.kr(0.7, 300, 20), 0, 3600, 4000), 0.2) }.play;\n\n\n(\n{ var ctl = RLPF.ar(Saw.ar(5, 0.1), 25, 0.03);\n SinO...
[ { "role": "user", "content": "Write a granular texture, dry. (rate 20, dur 0.04, interp 4, mode noise, 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.waitForBoot {\n ...
[ { "role": "user", "content": "What is a SynthDef?" }, { "role": "assistant", "content": "A SynthDef is a named, compiled server-side instrument: a UGen graph plus named controls. You build one with SynthDef(\\name, { |args| ... }).add, and then play instances with Synth(\\name)." } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Condition`." }, { "role": "assistant", "content": "```supercollider\n(\nc = Condition.new(false);\n\nRoutine {\n 1.wait;\n \"waited for 1 second\".postln;\n 1.wait;\n \"waited for another second, now waiting for y...
[ { "role": "user", "content": "Write an Ndef at 55 Hz I can retune while it plays. (ugens saw, cutoff 1400, 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: saw source throug...
[ { "role": "user", "content": "Give me a granular patch with noise1 grain position and interp 4. (rate 16, dur 0.07, interp 4, mode noise1, rev 1)" }, { "role": "assistant", "content": "A working granular patch, with the buffer loaded before the synth starts:\n\n```supercollider\n// granular synt...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Pulse`." }, { "role": "assistant", "content": "```supercollider\n// modulate frequency\n{ Pulse.ar(XLine.kr(40, 4000, 6), 0.1, 0.2) }.play;\n\n// modulate pulse width\n{ Pulse.ar(200, SinOsc.kr(0.2).range(0.01, 0.99),...
[ { "role": "user", "content": "Write a kick drum with a 0.35 s decay. (osc sine, sweep 0.06, decay 0.35, f0 180, 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: sine oscillator...
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n(\n// Function to check an array for repetitions within a maximum test span\n\n~repetitionCheck = { |array, maxTestSpan|\n maxTestSpan.do { |i|\n var result = (array.drop(i+1) - array).drop((i+1).neg).includes(0).not;\n ...
[ { "role": "user", "content": "What does `Server.dumpOSC` do? What arguments does it take?" }, { "role": "assistant", "content": "Object representing a server application Arguments: code." } ]
[ { "role": "user", "content": "What does `BufferProxySpec.new` do? What arguments does it take?" }, { "role": "assistant", "content": "datatype specifying an input of BufferProxy Arguments: numFrames; numChannels; sampleRate." } ]
[ { "role": "user", "content": "What does `PopUpTreeMenu.bounds` do?" }, { "role": "assistant", "content": "Get or set the position and dimension of the menu as a" } ]
[ { "role": "user", "content": "Show another SuperCollider example using `LFPulse`." }, { "role": "assistant", "content": "```supercollider\n{ LFPulse.ar(XLine.kr(1, 200, 10), 0, 0.2, 0.1) }.play;\n```" } ]
[ { "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": "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, q, a, b, c, d;\n\n p = LFSaw.ar(200);\n q = LFSaw.ar(301);\n\n // B-format encode\n #w, x, y = BiPanB2.ar(p, q, MouseX.kr(-1, 1), 0.1);\n\n // B-form...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// per convention keys after \\dur are the ones to be set\n// playing ends after end of last stream\n\n(\np = PmonoPar([\n [\n \\dur, 1.0,\n \\pan, Pser([-0.9, 0, 0.9], 8) \n ],[\n \\dur, 0.4,\n \\freq, Pex...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch for Kepler 22-b atmosphere. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n(\nfork { \n Ndef(\\ttwnd).play;//(d,2,addAction:\\addToHead);\n loop {\n var seed = thisThread.randSeed...
[ { "role": "user", "content": "Explain `WaveletDaub` in SuperCollider briefly." }, { "role": "assistant", "content": "WaveletDaub — decomposition into Daub4 wavelets, and reconstruction Wavelet transform using the Daub4 basis. Category: UGens > Analysis." } ]
[ { "role": "user", "content": "Write an Ndef with a blip source and a 800 Hz low-pass." }, { "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 800 Hz low-pass\n(\nNdef(\\nd_blip_55_800, { |freq ...
[ { "role": "user", "content": "Explain `EaseOutInSine` in SuperCollider briefly." }, { "role": "assistant", "content": "EaseOutInSine — Sinusoidal ease-out/in Easing equation for a sinusoidal (sin(t)) ease-out/in, decelerating until halfway, then accelerating. Category: Ease." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nx = { |freq = 440| SinOsc.ar(freq, 0, 0.3) }.play; // this returns a Synth object;\nx.set(\\freq, 880); // note you can set the freq argument\nx.defName; // the name of the resul...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch for Swarm of sound files. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\nb = SoundFile.collectIntoBuffers(\"yourSoundFileFolder/*\"); // By Bjørn Houdorf, December 21, 2012\n\n(\n{\nvar...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Dust`." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-Dust\", { |out = 0|\n Out.ar(out,\n Dust.ar(200, 0.5)\n )\n}).play;\n);\n\n(\nSynthDef(\"help-Dust\", { |out = 0|\n Out.ar(out,\...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `Ringz`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\nx = { arg freq=1000; Ringz.ar(Crackle.ar(1.95, 0.1), freq, 0.05) }.play(s);\nx.set(\\freq, 1500);\nx.free;\n```" } ]
[ { "role": "user", "content": "Explain `Patch` in SuperCollider briefly." }, { "role": "assistant", "content": "Patch — Pairs an Instr with inputs that that will be passed to the Instr A Patch is a player that plays an Instr. Category: Libraries > crucial > Instr, Libraries > crucial > Players." ...
[ { "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 = Dwhite(0, 15, inf);\n trig = Impulse.kr(MouseX.kr(1, 40, 1));\n freq = Demand.kr(trig, 0, a) * 30 + 340;\n SinOsc.ar(freq) * 0.1\n\n}.play;\n...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// hear the difference, LinPan having a slight drop in the middle (yeah, it's subtle)...\n{ LinPan2.ar(SinOsc.ar(440), Line.kr(-1, 1, 5)) }.play;\n\n// ... whereas Pan2 is more smooth\n{ Pan2.ar(SinOsc.ar(440), Line.kr(-1...
[ { "role": "user", "content": "What does `Enveloper2.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "audio function plays continously but is gated by an envelope Arguments: audio; gate; env." } ]
[ { "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": "Write a minimal SuperCollider example that uses `SinOscFB`." }, { "role": "assistant", "content": "```supercollider\n{ SinOscFB.ar(440, MouseX.kr(0, 4))*0.1 }.play\n\n\n{ SinOscFB.ar(MouseY.kr(10, 1000, 'exponential'), MouseX.kr(0.5pi, pi))*0.1 }.play\n\n\n{ SinOscF...
[ { "role": "user", "content": "Write a Pbind whose degrees repeat every Pseq cycle. (scale majorPentatonic, seq Pseq, dur 0.2, octave 4, instr pluck, root 0)" }, { "role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```supercollider\...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LFPulse`." }, { "role": "assistant", "content": "```supercollider\n{ LFPulse.ar(50) * 0.1 }.play;\n```" } ]