conversations
listlengths
2
6
[ { "role": "user", "content": "Write a SuperCollider patch that uses `Event` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\\pm, { |out = 0, freq = 440, amp = 0.1, pan = 0, gate = 1, ratio = 1, index = 1, ar = 0.1, dr = ...
[ { "role": "user", "content": "What is `WalshHadamard` in SuperCollider?" }, { "role": "assistant", "content": "WalshHadamard — decomposition into square waves, and reconstruction WalshHadamard transform to a basis of square wave like functions rather than the more conventional sine waves of Four...
[ { "role": "user", "content": "Show another SuperCollider example using `NodeProxy`." }, { "role": "assistant", "content": "```supercollider\nb = NodeProxy.new.play;\nb.source = { PinkNoise.ar(0.2.dup) };\n// now I want to filter b through a new proxy.\na = NodeProxy.new;\na <-- b; a.source = { H...
[ { "role": "user", "content": "What does `AbstractPlayer.synth` do?" }, { "role": "assistant", "content": "the base class for all Players : a playable object" } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nb = Buffer.read(s, ExampleFiles.child);\n\n{ BufRd.ar(1, b, Sweep.ar(Impulse.ar(BufDur.kr(b).reciprocal), BufSampleRate.kr(b)) }.play;\n\nb.free\n```" }, { "role": "assis...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Stethoscope`." }, { "role": "assistant", "content": "```supercollider\ns.boot\n{ SinOsc.ar([330, 440], 0, 0.4) }.play;\nStethoscope(s, 2);\n```" } ]
[ { "role": "user", "content": "Write a SuperCollider patch that uses `DigitalOut` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n// write a sine oscillator's output to a pin\n\n(\nSynthDef(\"help-DigitalOut\", { |out = 0|\n Digita...
[ { "role": "user", "content": "What is `RedMixerChannelGUI` in SuperCollider?" }, { "role": "assistant", "content": "RedMixerChannelGUI — gui for RedMixerChannel An embeddable GUI for RedMixerChannel. If no parent given then a new Window will be created. Category: Red > redMixer." } ]
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\ns = Server.local;\nServer.default = s;\ns.boot;\n);\n\n// definition for future reference in arbitrary Environments\n\np = PLtuple(\\a);\n\n\n// prepare current Environment\n// PLtuple defaults to repeats = inf,\n// so...
[ { "role": "user", "content": "What does `Array2D.new` do?" }, { "role": "assistant", "content": "Create an array of the specified size. `a = Array2D.new(3," } ]
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `LinRand` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-LinRand\", { |out = 0, minmax = 1|\n Out.ar(out,\n FSinOsc.ar(\n LinRand(200.0, 10000.0, minmax),\n ...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```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 undulating magnitudes\n mags = { FSinOsc.kr(ExpRand(0.1, 1)).range(0, 1) }.dup...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\na = ProxySynthDef(\"xtest\", { SinOsc.ar(400) * 0.1 });\n\na.add;\n\nx = Synth(\"xtest\");\nx.release;\n\n\n/*\n\n if the resulting number of channels is larger than a given cha...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nx = { SinOsc.ar(440, 0, 0.3) }.asDefName; // this must complete first\ny = Synth(x;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the pare...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Saw`." }, { "role": "assistant", "content": "```supercollider\n// modulating the frequency\n\n{ Saw.ar(XLine.kr(40, 4000, 6), 0.2) }.play;\n\n// two band limited sawtooth waves through a resonant low pass filter\n\n{ ...
[ { "role": "user", "content": "Write a pluck whose tail uses combn. (verb combn, room 0.7, damp 0.2, mix 0.3, source pluck)" }, { "role": "assistant", "content": "`FreeVerb` is in the core library; the room and damp arguments do the work:\n\n```supercollider\n// reverb: combn on a pluck\n(\nSynth...
[ { "role": "user", "content": "Write a kick drum with a 0.12 s decay. (osc sine, sweep 0.06, decay 0.12, f0 220, 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: sine oscillator, 0.06 s pitch...
[ { "role": "user", "content": "What is `PV_Morph` in SuperCollider?" }, { "role": "assistant", "content": "PV_Morph — one kind of spectral morphing Morphs between two fft buffers by interpolating each bin's polar coordinates. Category: UGens > FFT." } ]
[ { "role": "user", "content": "What is `UGen`?" }, { "role": "assistant", "content": "UGen — Abstract superclass of all unit generators" }, { "role": "user", "content": "What does `UGen.multiNew` do?" }, { "role": "assistant", "content": "These methods are responsible for ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `DynKlank`." }, { "role": "assistant", "content": "```supercollider\n{ DynKlank.ar(`[[800, 1071, 1153, 1723], nil, [1, 1, 1, 1]], Impulse.ar(2, 0, 0.1)) }.play;\n\n{ DynKlank.ar(`[[800, 1071, 1353, 1723], nil, [1, 1, 1...
[ { "role": "user", "content": "Write a granular texture, through a reverb. (rate 14, dur 0.2, 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 {\n ...
[ { "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, 0, 1, MouseButton.kr(lag:0.001))[0]), 0, 0.1}.play\n```" }, { "role": "assistant", "content": "A closing ...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\ns = Server.local;\nServer.default = s;\ns.boot;\n);\n \n \n// definition for future reference in arbitrary Environments\n\n(\np = Pbind(\n \\midinote, PLnaryFunc(\\f, \\src, [\\dev]),\n \\dur, 0.1\n);\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(SinOsc.ar(0.3).exprange(440, 6600), 0, 0.5 * 0.1 }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened ...
[ { "role": "user", "content": "What does `ControlFile.read` do? What arguments does it take?" }, { "role": "assistant", "content": "Read file with classes and synth Arguments: Specify Radicles Class.; Key to identify synth object.." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nNdef(\\x, { SinOsc.ar(Rand(500, 900)) * 0.1 }).play;\nNdef(\\x).copy(\\y);\nNdef(\\y.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: t...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Dwhite`." }, { "role": "assistant", "content": "```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....
[ { "role": "user", "content": "What does `SDrone.getAmplitudes` do?" }, { "role": "assistant", "content": "read the amplitude control rate bus Returns: an array of floats (0.0 to 1.0)." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.boot;\n(\nz = { // thru\nBAllPass.ar(\n SoundIn.ar([0, 1]),\n MouseX.kr(10, 18000, \\exponential),\n 0.8, // rq\n 0.5); // mul\n}.play)\nz.release;\n\n(\nz = { // like a ba...
[ { "role": "user", "content": "What does `PappliedInstr.argNameAt` do? What arguments does it take?" }, { "role": "assistant", "content": "partial application for Instr Arguments: i." } ]
[ { "role": "user", "content": "What is `IdentityBag`?" }, { "role": "assistant", "content": "IdentityBag — A Bag according to identity" }, { "role": "user", "content": "What does `IdentityBag.add` do?" }, { "role": "assistant", "content": "Add anObject to the Bag. A Bag ma...
[ { "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": "Write a self-contained SuperCollider patch that uses `MouseX`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n(\nb = Bus.control(s, 9); // nine channel control rate\nb.setn([244, 737, 20, 271, 382, 172, 4, 2399, 251]);\n{\n var...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `Dgeom`. Define every value it uses." }, { "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 =...
[ { "role": "user", "content": "What is `TaskProxyGui` in SuperCollider?" }, { "role": "assistant", "content": "TaskProxyGui — a superclass for Guis for PatternProxies Please see TdefGui and PdefGui for examples! Category: JITLib > GUI, Live Coding." } ]
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `Pwrap` 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": "What does `MultiSplineFr.initTable` do?" }, { "role": "assistant", "content": "Multi dimensional spline frame rate device" } ]
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\n//var board= CytonSerial(\"/dev/tty.usbserial-DM00DRM0\", initAction: {|b| b.start});\nvar board= SyntheticData(initAction: {|b| b.start});\n~board= board;\n);\n\n~board.accelAction= {|xyz| xyz.postln}; //start postin...
[ { "role": "user", "content": "What does `FlowLayout.top` do? What arguments does it take?" }, { "role": "assistant", "content": "Get the current top indentation or manually set Arguments: arg1 — A number.." } ]
[ { "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": "What does `ServerOptions.outDevice` do?" }, { "role": "assistant", "content": "A String that allows you to choose an output sound device. The default, `nil`, will use the system's default output device. See AudioDeviceSelection for more" } ]
[ { "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": "What is `ModalDialog` in SuperCollider?" }, { "role": "assistant", "content": "ModalDialog — dialog window utility with OK and cancel functions Category: Libraries > crucial > GUI, GUI > Accessories." } ]
[ { "role": "user", "content": "Write a SuperCollider patch for batuhan's buzzer parametrized that runs as it is, with nothing assumed about the session." }, { "role": "assistant", "content": "```supercollider\n// A beautiful sc140 tweet by Batuhan Bozkurt, parametrized for real-time changes\n(\n/...
[ { "role": "user", "content": "What is `Env`?" }, { "role": "assistant", "content": "Env — Specification for a segmented envelope" }, { "role": "user", "content": "What does `Env.new` do?" }, { "role": "assistant", "content": "Create a new envelope specification." }, {...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nb.free;\nb = Buffer.read(s, ExampleFiles.apollo11);\n{\n var pointer = Phasor.ar(0, SampleDur.ir / BufDur.ir(b) * XLine.kr(1, 0.25, 20));\n var sound = Warp1.ar(1, b, pointe...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `DigitalIO` that runs as it is." }, { "role": "assistant", "content": "```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 =...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-LFNoise0\", { arg out=0;\n Out.ar(out,\n LFBrownNoise0.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": "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": "What is `EZListView` in SuperCollider?" }, { "role": "assistant", "content": "EZListView — A wrapper class for a label plus a listView with per item actions EZListView is wrapper class which creates an (optional) label and a listView. It includes per item actions as...
[ { "role": "user", "content": "What is `VarGui`?" }, { "role": "assistant", "content": "VarGui — slider / player gui to set envir variables and synth controllers and play synths, event patterns and tasks" }, { "role": "user", "content": "What does `VarGui.new` do?" }, { "role"...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-InFeedback\", { |out = 0, in = 0|\n var input, sound;\n input = InFeedback.ar(in, 1);\n sound = SinOsc.ar(input * 1300 + 300, 0, 0.4);\n Out.ar(out, ...
[ { "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": "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": "Write an Ndef at 165 Hz I can retune while it plays. (ugens sine, cutoff 800, lfo 0.1, freq 165, amp 0.12)" }, { "role": "assistant", "content": "Use `Ndef` when the patch has to change without stopping:\n\n```supercollider\n// Ndef drone: sine source through a 800 ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.boot;\n(\nz = {\n BLowPass.ar(\n SoundIn.ar([0, 1]),\n MouseX.kr(10, 20000, \\exponential), // cutoff freq.\n MouseY.kr(0.0, 1.0, \\linear), // rq\n 0.5); // mul\n...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{\n var trig;\n trig = Dust.kr(10);\n Pan2.ar(SinOsc.ar(\n TGaussRand.kr(300, 3000, trig)\n ),\n TGaussRand.kr(-1, 1, trig),\n 0.1\n )\n}.play;\n```" }, ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n var freq;\n\n freq = StreamKrDur(\n Pbrown(40,100,100,inf),\n `[ 1,2, 0.25], // an array\n 0.05);\n\n Tempo.bpm = 100; // times are in beats\n Patch...
[ { "role": "user", "content": "Write a SuperCollider patch for gabber kick (a SuperCollider snippet) that runs as it is, with nothing assumed about the session." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\\gabberkick, {\n var snd;\n snd = SinOsc.ar(Env([1000, 69, 6...
[ { "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": "Explain `Balance2` in SuperCollider briefly." }, { "role": "assistant", "content": "Balance2 — Stereo signal balancer Equal power panning balances two channels. By panning from left (pos = -1) to right (pos = 1) you are decrementing the level of the left channel fro...
[ { "role": "user", "content": "Explain `UGenInstr` in SuperCollider briefly." }, { "role": "assistant", "content": "UGenInstr — converts a single UGen into an Instr eg. UGenInstr(RLPF) Category: Libraries > crucial > Instr." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// randomly modulate all params\n(\n{ LatoocarfianC.ar(\n SampleRate.ir/4,\n LFNoise2.kr(2, 1.5, 1.5),\n LFNoise2.kr(2, 1.5, 1.5),\n LFNoise2.kr(2, 0.5, 1.5),\n LFNoise2.kr(...
[ { "role": "user", "content": "What does `IFFT.new` do? What arguments does it take?" }, { "role": "assistant", "content": "returns a time domain signal from converting the FFT frequency domain signal chain. The *new method is equivalent to the *ar message returns an audio rate Arguments: buffer ...
[ { "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": "What does this SuperCollider code do?\n```supercollider\n// compares a 441 Hz sine tone derived from sample rate (44100 * 0.01, left)\n// with a 440 Hz tone (right), resulting in a 1 Hz beating\n(\n{\n var freq;\n freq = [SampleRate.ir * 0.01, 440];\n SinOsc.ar(freq, 0, 0.1)...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `BusPlug`." }, { "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{ Splay.ar(SinOsc.ar(a.kr(3, MouseX.kr(0, 25)...
[ { "role": "user", "content": "What does `ServerTreeGui.makeWindow` do? What arguments does it take?" }, { "role": "assistant", "content": "Creates a window and displays the ServerTreeGui on it. Note this method is asynchronous and returns only the Arguments: server. Returns: ServerTreeGui class"...
[ { "role": "user", "content": "Explain this code:\n```supercollider\n~pad = Synth(\\pad, [\\freq, 165]);\n~pad.set(\\gate, 0);\n```" }, { "role": "assistant", "content": "It starts a sustained synth and then releases it.\n\n`Synth(\\pad, [\\freq, 165])` creates an instance of a SynthDef that take...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n var freq;\n\n freq = StreamKrDur(\n Pbrown(40,100,100,inf),\n `[ 1,2, 0.25], // an array\n 0.05);\n\n Tempo.bpm = 100; // times are in beats\n Patch...
[ { "role": "user", "content": "What does `View.minHeight` do? What arguments does it take?" }, { "role": "assistant", "content": "Set minimum allowed height of the view, the view will not be able to shrink smaller in height, neither by user interaction nor Arguments: height — An Int.." } ]
[ { "role": "user", "content": "Write an Ndef at 82.5 Hz I can retune while it plays. (ugens tri, cutoff 3200, lfo 0.1, freq 82.5, 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: tri source th...
[ { "role": "user", "content": "Write a kick drum with a 0.5 s decay. (osc sine, sweep 0.06, decay 0.5, 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: sine oscillator, ...
[ { "role": "user", "content": "Write a SuperCollider patch for Play your (short) soundfiles with some delay that runs as it is, with nothing assumed about the session." }, { "role": "assistant", "content": "```supercollider\n// By Bjørn Houdorf March 2013, Play your (short) soundfiles with some d...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.boot;\ns.scope;\na = { HilbertFIR.ar(SinOsc.ar(100) * -20.dbamp, LocalBuf(2048) }.play;\na.release;\n```" }, { "role": "assistant", "content": "A closing bracket is...
[ { "role": "user", "content": "What is `FoaEncoderKernel` in SuperCollider?" }, { "role": "assistant", "content": "FoaEncoderKernel — First Order Ambisonic (FOA) encoder kernels Generates encoding kernels required by the Ambisonic Toolkit's first order encoder, linkClasses/FoaEn`.`https://github....
[ { "role": "user", "content": "What is `PLFTri` in SuperCollider?" }, { "role": "assistant", "content": "PLFTri — UGenPatterns quark library Based on LFTri Category: Streams-Patterns-Events > UGenPatterns > Generators." } ]
[ { "role": "user", "content": "Show another SuperCollider example using `VarGui`." }, { "role": "assistant", "content": "```supercollider\n// synth definition with raising frequency\n\n(\nSynthDef(\\synth_0, { |devFactor = 0.1, devFreq = 10, amp = 0.1|\n var freq = XLine.kr(400, 1200, 10); \n ...
[ { "role": "user", "content": "Write an Ndef at 220 Hz I can retune while it plays." }, { "role": "assistant", "content": "`Ndef` holds the synth and the environment, so you can edit it live:\n\n```supercollider\n// Ndef drone: saw source through a 1400 Hz low-pass\n(\nNdef(\\nd_saw_220_1400, { |...
[ { "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 `Int8Array.readFromStream` do?" }, { "role": "assistant", "content": "an array whose indexed slots are all of the same type" } ]
[ { "role": "user", "content": "Write a SuperCollider patch for Digital Bird sounds that runs as it is, with nothing assumed about the session." }, { "role": "assistant", "content": "```supercollider\n(\nNdef(\\birdy, {arg freq=1500, amp=0.5, rate=10;\n var osc, son, convIn, rand;\n osc=LFCub;\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 `ServerLog.getSortedEvents` do? What arguments does it take?" }, { "role": "assistant", "content": "records OSC traffic to and from a Server and displays this in a browseable searchable interface Arguments: tail; callback. Returns: (returnvalue)" } ]
[ { "role": "user", "content": "Explain `UnaryOpStream` in SuperCollider briefly." }, { "role": "assistant", "content": "UnaryOpStream — stream modified by a unary operator A UnaryOpStream is created as a result of a unary math operation on a Stream. It is defined to respond to next by returning t...
[ { "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 = Dbrown(0, 15, 1, 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...
[ { "role": "user", "content": "Explain `PLbindefParEnvironment` in SuperCollider briefly." }, { "role": "assistant", "content": "PLbindefParEnvironment — Environment made by PLbindefPar to play and set its sources Instances of this class are made as side effect of PLbindefPar creation, assigned t...
[ { "role": "user", "content": "How do I record my output to a file?" }, { "role": "assistant", "content": "`s.record(path)` starts recording the server's output; `s.stopRecording` stops it.\n\n```supercollider\ns.record(\"C:/audio/take1.wav\");\n// play for a while\ns.stopRecording;\n```\n\nThe p...
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Impulse.ar(4, [0, MouseX.kr(0, 1)], 0.2 }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never cl...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// randomly modulate params\n(\n{ LorenzL.ar(\n SampleRate.ir,\n LFNoise0.kr(1, 2, 10),\n LFNoise0.kr(1, 20, 38),\n LFNoise0.kr(1, 1.5, 2)\n) * 0.2 }.play(s);\n```" }, { ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `ReplaceOut`." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"ReplaceOutHelp\", { |out = 0, freq = 440|\n var source;\n source = SinOsc.ar(freq, 0, 0.1);\n\n // write to the bus, replacing...
[ { "role": "user", "content": "Write a Pbind in majorPentatonic using Prand for the degrees. (scale majorPentatonic, seq Prand, dur 0.25, octave 4, instr fm, root 0)" }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nSy...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ SinOsc.ar(BrownNoise.ar(100, 200) * 0.1 }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never cl...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `ProxySynthDef`." }, { "role": "assistant", "content": "```supercollider\na = ProxySynthDef(\"xtest\", { SinOsc.ar(400) * 0.1 });\n\na.add;\n\nx = Synth(\"xtest\");\nx.release;\n\n\n/*\n\n if the resulting number of c...
[ { "role": "user", "content": "Explain `Pdfsm` in SuperCollider briefly." }, { "role": "assistant", "content": "Pdfsm — deterministic finite state machine Pdfsm is a deterministic finite state machine with signal input (written by by ccos). Category: Streams-Patterns-Events > Patterns > List > In...
[ { "role": "user", "content": "Give me an Ndef with an LFO at 0.8 Hz. (ugens sine, cutoff 400, lfo 0.8, 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 400 Hz low-pa...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n//listen to x and y output with defaults\n{Out.ar(0,0.5*SpruceBudworm.ar(0.0))}.play\n\n\n//be careful with rate range, can blow-up easily here, or just not sound\n{Out.ar(0,0.5*SpruceBudworm.ar(0.0,MouseX.kr(0.09,0.1)))}...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `FBSineN`." }, { "role": "assistant", "content": "```supercollider\n// default initial params\n{ FBSineN.ar(SampleRate.ir/4) * 0.2 }.play(s);\n```" } ]
[ { "role": "user", "content": "Show another SuperCollider example using `InFeedback`." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-InFeedback\", { |out = 0, in = 0|\n Out.ar(out,\n InFeedback.ar(in, 1)\n );\n}).add;\nSynthDef(\"help-SinOsc\", { |out = 0, freq =...