conversations
listlengths
2
6
[ { "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": "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": "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": "What does this SuperCollider patch do?\n```supercollider\n(\nPdef(\\zed, \n Pbind(\n \\osc, Pseq([SinOsc, LFSaw],inf),\n \\instrument, Prout({ arg ev;\n SynthDef(\\zed, { arg out=0, gate=1, amp=0.1, pan=0, freq=200;\n var sig;\n ...
[ { "role": "user", "content": "Show another SuperCollider example using `Latch`." }, { "role": "assistant", "content": "```supercollider\n{ Blip.ar(LFNoise0.kr(9, 400, 500), 4, 0.2) }.play;\n```" } ]
[ { "role": "user", "content": "What is `DigitalIO`?" }, { "role": "assistant", "content": "DigitalIO — Read or write data to a digital pin" }, { "role": "user", "content": "What does `DigitalIO.ar` do?" }, { "role": "assistant", "content": "The output of this UGen is alway...
[ { "role": "user", "content": "What is `Object`?" }, { "role": "assistant", "content": "Object — abstract superclass of all objects" }, { "role": "user", "content": "What does `Object.readArchive` do?" }, { "role": "assistant", "content": "Read in an object from a text arc...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-NRand\", { |out = 0, n = 0|\n Out.ar(out,\n FSinOsc.ar(\n NRand(1200.0, 4000.0, n),\n 0, Line.kr(0.2, 0, 0.01, doneAction: Done.freeSelf))\n )\n...
[ { "role": "user", "content": "Add gverb to a bell patch at room 0.5." }, { "role": "assistant", "content": "`FreeVerb` is in the core library; the room and damp arguments do the work:\n\n```supercollider\n// reverb: gverb on a bell\n(\nSynthDef(\\reverb_synth, { |out = 0, freq = 330, amp = 0.2|\...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// vary frequency\n{ LorenzL.ar(MouseX.kr(20, SampleRate.ir)) * 0.3 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesi...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `InFeedback`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-InFeedback\", { |out = 0, in = 0|\n var input, sound;\n input = InFeedback.ar(in, 1);\n ...
[ { "role": "user", "content": "Explain this SuperCollider patch.\n```supercollider\n////////////// xosc nufo is unused by now ///////////\n// OSCdef(\\xoscAlive, { |msg, time|\n// if (NTMI.nufo.lastInTime == 0 or: { NTMI.nufo.timeSinceLast > 10 }) {\n// Tdef(\\allLEDs).play;\n// };\n// NTMI.nufo.de...
[ { "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.set(\\freq, 880, \\out, 1); // two pairs\nx.set(0, 660...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// given a UGen graph ...\n(\n{ Splay.ar(SinOsc.ar({ exprand(300.0, 10000.0) } ! 17, 0, { 1.0.rand } ! 17)) * 0.1 }.play\n);\n\n// ... all existing UGen inputs can be replaced or modified with an arbitrary function\n// e....
[ { "role": "user", "content": "What is `Class` in SuperCollider?" }, { "role": "assistant", "content": "Class — A Class describes the structure and implementation of a set of objects which are its instances. Category: Core > Kernel, Language > OOP." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-NRand\", { |out = 0, n = 0|\n Out.ar(out,\n FSinOsc.ar(\n NRand(1200.0, 4000.0, n),\n 0, Line.kr(0.2, 0, 0.01, doneAction: Done.freeSelf))\n )\n...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\nSynthDef(\\pluck, {|freq = 440, dur = 1|\nvar klang,note;\ndur = dur * 2;\nnote = freq.cpsmidi;\nnote = note + (LFNoise2.ar(20).range(-1,1) * (1/8));\nklang = SinOsc.ar((note * [1,1.002]).midicps, phase: VarSaw.ar(note.m...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-out\", { |out = 0, freq = 440|\n var source;\n source = SinOsc.ar(freq, 0, 0.1);\n\n // write to the bus, adding to previous contents\n Out.ar(out, s...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\na = {LFTri.ar(100+(1000*Maths2.ar(MouseX.kr, MouseY.kr, 0.2, 1, 0, 1, LFPulse.ar(2))[0]), 0, 0.1}.play\n```" }, { "role": "assistant", "content": "A closing bracket i...
[ { "role": "user", "content": "What does `PopUpTreeMenu.sortFunc` do?" }, { "role": "assistant", "content": "Set a custom Function to sort the tree dictionary in other ways than the default alphabetic order. Note that the #-tree keys are converted and passed in to this function as" } ]
[ { "role": "user", "content": "Write an Ndef with a tri source and a 200 Hz low-pass." }, { "role": "assistant", "content": "`Ndef` holds the synth and the environment, so you can edit it live:\n\n```supercollider\n// Ndef drone: tri source through a 200 Hz low-pass\n(\nNdef(\\nd_tri_55_200, { |f...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `Dbrown`. Define every value it uses." }, { "role": "assistant", "content": "```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.k...
[ { "role": "user", "content": "Give me a granular patch with noise grain position and interp 4. (rate 14, dur 0.04, interp 4, mode noise, rev 1)" }, { "role": "assistant", "content": "Granulation is `GrainBuf` plus a trigger rate; the position can move:\n\n```supercollider\n// granular synth with...
[ { "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": "What is `ControlSpec`?" }, { "role": "assistant", "content": "ControlSpec — numerical input specification" }, { "role": "user", "content": "What does `ControlSpec.map` do?" }, { "role": "assistant", "content": "Maps and constrains a value bet...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n{ BlitB3Saw.ar(XLine.kr(1000, 20, 10)) }.play;\n\n//aliasing suddenly appears for very high frequencies\n{ BlitB3Saw.ar(MouseX.kr(10,10000,'exponential'),MouseY.kr(0.01,0.99)) }.play;\n\n//comparison\n{ Saw.ar(1000) }.pla...
[ { "role": "user", "content": "Explain `TimeStretch2` in SuperCollider briefly." }, { "role": "assistant", "content": "TimeStretch2 — Server Side Time Stretch Though much slower, TimeStretch is preferred, as it sounds much better. TimeStretch2 is provided more as an experimental convenience, and ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `FBSineL`." }, { "role": "assistant", "content": "```supercollider\n// default initial params\n{ FBSineL.ar(SampleRate.ir/4) * 0.2 }.play(s);\n```" } ]
[ { "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": "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": "Show me a self-contained SuperCollider patch using `PV_BrickWall`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n\n(\n{\n var in, chain;\n in = WhiteNoise.ar(0.2);\n chain = FFT(LocalBuf(2048), in);\n chain = P...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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 controlled by mouse x\n(\n{\n ...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `TWChoose` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a;\n a = [\n SinOsc.ar,\n Saw.ar,\n Pulse.ar\n ];\n TWChoose.ar(Dust.ar(Mo...
[ { "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": "Show another SuperCollider example using `Ball`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var f, sf, g;\n sf = LFNoise0.ar(MouseX.kr(1, 100, 1));\n g = MouseY.kr(0.1, 10, 1);\n f = Ball.ar(sf, g, 0.01, 0.01);\n f = f * 140 + 500;\n SinOs...
[ { "role": "user", "content": "Write an Ndef with a saw source and a 200 Hz low-pass." }, { "role": "assistant", "content": "`Ndef` is a named proxy you can redefine while it is playing:\n\n```supercollider\n// Ndef drone: saw source through a 200 Hz low-pass\n(\nNdef(\\nd_saw_82_200, { |freq = 8...
[ { "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 `IdentityDictionary`." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\\help_sinegrain, { |out = 0, freq = 440, sustain = 0.05|\n var env;\n env = EnvGen.kr(Env.perc(0.01, sustain, 0.2), doneActi...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch for Beam me up scotty. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n{\nvar time = 8;\nvar freq = (40-12).midicps;\nvar a = VarSaw.ar(freq/2, width: XLine.ar(0.5,1,time)).range(0,XLine...
[ { "role": "user", "content": "What does `Image.draw` do?" }, { "role": "assistant", "content": "shortcut for drawing inside an image. equivalent to" } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `DelayN`." }, { "role": "assistant", "content": "```supercollider\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, W...
[ { "role": "user", "content": "Write a kick at amp 0.8 with a click. (osc fm, sweep 0.06, decay 0.25, f0 180, f1 40, amp 0.8, rev 1)" }, { "role": "assistant", "content": "The pitch envelope is what makes it read as a drum, not the oscillator:\n\n```supercollider\n// kick drum: fm oscillator, 0.0...
[ { "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": "Show me a self-contained SuperCollider patch using `Resonz`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"noiseToPitch\", { arg out = 0, mul = 1;\n Out.ar(\n out,\n Resonz.ar(\n WhiteNoise.ar(mul)...
[ { "role": "user", "content": "Explain this SuperCollider patch.\n```supercollider\n// =========================\n// extra demos for \\glockenspiel\n// =========================\n\n(\n// made by Diya Menon\n// demo\nPbindef(\\dmglockenspiel,\n \\instrument, \"glockenspiel\",\n \\midinote, Pseq([\n ...
[ { "role": "user", "content": "Write a Pbind in minorPentatonic using Pwalk for the degrees. (scale minorPentatonic, seq Pwalk, dur 0.25, octave 4, instr pluck, root 0)" }, { "role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```sup...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `Dbrown`. Define every value it uses." }, { "role": "assistant", "content": "```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.k...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `T2A`." }, { "role": "assistant", "content": "```supercollider\n// example\n(\n{\n var trig = Impulse.kr(MouseX.kr(1, 100, 1));\n Ringz.ar(T2A.ar(trig), 800, 0.01) * 0.4\n}.play;\n);\n\n// compare with K2A\n(\n{\n v...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Lorenz2DC.ar(8800, 16000) }.play(s);\n\n// randomly modulate params\n(\n{ Lorenz2DC.ar(\n 110, 22050,\n LFNoise2.kr(1, 2, 10),\n 20,\n LFNoise2.kr(1, 1.5, 2),\n 0.01\n) * ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `PV_MagFreeze`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\nb = Buffer.read(s, ExampleFiles.child);\n\n\n(\nSynthDef(\"help-magFreeze\", { |out = 0|\n var in, chain;\n in = SinOsc.ar(LFNoise1.kr...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `RunningSum`." }, { "role": "assistant", "content": "```supercollider\n// distorts of course - would need scaling\n{ RunningSum.ar(SoundIn.ar) }.play\n\n// Running Average over x samples\n(\n{\n var x = 100;\n Ru...
[ { "role": "user", "content": "What is `Line` in SuperCollider?" }, { "role": "assistant", "content": "Line — Line generator. Generates a line from the start value to the end value. Category: UGens > Envelopes." } ]
[ { "role": "user", "content": "What does `RedMixerChannel.store` do? What arguments does it take?" }, { "role": "assistant", "content": "Saves an instance as an archive to disk. All settings and effect inserts are stored. To read it back use Arguments: path — A file path as a string.." } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Pseq`." }, { "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, 0.2), doneAction: Don...
[ { "role": "user", "content": "What does `DissonanceCurve.fm` do? What arguments does it take?" }, { "role": "assistant", "content": "Create a curve based on the timbre of a given FM Arguments: carrier — The carrier frequency in Hz; modulator — The modulation frequency in Hz; depth — The depth (o...
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\ns.boot;\n\nInstr(\"saw\",{ arg freq=400; Saw.ar(freq) * EnvGen.kr(Env.perc,doneAction:2)});\n\np = Patch(\"saw\",[KrNumberEditor(300,\\freq)]);\n\nSheet({ arg f;\n p.gui(f);\...
[ { "role": "user", "content": "Explain `Formlet` in SuperCollider briefly." }, { "role": "assistant", "content": "Formlet — FOF-like filter. This is a resonant filter whose impulse response is like that of a sine wave with a Decay2 envelope over it. It is possible to control the attacktime and de...
[ { "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": "Explain `SplineOsc` in SuperCollider briefly." }, { "role": "assistant", "content": "SplineOsc — Plays a spline in a loop with X as time, ignoring any time reversals Not functioning as expected. Hmmmmmmm. Category: UGens > Generators, Splines." } ]
[ { "role": "user", "content": "What does `MKtl.elAt` do?" }, { "role": "assistant", "content": "Access an element or group in the elementGroup or in groups by hierarchical indices or names. Supports nil and \\all as wildcards, and multi-expands correctly. `k = MKtl(\\mynano2," } ]
[ { "role": "user", "content": "What are you good at?" }, { "role": "assistant", "content": "SuperCollider. I can explain its classes and UGens, write SynthDefs and patches, read a patch back to you, and tell you why one does not compile. I am 198M parameters; I am not a general assistant." } ]
[ { "role": "user", "content": "Explain `Pbind` in SuperCollider briefly." }, { "role": "assistant", "content": "Pbind — combine several value patterns to one event stream by binding keys to values Pbind combines several value streams into one event stream. Each value stream is assigned to one or ...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// create a def with some variants\n(\nSynthDef(\\vartest, { |out, freq = 440, amp = 0.2, a = 0.01, r = 1|\n // the EnvGen with doneAction: Done.freeSelf frees the synth automatically when done\n Out.ar(out, SinOsc.ar(f...
[ { "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": "Write a Pbind whose degrees repeat every Prand cycle. (scale majorPentatonic, seq Prand, dur 0.2, 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```supercoll...
[ { "role": "user", "content": "Give me an Ndef with an LFO at 0.3 Hz. (ugens sine, cutoff 2400, lfo 0.3, freq 220, 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 2400 Hz low-pass\...
[ { "role": "user", "content": "What does `Server.isLocal` do?" }, { "role": "assistant", "content": "`true` if the server is running on the same machine as sclang, `false`" } ]
[ { "role": "user", "content": "Explain `Psetp` in SuperCollider briefly." }, { "role": "assistant", "content": "Psetp — event pattern that sets values of one key Sets a value in an event stream until it ends, repeats this with new values until the value stream ends. Category: Streams-Patterns-Eve...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `ClipNoise`." }, { "role": "assistant", "content": "```supercollider\n{ ClipNoise.ar(0.2) }.play;\n```" } ]
[ { "role": "user", "content": "Write a kick at amp 0.6 with no click. (osc saw, sweep 0.06, decay 0.18, f0 150, 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: saw oscillator, 0.06 s pitch s...
[ { "role": "user", "content": "Explain this SuperCollider patch.\n```supercollider\n// UnitTestScript(\"Collapse\", thisProcess.nowExecutingPath).runScript;\n\n{\n |test|\n var collapseValues = List();\n var collapse;\n\n collapse = Collapse({ |v| collapseValues.add(v) }, 0.1);\n\n collapseValues.clear;...
[ { "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 BLowPass4.ar(\n SoundIn.ar([0, 1]),\n MouseX.kr(10, 20000, \\exponential), // cutoff freq.\n MouseY.kr(0.1, 1.0, \\linear), // rq - compensate for 2...
[ { "role": "user", "content": "What does `Slider2D.thumbSize` do? What arguments does it take?" }, { "role": "assistant", "content": "The size of the Arguments: An Integer amount of pixels.." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\na = {\n var dur;\n\n dur = 0.1;\n\n LFTri.ar(100+(1000*Maths.ar(dur/2, dur/2, 0.99, 1, 0, 1, LFNoise0.ar(1/dur).range(0,1))[0]), 0, 0.1)\n}.play\n```" }, { "role": ...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\n{\n var freqs = [200, 600, 400, 450, 150, 20, 800];\n var amps = Saw.ar(freq: [2,3, 5]).range(1, 0.5, 0.3, 0.8);\n var snd = LFTri.ar(freq: freqs, mul: amps);\n Mix.ar(snd)\n}.play;\n)\n```" }, { "role": "...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Fdef`." }, { "role": "assistant", "content": "```supercollider\n// sound example\n(\ns.boot;\nSynthDef(\"gpdef\",\n { |out = 0, freq = 440, sustain = 0.05, amp = 0.1|\n var env;\n env = EnvGen.kr(Env.perc(0.01,...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Amplitude`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n // LFSaw begins at 0, illustrates attack time better\n var sig = LFSaw.ar(440);\n var amps = Amplitude.ar(\n sig,\n attackTime: [0.0...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\ns.boot;\n\n(\nSynthDef(\"lazerdrone\", {\n var in, freq, hasFreq;\n\n \n in = SinOsc.ar(440 * LFSaw.kr(100, 1000));\n\n # freq, hasFreq = Pitch.kr(\n in,\n ampThreshold: 0.09,\n median: 1);...
[ { "role": "user", "content": "Explain `FloatArray` in SuperCollider briefly." }, { "role": "assistant", "content": "FloatArray — an array of 32-bit single precision floating point numbers An array of 32-bit single precision floating point numbers. Category: Collections > Ordered." } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LeastChange`." }, { "role": "assistant", "content": "```supercollider\n(\nd = { |amp = 1.0|\n var in1, in2;\n in1 = LFNoise0.ar(800, amp);\n in2 = SinOsc.ar(800);\n LeastChange.ar(in1, in2) * 0.1;\n}.play;\n);\n\n...
[ { "role": "user", "content": "Explain this SuperCollider patch.\n```supercollider\n/// Installing sc3-plugins quarks\n\n// If you installed the sc3-plugins to a user location:\n~sc3plugs = Quarks(\nreposPath: \"https://sc3-plugins.svn.sourceforge.net/svnroot/sc3-plugins/build\",\nlocalPath: Platform.userApp...
[ { "role": "user", "content": "Write a granular texture, dry. (rate 20, dur 0.1, interp 2, 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(\ns.waitForBoot {\...
[ { "role": "user", "content": "What does `BiPanB2.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "2D Ambisonic B-format panner. Arguments: inA — Input signal A; inB — Input signal B.; azimuth — Position around the circle from -1 to +1. -1 is behind, -0.5 is left, 0 is ...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\na = Synth(\\MoaningDialogue)\n\n//COOL TWEAKS\n//AngryTweak\na.set(\\feedback, 29,\\freq, 6)\n//CalmTweak\na.set(\\feedback, 60, \\freq, 0.8)\n//WeirdTweak\na.set(\\feedback, 2.8, \\freq, 2)\n\n(\nSynthDef(\\MoaningDialo...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{WalshHadamard.ar(SoundIn.ar, MouseX.kr(0,64)}.play\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never ...
[ { "role": "user", "content": "What is `Rest`?" }, { "role": "assistant", "content": "Rest — Represents a rest in event patterns" }, { "role": "user", "content": "What does `Rest.new` do?" }, { "role": "assistant", "content": "Create an instance of Rest, with a value to be...
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// default initial params\n{ LatoocarfianC.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// default initial params\n{ LinCongL.ar(MouseX.kr(20, SampleRate.ir)) * 0.2 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the p...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{SmoothDecimator.ar(SinOsc.ar([400, 404], 0, 0.2), MouseX.kr(0, 44100), MouseY.kr(0, 1))}.play\n\n{SmoothDecimator.ar(SoundIn.ar, MouseX.kr(0, 44100), MouseY.kr(0, 1)}.play\n```"...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `SoundIn`." }, { "role": "assistant", "content": "```supercollider\n// world's most expensive patchcord (use headphones to avoid feedback)\n{ SoundIn.ar(0) }.play;\n\n// stereo version\n{ SoundIn.ar([0, 1]) }.play;\n\n...
[ { "role": "user", "content": "Show another SuperCollider example using `RunningSum`." }, { "role": "assistant", "content": "```supercollider\n// RMS Power\n(\n{\n var input, numsamp;\n\n input = LFSaw.ar;\n numsamp = 30;\n\n (RunningSum.ar(input.squared, numsamp) / numsamp).sqrt\n}.p...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ BPF.ar(BrownNoise.ar(0.1.dup), MouseX.kr(40, 17000, 1), 0.2 }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened...
[ { "role": "user", "content": "GrainBuf complains about too many grains." }, { "role": "assistant", "content": "The number of simultaneous grains is `density × dur` in seconds, and it exceeds maxGrains (512 by default). Either lower the trigger rate, shorten the grains, or raise the limit: `Grain...
[ { "role": "user", "content": "What is `FBSineN` in SuperCollider?" }, { "role": "assistant", "content": "FBSineN — Feedback sine with chaotic phase indexing A non-interpolating sound generator based on the difference equations: Category: UGens > Generators > Chaotic." } ]
[ { "role": "user", "content": "How do I build a live drone with Ndef at 55 Hz? (ugens saw, cutoff 800, lfo 0.8, freq 55, 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 800 Hz low-p...
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// randomly modulate params\n(\n{ LinCongN.ar(\n LFNoise2.kr(1, 1e4, 1e4),\n LFNoise2.kr(0.1, 0.5, 1.4),\n LFNoise2.kr(0.1, 0.1, 0.1),\n LFNoise2.kr(0.1)\n) * 0.2 }.play(s);\...
[ { "role": "user", "content": "Write a kick at amp 0.6 with a click. (osc sine, 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: sine oscillator,...