conversations
listlengths
2
6
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Latoocarfian2DN.ar(MouseX.kr(20, SampleRate.ir * 0.5), MouseX.kr(40, SampleRate.ir), mul:0.2) }.play(s);\n\n\n(\n{ Latoocarfian2DN.ar(\n SampleRate.ir/4,\n SampleRate.ir,\n ...
[ { "role": "user", "content": "What does `MxCable.freeToBundle` do? What arguments does it take?" }, { "role": "assistant", "content": "Free any resources. In practice everything is freed at stop and no resources are kept Arguments: bundle. Returns: this" } ]
[ { "role": "user", "content": "What is `Stream`?" }, { "role": "assistant", "content": "Stream — Stream is the base class for classes that define streams" }, { "role": "user", "content": "What does `Stream.play` do?" }, { "role": "assistant", "content": "Streams that retur...
[ { "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": "What does this SuperCollider code do?\n```supercollider\n//listen to x and y output\n{Out.ar(0,Brusselator.ar(Impulse.kr(MouseY.kr(1,50,'exponential')),MouseX.kr(0.01,1,'exponential')))}.play\n\n//avoid DC offset (default gamma is 1.0, listening to x only, so take off gamma\n{O...
[ { "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": "Write a minimal SuperCollider example that uses `T2K`." }, { "role": "assistant", "content": "```supercollider\n// this does not work:\n(\n{\n var trig = Dust.ar(4);\n Trig.kr(trig, 0.1) * SinOsc.ar(800) * 0.1\n}.play;\n);\n\n// this works:\n(\n{\n var trig = T2K...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\na = { SinOsc.ar(\\freq.kr(440, 1.2)) }.play;\na.set(\\freq, 330);\na.release;\na = { SinOsc.ar(\\freq.kr([440, 460], 1.2)) }.play;\na.setn(\\freq, [330, 367];\na.release;\n```" ...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// Change MembraneCircle to MembraneHexagon for a different shaped\n// circular drum head\ns.boot;\ns.reboot;\n(\n{ var excitation = EnvGen.kr(Env.perc,\n MouseButton.kr(0, 1, 0),\n ...
[ { "role": "user", "content": "What does `LFClipNoise.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "Clipped noise Arguments: freq — Approximate rate at which to generate random values.; mul — Output will be multiplied by this value.; add — This value will be added to...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\nb = Buffer.read(s, Platform.resourceDir +/+ \"sounds/a11wlk01.wav\");\n\n(\n{\n var snd, envTime, knee, out;\n snd = PlayBuf.ar(1, b, BufRateScale.kr(b), loop: 1);\n envTime = MouseX.kr(1.0e-3, 0.1e-3);\n kne...
[ { "role": "user", "content": "Write a kick at amp 0.6 with no click. (osc sine, sweep 0.06, decay 0.35, f0 220, 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: sine oscillator, 0.06 s pitch...
[ { "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 a SuperCollider patch for 8-bit synth (a SuperCollider snippet) that runs as it is, with nothing assumed about the session." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"AM2\", { arg freq = 440, modfreq = 12, amp = 0.5, attack = 0.01, ...
[ { "role": "user", "content": "Write a SuperCollider patch that uses `Pan2` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\ng = Group.new;\n\n// make 4 synths in g\n// 1.0.rand2 returns a random number from -1 to 1.\n4.do({ { arg amp ...
[ { "role": "user", "content": "What does `SoundFileFormats.sampleFormat` do?" }, { "role": "assistant", "content": "a widget for selecting SoundFile format for recording" } ]
[ { "role": "user", "content": "What is `HPZ2` in SuperCollider?" }, { "role": "assistant", "content": "HPZ2 — Two zero fixed midcut. A special case fixed filter. Implements the formula: Category: UGens > Filters > Linear." } ]
[ { "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": "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": "How do I build a live drone with Ndef at 55 Hz? (ugens saw, cutoff 200, 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 200 Hz low-p...
[ { "role": "user", "content": "Explain `FoaDominateY` in SuperCollider briefly." }, { "role": "assistant", "content": "FoaDominateY — First Order Ambisonic (FOA) dominance transformer Apply dominance to a First Order Ambisonic signal (B-format) along the y-axis. Category: Libraries > Ambisonic To...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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 Out.ar(0, SinOsc....
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// Initial values - system state y0 at time t0: y(t0) = y0 - are essential for an ODE solution.\n// In this example with the MSD model (and constant f !) time isn't explicit,\n// therefore it makes no difference if we sta...
[ { "role": "user", "content": "Write a GrainBuf synth at 28 grains per second." }, { "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 {\n var buf = Buffer.read(s, Pl...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nd = { |freq = 440| SinOsc.ar(LastValue.ar(freq, 20), 0, 0.2) }.play;\n\nd.set(\\freq, 400);\nd.set(\\freq, 200);\nd.set(\\freq, 670);\nd.set(\\freq, 680);\nd.set(\\freq, 695;\nd....
[ { "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\np = PLwhite(\\lo, \\hi);\n\n\n// prepare current Environment\n// PLseq repeats de...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// note different syntax in these two examples\n{ if(LFNoise1.kr(1.0, 0.5, 0.5), SinOsc.ar, Saw.ar) * 0.1 }.play;\n\n{ Trig1.ar(Dust.ar(3), 0.2).lag(0.1).if(FSinOsc.ar(440), FSin...
[ { "role": "user", "content": "Write a granular texture, through a reverb. (rate 16, dur 0.2, interp 2, mode sweep, rev 1)" }, { "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.wa...
[ { "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 minimal SuperCollider example that uses `PV_BinScramble`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\nb = Buffer.read(s, ExampleFiles.child);\n\n(\n// trig with MouseY\nSynthDef(\"help-binScramble\", { |out = 0, soundBufnum = 2|\n var ...
[ { "role": "user", "content": "How do I play a random majorPentatonic scale at octave 5? (scale majorPentatonic, seq Pseq, dur 0.3, octave 5, instr sine, root 0)" }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nSynthD...
[ { "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{ LatoocarfianL.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 is Env.perc and what does it take?" }, { "role": "assistant", "content": "`Env.perc(attackTime, releaseTime, level, curve)` — an attack to `level` (default 1) then a decay to zero, with curve defaulting to -4 (an exponential-ish decay). `Env.perc(0.01, 1)` is t...
[ { "role": "user", "content": "What is `PLbindefEnvironment` in SuperCollider?" }, { "role": "assistant", "content": "PLbindefEnvironment — Environment made by PLbindef to play and set its sources Instances of this class are made as side effect of PLbindef creation, assigned to PLbindef's name in...
[ { "role": "user", "content": "What does `PeakFollower.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "Track peak signal amplitude. Arguments: in — The input signal.; decay — Decay factor.." } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LinPan2`." }, { "role": "assistant", "content": "```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/...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n//you must have run this line before any of the examples below\nf= BBCutBuffer(Platform.resourceDir +/+ \"sounds/break.aiff\",8);\n\nTempoClock.default.tempo_(2.3);\n\n//default\na=BBCut2(CutBuf1(f),CageCut.new).play;\n\n...
[ { "role": "user", "content": "What does `AbstractFunction.theta` do?" }, { "role": "assistant", "content": "An object which responds to a set of messages that represent mathematical functions" } ]
[ { "role": "user", "content": "What does `AudioMulchClock.permanent` do?" }, { "role": "assistant", "content": "A Boolean. If true then the clock will continue to run after a CmdPeriod. The user is responsible for clearing permanent clocks with the #-clear" } ]
[ { "role": "user", "content": "What is `Pdefn`?" }, { "role": "assistant", "content": "Pdefn — non event stream reference definition" }, { "role": "user", "content": "What does `Pdefn.all` do?" }, { "role": "assistant", "content": "A global IdentityDictionary with all prox...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// write a sine oscillator's output to a pin\n\n(\nSynthDef(\"help-AnalogOut\", { |out = 0|\n AnalogOut.ar(0, SinOsc.ar(10));\n}).play;\n```" }, { "role": "assistant",...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `LastValue` that runs as it is." }, { "role": "assistant", "content": "```supercollider\nd = { |freq = 440| SinOsc.ar(LastValue.ar(freq, 20), 0, 0.2) }.play;\n\nd.set(\\freq, 400);\nd.set(\\freq, 200);\nd.set(\\freq,...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// logistic map as frequency control\n(\n{ var r;\n r = MouseX.kr(3.5441, 4); // stable range\n SinOsc.ar(QuadN.ar(40, r.neg, r, 0, 0.1, 800, 900)) * 0.4;\n}.play(s);\n```" ...
[ { "role": "user", "content": "Write a GrainBuf synth at 10 grains per second. (rate 10, dur 0.2, interp 4, mode noise1, rev 0)" }, { "role": "assistant", "content": "A working granular patch, with the buffer loaded before the synth starts:\n\n```supercollider\n// granular synth with GrainBuf\n(\...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\ns = Server.local;\nServer.default = s;\ns.boot;\n);\n\n(\nx = Pbind(\\midinote, Pseries(60, 1, 10), \\dur, 0.5).asStream;\ny = Pbind(\\midinote, Pseries(90, -1, 10), \\dur, 0.5).asStream;\n\nz = Pseq([2, 3, 1, 2], 1).a...
[ { "role": "user", "content": "Show another SuperCollider example using `Klank`." }, { "role": "assistant", "content": "```supercollider\n(\n{\nKlank.ar([ // the multichannel-expansion\n `[[500, 1078, 1201.5, 1723], nil, [1, 1, 0.5, 0.3]], // left channel\n `[[700, 1071, 1053, 1723], nil, [1, 1...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// linexp\n(\n{\n var mod = LFNoise2.ar(80);\n SinOsc.ar(mod.linexp(-1, 1, MouseX.kr(200, 8000, 1), MouseY.kr(200, 8000, 1))) * 0.1\n}.play;\n);\n\n// exprange\n(\n{\n var mod...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LFDNoise1`." }, { "role": "assistant", "content": "```supercollider\n// try wiggling mouse quickly;\n// LFNoise frequently seems stuck, LFDNoise changes smoothly.\n\n{ SinOsc.ar(LFNoise1.ar(MouseX.kr(0.1, 1000, 1), 2...
[ { "role": "user", "content": "How do I make a kick that starts at 220 Hz and falls to 55 Hz? (osc fm, sweep 0.06, decay 0.18, f0 220, f1 55, 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: fm osci...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// example: two SuperCollider apps communicating\n\n// application 1:\nn = NetAddr(\"127.0.0.1\", 57120); // the url should be the one of computer of app 2 (or nil)\n\no = OSCresponderNode(n, '/chat', { |t, r, msg| (\"tim...
[ { "role": "user", "content": "What does `RedMixerChannel.insertClass` do? What arguments does it take?" }, { "role": "assistant", "content": "Creates a new RedEffectModule before the Arguments: redEfxClass — A class or an array of classes.; addAction — Local to the inserts. The default `\\addToH...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Dser`." }, { "role": "assistant", "content": "```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 Sin...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `InTrig`." }, { "role": "assistant", "content": "```supercollider\ns = Server.local;\nb = Bus.control(s, 1);\n\nSynthDef(\"help-InTrig\", { |out = 0, busnum = 0|\n var inTrig;\n inTrig = InTrig.kr(busnum);\n Out.ar(...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `Dwrand` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a, freq, trig;\n a = Dwrand([0, 1, 2, 7], [0.4, 0.4, 0.1, 0.1], inf).dpoll;\n trig = Impulse.kr(MouseX.kr(1, 400, 1)...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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), 0.2) }.play;\n\n// two ba...
[ { "role": "user", "content": "How do I granulate a sample with 0.07 s grains? (rate 10, dur 0.07, interp 2, mode sweep, rev 0)" }, { "role": "assistant", "content": "A working granular patch, with the buffer loaded before the synth starts:\n\n```supercollider\n// granular synth with GrainBuf\n(\...
[ { "role": "user", "content": "How do I build a live drone with Ndef at 110 Hz? (ugens saw, cutoff 200, lfo 0.8, freq 110, 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 through a...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Klank`." }, { "role": "assistant", "content": "```supercollider\n{ Klank.ar(`[[800, 1071, 1153, 1723], nil, [1, 1, 1, 1]], Impulse.ar(2, 0, 0.1)) }.play;\n\n{ Klank.ar(`[[800, 1071, 1353, 1723], nil, [1, 1, 1, 1]], Du...
[ { "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": "What does this SuperCollider patch do?\n```supercollider\n(\n{\n~a={SinOsc.ar([22.5, 23], mul: ChaosGen.allSubclasses.choose.ar(rrand(1, 30))* 0.3)};\n~b={SinOsc.ar([22.5, 23], mul: 0.3)};\n~c={SinOsc.ar([22.5, 23]*400, mul: ChaosGen.allSubclasses.choose.ar(rrand(1, 30))* 0.03)...
[ { "role": "user", "content": "How do I make a kick that starts at 220 Hz and falls to 40 Hz? (osc saw, sweep 0.06, decay 0.12, f0 220, f1 40, 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 os...
[ { "role": "user", "content": "Write a Pbind whose degrees repeat every Prand cycle. (scale minorPentatonic, seq Prand, dur 0.4, octave 5, instr pluck, root 0)" }, { "role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```supercollide...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// linexp\n(\n{\n var mod = LFNoise2.ar(80);\n SinOsc.ar(mod.linexp(-1, 1, MouseX.kr(200, 8000, 1), MouseY.kr(200, 8000, 1))) * 0.1\n}.play;\n);\n\n// exprange\n(\n{\n var mod...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n {\n var a, n = 5, m = 64;\n a = {\n var x;\n x = { 0.2.rand2 } ! m;\n x = x ++ ({ Drand({ 0.2.rand2 } ! n) } ! m.rand);\n Dseq(x.scramble, inf)\n ...
[ { "role": "user", "content": "Write a kick at amp 0.6 with a click. (osc saw, sweep 0.06, decay 0.18, f0 180, f1 48, amp 0.6, 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: saw oscillator, 0...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `Duty`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n// this is useful when two UGens need to be called, but only one of their outputs is needed\n(\n{\n var a, b, c;\n a =...
[ { "role": "user", "content": "What is `FoaWa` in SuperCollider?" }, { "role": "assistant", "content": "FoaWa — First Order Ambisonic (FOA) Soundfield Active Energy Vector Return the Active Energy Vector, Wa, of a first order ambisonic (B-format) signal. Category: Libraries > Ambisonic Toolkit > ...
[ { "role": "user", "content": "What is `PTDelay` in SuperCollider?" }, { "role": "assistant", "content": "PTDelay — UGenPatterns quark library Based on TDelay Category: Streams-Patterns-Events > UGenPatterns > Modifiers." } ]
[ { "role": "user", "content": "What is `SynthDesc`?" }, { "role": "assistant", "content": "SynthDesc — Description of a synth definition" }, { "role": "user", "content": "What does `SynthDesc.read` do?" }, { "role": "assistant", "content": "Adds all synthDescs in a path to...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `IRand`." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-IRand\", {\n Out.ar(\n IRand(0, 1), // play on random channel between 0 and 1\n FSinOsc.ar(500,\n 0, Line.kr(0.2, 0, 0.1,...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ TwoPole.ar(WhiteNoise.ar(0.005), 2000, 0.95) }.play\n\n{ TwoPole.ar(WhiteNoise.ar(0.005), XLine.kr(800, 8000, 8), 0.95) }.play\n\n{ TwoPole.ar(WhiteNoise.ar(0.005), MouseX.kr(8...
[ { "role": "user", "content": "What is `Latoocarfian2DN` in SuperCollider?" }, { "role": "assistant", "content": "Latoocarfian2DN — latoocarfian 2D chaotic generator `x(n+1) = sin(by(n)) + c*sin(bx(n))` Category: UGens > Generators > Stochastic." } ]
[ { "role": "user", "content": "What does `EnvelopeView.setFillColor` do? What arguments does it take?" }, { "role": "assistant", "content": "Sets the color used to draw the inside of the node at the given Arguments: index — An Integer.; color — A Color.." } ]
[ { "role": "user", "content": "Write a self-contained SuperCollider patch for now with snooze (press mouse button). Define every value it uses." }, { "role": "assistant", "content": "```supercollider\nNdef(\\a, { |freq=2000, rate=1, width=0.6, now = 10|\n LFPulse.kr(rate, 0, 4/6) *\n LFPulse.kr...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `MouseY`." }, { "role": "assistant", "content": "```supercollider\n{ SinOsc.ar(MouseY.kr(40, 10000, 1), 0, 0.1) }.play;\n```" } ]
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `Harmonics`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\na.ramp(1.0, 1.0); // returns a harmonic series\n\nb = Buffer.alloc(s, 512, 1);\n// harmonic series for freqs, ra...
[ { "role": "user", "content": "Show another SuperCollider example using `Monitor`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\ns.scope(16);\n\n{ Out.ar(87, SinOsc.ar(MouseX.kr(40, 10000, 1) * [1, 2, 3], 0, 0.2)) }.play;\nx = Monitor.new;\nx.play(87, 3, 1, 2);\nx.out = 0;\nx....
[ { "role": "user", "content": "Write a SuperCollider patch that uses `EnvGen` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n// as amplitude envelope\n(\n{\n var env = Env([0, 1, 0.5, 1, 0], [0.01, 0.5, 0.02, 0.5]);\n SinOsc.ar(470...
[ { "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": "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": "Explain this code:\n```supercollider\n{ Pan2.ar(SinOsc.ar(440) * 0.2, SinOsc.kr(0.1)) }.play;\n```" }, { "role": "assistant", "content": "A sine that slowly moves between the speakers.\n\n`SinOsc.kr(0.1)` is a control-rate sine at 0.1 Hz — one cycle every 10 seconds...
[ { "role": "user", "content": "What does `UnicodeResponder.registerAll` do? What arguments does it take?" }, { "role": "assistant", "content": "register responder functions for unicode and modifier combinations Arguments: ... sets." } ]
[ { "role": "user", "content": "Explain `BufAllpassL` in SuperCollider briefly." }, { "role": "assistant", "content": "BufAllpassL — Buffer based all pass delay line with linear interpolation. All pass delay line with linear interpolation which uses a buffer for its internal memory. See also BufAl...
[ { "role": "user", "content": "How do I granulate a sample with 0.1 s grains? (rate 10, dur 0.1, 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": "How do I play a random majorPentatonic scale at octave 5? (scale majorPentatonic, seq Pshuf, dur 0.2, octave 5, instr pluck, root 0)" }, { "role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```supercol...
[ { "role": "user", "content": "Explain `BBandStop` in SuperCollider briefly." }, { "role": "assistant", "content": "BBandStop — Band reject filter The B equalization suite is based on the Second Order Section (SOS) biquad UGen. Category: UGens > Filters > BEQSuite." } ]
[ { "role": "user", "content": "Write a SuperCollider patch that uses `ExpRand` and actually plays. Assume nothing about the session." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"help-ExpRand\", { |out = 0|\n Out.ar(out,\n FSinOsc.ar(\n ExpRand(100.0, 8000.0),\n ...
[ { "role": "user", "content": "Write a self-contained SuperCollider patch that uses `Saw`. Define every value it uses." }, { "role": "assistant", "content": "```supercollider\n(\n SynthDef(\\controlList, { |out = 0, freq = 440, amp = 0.1, detune = #[0.999, 1.001], gate = 1|\n var sig = M...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-PinkNoise\", { |out = 0|\n Out.ar(out,\n PinkNoise.ar(0.4)\n )\n}).play;\n```" }, { "role": "assistant", "content": "A closing bracket is miss...
[ { "role": "user", "content": "Give me an Ndef with an LFO at 0.8 Hz. (ugens tri, cutoff 2400, lfo 0.8, freq 82.5, amp 0.12)" }, { "role": "assistant", "content": "Use `Ndef` when the patch has to change without stopping:\n\n```supercollider\n// Ndef drone: tri source through a 2400 Hz low-pass\n...
[ { "role": "user", "content": "Write a Pbind whose degrees repeat every Pwalk cycle. (scale minorPentatonic, seq Pwalk, dur 0.25, octave 4, instr fm, root 0)" }, { "role": "assistant", "content": "Put the scale and the degree pattern in the `Pbind` and it will pick notes for you:\n\n```supercolli...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// needs Buffer c prepared above\n\n(\ny = {\n var add = LFDNoise3.ar(0.3) * [0.05, 0.0505];\n GFIS.ar(\n { |x| BufRd.ar(1, c, c.numFrames * (x + add)) }, \n (LFDNoise3.a...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\ns.boot // Boot the server, if you need to\n\n// read a whole sound into memory\n\n// ExampleFiles helps locate audio files used in examples\np = ExampleFiles.child;\n// peek at the path to see location and the format of a...
[ { "role": "user", "content": "Write a granular texture, through a reverb. (rate 10, dur 0.07, interp 4, mode noise1, rev 1)" }, { "role": "assistant", "content": "`GrainBuf` needs a buffer, a trigger and a grain duration:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.waitForBoot {\n...
[ { "role": "user", "content": "Explain `ObjectNotFound` in SuperCollider briefly." }, { "role": "assistant", "content": "ObjectNotFound — an placeholder object for when a player was not found when loading was attempted due to it being referenced by path from within another player Category: Librar...
[ { "role": "user", "content": "Explain `RedSamp` in SuperCollider briefly." }, { "role": "assistant", "content": "RedSamp — playing buffers This class uses PlayBuf to play back parts of a buffer. With `overlap` one can set the number of voices. It uses the same interface as RedDiskInSampler and R...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nd = SynthDef(\\tone, { |out = 0, freq = 200|\n var sig;\n\n freq.spec = ControlSpec(20, 20000);\n sig = SinOsc.ar(freq);\n\n Out.ar(out, sig);\n}).add;\n;\n\nd.specs.freq....
[ { "role": "user", "content": "What does `UnicodeResponder.shift` do? What arguments does it take?" }, { "role": "assistant", "content": "register responder functions for unicode and modifier combinations Arguments: ... assns." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.boot;\nb = Buffer.alloc(s, s.sampleRate);\n(\n{\n MultiTap.ar(`[0.1, 0.2, 0.3, 0.4], `[0.1, 0.2, 0.4, 0.8],\n Decay.ar(Dust.ar(2), 0.1, PinkNoise.ar), bufnum: b.bufnum)\n}....
[ { "role": "user", "content": "Explain `HenonC` in SuperCollider briefly." }, { "role": "assistant", "content": "HenonC — Henon map chaotic generator A cubic-interpolating sound generator based on the difference equation: Category: UGens > Generators > Chaotic." } ]