conversations
listlengths
2
6
[ { "role": "user", "content": "Write a kick at amp 0.6 with a click. (osc saw, sweep 0.06, decay 0.35, f0 220, f1 55, amp 0.6, rev 1)" }, { "role": "assistant", "content": "A kick is a sine with a fast pitch drop and a short amplitude envelope:\n\n```supercollider\n// kick drum: saw oscillator, 0...
[ { "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 `RedLZSS.decompress` do?" }, { "role": "assistant", "content": "Expects a string of binary numbers. Returns an array of 8bit" } ]
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `LFPulse` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n4.insp;\n[1,2,3].insp;\nPageLayout.insp;\nSynthDef(\"yawn\",{ arg freq=100;\n Out.ar(0,Saw.ar * LFPulse.kr(3))\n}).insp;\n```"...
[ { "role": "user", "content": "Give me a pluck with damping 0.5 on the reverb. (verb freeverb, room 0.5, damp 0.5, 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": "What does `RedIFS.makeWindow` do? What arguments does it take?" }, { "role": "assistant", "content": "Creates a Window and draws. Mainly for Arguments: bounds — a Rect that define window size and position; background — a Color." } ]
[ { "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": "Are you an AI?" }, { "role": "assistant", "content": "Yes. I am a small language model specialised in SuperCollider. I generate text; I cannot hear audio, run sclang, or check whether a patch sounds the way you want." } ]
[ { "role": "user", "content": "Write a SuperCollider patch that uses `LFClipNoise` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\nx = { var inA, chainA, chainB;\n inA = LFClipNoise.ar(100);\n chainA = FFT(LocalBuf(2048, 1), inA)...
[ { "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": "How do I play a random majorPentatonic scale at octave 4? (scale majorPentatonic, seq Pseq, dur 0.25, octave 4, instr pluck, root 0)" }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nSynt...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ LorenzTrig.ar(11025, 44100) }.play(s);\n\n// randomly modulate params\n(\n{ LorenzTrig.ar(\n 11025, 44100,\n LFNoise0.kr(1, 2, 10),\n 20,\n LFNoise0.kr(1, 1.5, 2),\n 0.02\...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nSynthDef(\"help-PrintVal\",{PrintVal.kr(SinOsc.kr(440,0,0.1), 100)}).play\n\n\n//two at once\n(\nSynthDef(\"help-PrintVal\",{\n\nPrintVal.kr(SinOsc.kr(440,0,0.1), 100, 1);\n\nPri...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\n{\n var saw, bpf;\n saw = Pulse.ar(\n freq: [100,150],\n mul: LFPulse.kr(\n freq: [0, 0.03, 0.04],\n width: 0.15));\n bpf = LPF.ar(in: saw, freq: SinOsc.kr(-10, -5, 3).range(200, 400));\n Out.ar(0,...
[ { "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": "Write an Ndef with a tri source and a 200 Hz low-pass. (ugens tri, cutoff 200, lfo 0.3, freq 165, 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 200 ...
[ { "role": "user", "content": "Write a SuperCollider patch for Detune idea is from James Harkins. Start by defining the values the patch depends on." }, { "role": "assistant", "content": "```supercollider\n(\na = {\n |freq = 40, wid = 0.5|\n Mix(LFPulse.ar(freq *((Array.fill(40, Pxrand((1, 2..2...
[ { "role": "user", "content": "Write a bell in SuperCollider." }, { "role": "assistant", "content": "A bell is a set of inharmonic partials with a long percussive decay. The ratios below are the\nclassic bell ones; the envelope frees the Synth when it ends.\n\n```supercollider\n(\nSynthDef(\\bell...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `DigitalIn`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n// turn on and off a sine oscillator\n\n(\nSynthDef(\"help-DigitalIn\", { |out = 0|\n Out.ar(out,\n SinOsc.ar(5...
[ { "role": "user", "content": "What does `Tempo.next` do?" }, { "role": "assistant", "content": "for control of tempo and for use in tempo based calculations" } ]
[ { "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": "Explain `ClockAudioMulch` in SuperCollider briefly." }, { "role": "assistant", "content": "ClockAudioMulch — clock that master AudioMulch over network Use this class to send sync and have SuperCollider act as a master. Category: Scheduling > Clocks." } ]
[ { "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": "Write a pluck whose tail uses gverb. (verb gverb, room 0.5, damp 0.5, mix 0.45, source pluck)" }, { "role": "assistant", "content": "Put the reverb inside the `SynthDef` so it is part of the voice:\n\n```supercollider\n// reverb: gverb on a pluck\n(\nSynthDef(\\reve...
[ { "role": "user", "content": "What is `DebugNodeWatcher` in SuperCollider?" }, { "role": "assistant", "content": "DebugNodeWatcher — watches a server address for debug-related messages Posts when these messages are received from the server: n_go n_end n_off n_on Category: Control, Server > Nodes...
[ { "role": "user", "content": "How do I play a random minorPentatonic scale at octave 4? (scale minorPentatonic, seq Pseq, dur 0.3, octave 4, instr pluck, root 0)" }, { "role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```supercoll...
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ MoogLadder.ar(Mix(LFSaw.ar([120, 180], 0, 0.33)), LinExp.kr(LFCub.kr(0.1, 0.5*pi), -1, 1, 180, 8500), 0.75.dup }.play\n```" }, { "role": "assistant", "content": "A ...
[ { "role": "user", "content": "What is `PPeak` in SuperCollider?" }, { "role": "assistant", "content": "PPeak — UGenPatterns quark library Based on Peak Category: Streams-Patterns-Events > UGenPatterns > Modifiers." } ]
[ { "role": "user", "content": "What is `ControlName`?" }, { "role": "assistant", "content": "ControlName — Object to store control information of SynthDef (used internally)" }, { "role": "user", "content": "What does `ControlName.index` do?" }, { "role": "assistant", "cont...
[ { "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": "Give me an Ndef with an LFO at 0.1 Hz. (ugens tri, cutoff 200, lfo 0.1, freq 165, 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 200 Hz low-pass\...
[ { "role": "user", "content": "Write a GrainBuf synth at 10 grains per second. (rate 10, dur 0.15, interp 2, mode noise, rev 0)" }, { "role": "assistant", "content": "`GrainBuf` needs a buffer, a trigger and a grain duration:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.waitForBoot ...
[ { "role": "user", "content": "What is `SendPeakRMS`?" }, { "role": "assistant", "content": "SendPeakRMS — Track peak and power of a signal for GUI applications." }, { "role": "user", "content": "What does `SendPeakRMS.ar` do?" }, { "role": "assistant", "content": "Unlike ...
[ { "role": "user", "content": "What does `Document.current` do? What arguments does it take?" }, { "role": "assistant", "content": "Gets/sets the current Arguments: value — A Document.." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ SinOsc.ar(SinOsc.ar(0.3).curverange(440, 660, -3), 0, 0.5 * 0.1 }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis op...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{\n# x,y,z = RosslerL.ar(MouseX.kr(1, 200));\nPan2.ar(Pulse.ar(x.range(100,1000), y.range(0,1), 0.3), z)\n}.play(s)\n```" }, { "role": "assistant", "content": "A c...
[ { "role": "user", "content": "Write a GrainBuf synth at 28 grains per second. (rate 28, dur 0.15, interp 2, mode noise, rev 1)" }, { "role": "assistant", "content": "`GrainBuf` needs a buffer, a trigger and a grain duration:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.waitForBoot ...
[ { "role": "user", "content": "What does `Server.userSpecifiedClientID` do?" }, { "role": "assistant", "content": "Deprecated in 3.9. Returns `false`. Server:clientID can now be set while a server is off, and is locked while the server is running. Thus, userSpecifiedClientID is no longer needed i...
[ { "role": "user", "content": "Explain this code:\n```supercollider\nx = { |freq = 440, amp = 0.2| SinOsc.ar(freq) * amp }.play;\nx.set(\\freq, 660);\n```" }, { "role": "assistant", "content": "Starts an anonymous synth with two controls, then changes one of them while it plays.\n\nThe `|freq = 4...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `Dseq`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a, freq, trig;\n a = Dseq([1, 3, 2, 7, 8], 3);\n trig = Impulse.kr(MouseX.kr(1, 40, 1));\n freq = Demand....
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `Convolution2L`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n// next example\n\nb = Buffer.read(s, ExampleFiles.child);\n\n(\n{\n var input = SoundIn.ar(0);\n var frame...
[ { "role": "user", "content": "What is `Pcollect` in SuperCollider?" }, { "role": "assistant", "content": "Pcollect — Apply a function to a pattern Modifies each value by passing it to the function. This is the pattern library's equivalent of Collection#-collect. Category: Streams-Patterns-Events...
[ { "role": "user", "content": "What is `CCBank` in SuperCollider?" }, { "role": "assistant", "content": "CCBank — a set of named MIDI CCResponders Category: External Control > MIDI, Libraries > crucial > MIDI." } ]
[ { "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{ LinCongC.ar(MouseX.kr(20, SampleRate.ir)) * 0.2 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the p...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\n{\n var time = 0.23;\n var freq = (55).midicps;\n var a = VarSaw.ar(freq/2, width: XLine.ar(0.5,1,time)).range(0,XLine.ar(0.666,1/666,time));\n var tone = SinOsc.ar(freq).fold(-0.23*a,a) * EnvGen.ar(Env([1,0],[tim...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `Node`. Define every value it uses." }, { "role": "assistant", "content": "```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);...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{\nvar a, b, t = Impulse.kr(2);\na = { Dseq([1, 2, 3, 4, 5], inf) } * 100;\nb = a + 1;\nDemand.kr(t, 0, [a, b]).poll(t\n}.play\n```" }, { "role": "assistant", "conten...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `TwoZero`." }, { "role": "assistant", "content": "```supercollider\n{ TwoZero.ar(WhiteNoise.ar(0.125), XLine.kr(20, 20000, 8), 1) }.play\n```" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// mouse-controlled param\n{ StandardN.ar(SampleRate.ir/2, MouseX.kr(0.9, 4)) * 0.3 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracket is missing...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(//*********PREPARE**********\np.pop;\n//Any code that needs to access your own environment goes here\np = ProxySpace.push(s);\n~fxLoop.play.fadeTime_(5);\n);\n\n(//*********FXLoop**********\n~fxLoop = {\n var in = Soun...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `MantissaMask`." }, { "role": "assistant", "content": "```supercollider\n// preserve only 3 bits of mantissa.\n{ MantissaMask.ar(SinOsc.ar(SinOsc.kr(0.2, 0, 400, 500), 0, 0.4), 3) }.play\n\n// the original\n{ SinOsc.ar...
[ { "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": "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": "Show another SuperCollider example using `AbstractFunction`." }, { "role": "assistant", "content": "```supercollider\na = { |x| #[440, 720, 801, 1020.2].at(x) }; b = a.cpsmidi; [a.value(3), b.value(3)];\na = Pseries(220, 220, inf).cpsmidi; a.asStream.nextN(12); // o...
[ { "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 this SuperCollider code.\n```supercollider\n// Pn advances Pgate each time its subpattern is repeated\n(\nPbind(\n \\degree, Pn(Pseq((0..7)), inf, \\step),\n \\mtranspose, Pgate(Pwhite(0, 5), inf, \\step),\n \\dur, 0.2\n).play\n);\n\n\n// Two different Pgates advance...
[ { "role": "user", "content": "What is `InterplEnv` in SuperCollider?" }, { "role": "assistant", "content": "InterplEnv — envelope specification An InterplEnv is a specification for a segmented envelope. InterplEnvs can be used both server-side, by an IEnvGen within a SynthDef, and clientside, wi...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nb = BusPlug.new;\n{ Blip.ar(b + 5) }.play;\nb.bus.set(12;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is ...
[ { "role": "user", "content": "What does `AbstractPlayer.initClass` do?" }, { "role": "assistant", "content": "the base class for all Players : a playable object" } ]
[ { "role": "user", "content": "What are the arguments of Pan2?" }, { "role": "assistant", "content": "`Pan2.ar(in, pos, level)` — in is the mono signal, pos is -1 (left) to 1 (right) with 0 in the middle, and level scales the output. It is equal-power, so a centred signal is -3 dB per channel rat...
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// Compare:\n\n{ WhiteNoise.ar(0.25) }.play;\n\n{ HPZ1.ar(WhiteNoise.ar(0.25)) }.play;\n\n// HPZ1 is useful to detect changes in a signal:\n// see also HPZ2\n(\n{\n var changing...
[ { "role": "user", "content": "What does `UScore.updatePos` do? What arguments does it take?" }, { "role": "assistant", "content": "(describe method Arguments: x — (describe argument here). Returns: (returnvalue)" } ]
[ { "role": "user", "content": "Give me an Ndef with an LFO at 0.1 Hz. (ugens sine, cutoff 2400, lfo 0.1, freq 82.5, amp 0.12)" }, { "role": "assistant", "content": "`Ndef` is a named proxy you can redefine while it is playing:\n\n```supercollider\n// Ndef drone: sine source through a 2400 Hz low-...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `BrownNoise`." }, { "role": "assistant", "content": "```supercollider\n{ BrownNoise.ar(0.1) }.play;\n{ WhiteNoise.ar(0.1) }.play;\n```" } ]
[ { "role": "user", "content": "What is `ServerBoot` in SuperCollider?" }, { "role": "assistant", "content": "ServerBoot — register actions to be taken when a server has booted The singleton ServerBoot provides a place for registering functions and objects for events that should happen when a give...
[ { "role": "user", "content": "What is the node tree and what is a Group for?" }, { "role": "assistant", "content": "Everything running on the server is a node: Synths and Groups, arranged in a tree under the root group. Order matters, because audio flows through buses from earlier to later nodes...
[ { "role": "user", "content": "Explain `Pseed` in SuperCollider briefly." }, { "role": "assistant", "content": "Pseed — set the random seed in subpattern Set the random generator seed of the resulting stream. Category: Streams-Patterns-Events > Patterns > Language Control." } ]
[ { "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{ FBSineN.ar(SampleRate.ir/4) * 0.2 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis ope...
[ { "role": "user", "content": "What does `MxCable.register` do? What arguments does it take?" }, { "role": "assistant", "content": "Registers an Arguments: outAdapterClassName — an AbsMxAdapter subclass; inAdapterClassName — an AbsMxAdapter subclass; strategy — an MxCableStrategy. Returns: this" ...
[ { "role": "user", "content": "List of exit codes?" }, { "role": "assistant", "content": "SuperCollider forum — List of exit codes?\n\n7068696c:\n\n```supercollider\no = s.options;\no.inDevice = nil;\no.outDevice = \"ASIO : ASIO4ALL\";\n```\n\nHmmmm... In earlier SC versions, it wouldn’t have wor...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `Ringz` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var in, chain;\n in = Ringz.ar(Impulse.ar([2, 3]), [700, 800], 0.1) * 5; // stereo input\n chain = ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Resonz`." }, { "role": "assistant", "content": "```supercollider\n{ Resonz.ar(WhiteNoise.ar(0.5), 2000, 0.1) }.play\n\n// modulate frequency\n{ Resonz.ar(WhiteNoise.ar(0.5), XLine.kr(1000, 8000, 10), 0.05) }.play\n\n/...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `Buffer`: bind everything it needs first." }, { "role": "assistant", "content": "```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....
[ { "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": "What is `Nil`?" }, { "role": "assistant", "content": "Nil — Represents uninitialized data" }, { "role": "user", "content": "What does `Nil.isNil` do?" }, { "role": "assistant", "content": "Answers true because this is nil. In class Object thi...
[ { "role": "user", "content": "Write a SuperCollider patch for Very quick-and-dirty hack to show stereo phase. Start by defining the values the patch depends on." }, { "role": "assistant", "content": "```supercollider\n(\nb = Bus.audio(s, 2);\na = { |inbus = 0|\n var sig = In.ar(inbus, 2);\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 fm, root 0)" }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nSynthDe...
[ { "role": "user", "content": "What does `SimpleNumber.scurve` do?" }, { "role": "assistant", "content": "Map receiver in the onto an S-curve bound to [0, 1]." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nSynthDef(\"mini\",{\n Out.ar( 0,\n Instr(\"minimoog.two\").ar( SinOsc.kr(1.0).range(300,500) )\n )\n}).send(s;\n```" }, { "role": "assistant", "content": "A clos...
[ { "role": "user", "content": "What is `SendPeakRMS`?" }, { "role": "assistant", "content": "SendPeakRMS — Track peak and power of a signal for GUI applications." }, { "role": "user", "content": "What does `SendPeakRMS.ar` do?" }, { "role": "assistant", "content": "Unlike ...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `ReplaceOut` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n(\n// define a control\nSynthDef(\"line\", { arg i_bus=10, i_start=1000, i_end=500, i_time=1;\n ReplaceOut.kr(i_bus, Line.kr(...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-LFNoise2\", { arg out=0;\n Out.ar(out,\n LFBrownNoise2.ar(1000, 1, MouseX.kr(0, 5), 0.25)\n )\n}).play;\n);\n\n//use as frequency control\n(\nSynthDef(\"h...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// hand code a mono signal to a decorrelated soundfield in B-format\n// NOTE: the demonstrated kernel is not ideal for this task\n\n// define encoding kernel\n(\nvar kernelSize;\nvar scale;\n\nkernelSize = 256;\nscale = 2...
[ { "role": "user", "content": "What does `Char.asUnicode` do?" }, { "role": "assistant", "content": "ASCII character Returns: the object itself." } ]
[ { "role": "user", "content": "Give me a granular patch with noise1 grain position and interp 4. (rate 20, dur 0.07, 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": "Write a SuperCollider patch that uses `FOS` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\n// same as OnePole\n{ var x;\n x = LFTri.ar(0.4, 0, 0.99);\n FOS.ar(LFSaw.ar(200, 0, 0.2), 1 - x.abs, 0.0...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `Rand`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-Rand\", { |out = 0|\n Out.ar(out,\n FSinOsc.ar(\n Rand(200.0, 400.0),\n 0, Line.kr(0....
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `NodeProxy`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\na = NodeProxy.new.play; // play to hardware output.\na.fadeTime = 2; // fadeTime specifies crossfade\n// set the source\na.source = { Sin...
[ { "role": "user", "content": "What 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 `SelectButtonSet.setButtonColor` do? What arguments does it take?" }, { "role": "assistant", "content": "a set of radio buttons Arguments: butt; color." } ]
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `ControlName`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n(\nd = SynthDef(\\tone, { |out = 0, freq = 200|\n var sig;\n\n freq.spec = ControlSpec(20, 20000);\n sig = Sin...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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": "assistant", "content": "A clos...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `NRand`." }, { "role": "assistant", "content": "```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, doneActi...
[ { "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{ FBSineL.ar(SampleRate.ir/4) * 0.2 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis ope...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.boot\n\n{Perlin3.ar(Integrator.ar(K2A.ar(MouseX.kr(0, 0.1))), Integrator.ar(K2A.ar(MouseY.kr(0, 0.1))))}.play(s)\n\n{Perlin3.ar(*{Line.ar(0, 1000, 30)}.dup(3))}.plot(1\n```" ...
[ { "role": "user", "content": "Which keys does a Pbind understand?" }, { "role": "assistant", "content": "The ones you use constantly are \\instrument (a SynthDef name), \\dur (seconds), \\degree (scale degree), \\midinote, \\freq, \\amp, \\legato (note length as a fraction of \\dur), and \\scale...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `TIRand` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-TIRand\", {\n var trig, outBus;\n trig = Dust.kr(10);\n outBus = TIRand.kr(0, 1, trig); // play on random ch...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `EnvGate`." }, { "role": "assistant", "content": "```supercollider\na = { LPF.ar(Saw.ar(200), 600) * EnvGate.new }.play;\na.set(\\fadeTime, 2);\na.release;\n\n// the same as:\na.set(\\gate, 0);\n\n// several env gates ...