conversations
listlengths
2
6
[ { "role": "user", "content": "Write a Pbind in majorPentatonic using Pseq for the degrees. (scale majorPentatonic, seq Pseq, dur 0.25, octave 5, instr sine, root 0)" }, { "role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```superc...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Condition`." }, { "role": "assistant", "content": "```supercollider\n(\nc = Condition.new(false);\n\nRoutine {\n 1.wait;\n \"waited for 1 second\".postln;\n 1.wait;\n \"waited for another second, now waiting for y...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `Pmulp` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n// sound example\n(\nSynthDef(\\sinegrain,\n { |out = 0, freq = 440, sustain = 0.02|\n var env;\n env = EnvGen.kr(Env.perc(0...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nd = SynthDef(\"help-NodeControl\", { |out = 0, freq = 400|\n Out.ar(out,\n SinOsc.ar(freq, 0, 0.5)\n )\n});\ny = d.play; // the synth\n\nc = NodeControl(y, 1;\n\nc.value = ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Pulse`." }, { "role": "assistant", "content": "```supercollider\n// modulate frequency\n{ Pulse.ar(XLine.kr(40, 4000, 6), 0.1, 0.2) }.play;\n\n// modulate pulse width\n{ Pulse.ar(200, SinOsc.kr(0.2).range(0.01, 0.99),...
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `SelectXFocus` that runs as it is." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a;\n a = [\n Saw.ar(LFSaw.kr(3 * [1, 1.01], 0, 100, 230)),\n SinOsc.ar,\n Pulse.ar(LFPulse.kr(3 ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LinLin`." }, { "role": "assistant", "content": "```supercollider\n// examples:\n\n(\n{\n var mod = SinOsc.kr(Line.kr(1, 10, 10));\n SinOsc.ar(LinLin.kr(mod, -1, 1, 100, 900)) * 0.1\n}.play;\n);\n\n// modulating dest...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `MoogFF`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n// Play it with the mouse...\nx = { MoogFF.ar(WhiteNoise.ar(01.1), MouseY.kr(100, 10000, 1), MouseX.kr(0, 4)) }.play(s);\nx.free;\n\n// Mmmm, ...
[ { "role": "user", "content": "What does Splay.ar do?" }, { "role": "assistant", "content": "`Splay.ar(inArray, spread, level, center, levelComp)` takes an array of mono signals and distributes them across the stereo field, so `Splay.ar(SinOsc.ar([220, 330, 440]) * 0.1)` is a three-source stereo ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Logistic`." }, { "role": "assistant", "content": "```supercollider\n// default values\n{ Logistic.ar }.play\n\n// onset of chaos\n{ Logistic.ar(Line.kr(3.55, 3.6, 5), 1000) }.play\n\n// explore via Mouse\n{ Logistic.a...
[ { "role": "user", "content": "Show another SuperCollider example using `Scale`." }, { "role": "assistant", "content": "```supercollider\n(\nr = {\n var scale = Scale.choose.postln;\n SinOsc.ar(\n (\n DegreeToKey.kr(\n scale.as(LocalBuf),\n MouseX.kr(0, 15), // mouse index...
[ { "role": "user", "content": "What does `DWGPluckedStiff.ar` do? What arguments does it take?" }, { "role": "assistant", "content": "Plucked physical model. Arguments: freq — Sound frequency.; amp — Key pulsation strenght. Betwen 0 and 1.; gate — Releases synth when value changes from >0 to 0.; ...
[ { "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": "Show another SuperCollider example using `LeastChange`." }, { "role": "assistant", "content": "```supercollider\n(\nd = { |freq = 440|\n var internalFreq;\n internalFreq = LFNoise0.ar(0.3, 300, 800);\n SinOsc.ar(\n LeastChange.kr(freq, internalFreq) // two sou...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\n~chaos={\n var signal, myFrequency, frequencyMin=0.1, frequencyMax=30, myAmplitude, amplitudeMin=0.01, amplitudeMax=0.6, myPhase, phaseMin=0, phaseMax=1.5;\n myFrequency = Array.fill(2, {[rrand(frequencyMin, frequen...
[ { "role": "user", "content": "What does `UnicodeResponder.put` do? What arguments does it take?" }, { "role": "assistant", "content": "register responder functions for unicode and modifier combinations Arguments: address; val." } ]
[ { "role": "user", "content": "What does `Document.selectLine` do? What arguments does it take?" }, { "role": "assistant", "content": "Select a line of the document by Arguments: line — An Integer.." } ]
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `LinCongC`." }, { "role": "assistant", "content": "```supercollider\n// default initial params\n{ LinCongC.ar(MouseX.kr(20, SampleRate.ir)) * 0.2 }.play(s);\n```" } ]
[ { "role": "user", "content": "Give me a sine kick with a 0.06 s pitch sweep. (osc sine, sweep 0.06, decay 0.25, f0 150, f1 40, amp 0.6, rev 0)" }, { "role": "assistant", "content": "The pitch envelope is what makes it read as a drum, not the oscillator:\n\n```supercollider\n// kick drum: sine os...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n//Version 1\n//P(eace)Bind\n//If error messages could experience Nirvanna, it would sound like this.\n(\n{\nSaw.ar(\n freq: SinOsc.kr([60, 63, 67, 70]).range(440,880),\n mul:LFNoise0.kr(freq: [0.25,1]).range(0,1),\...
[ { "role": "user", "content": "What does `LID.addRecvFunc` do? What arguments does it take?" }, { "role": "assistant", "content": "add a function to the internal FunctionList that will be evaluated whenever element data comes in from an open device. The arguments passed to the function are as def...
[ { "role": "user", "content": "What is `DrawGrid`?" }, { "role": "assistant", "content": "DrawGrid — Draws grid lines on a UserView for plotting" }, { "role": "user", "content": "What does `DrawGrid.draw` do?" }, { "role": "assistant", "content": "This draws to the current...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// as frequency control...\n(\n{\nSinOsc.ar(\n LinCongC.ar(\n 40,\n LFNoise2.kr(0.1, 0.1, 1),\n LFNoise2.kr(0.1, 0.1, 0.1),\n LFNoise2.kr(0.1),\n 0, 500, 600\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 minimal SuperCollider example that uses `LinSelectX`." }, { "role": "assistant", "content": "```supercollider\n(\n{\n var a;\n a = [\n SinOsc.ar,\n Saw.ar(300),\n Pulse.ar(230)\n ];\n\n LinSelectX.ar(MouseX.kr(0, 1) * a.size, a) * 0.2\n}...
[ { "role": "user", "content": "SC can't open or read files?" }, { "role": "assistant", "content": "SuperCollider forum — SC can't open or read files\n\nIt looks as though it’s finally working!\n\nI moved the file to a folder I created in the user support directory for SuperCollider and then chang...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\np = PHS(h, [], 0.15, [ \\midinote, Pkey(\\val) ]).play;\n\n// also:\n// p = PHS(h, [], 0.15, [ \\midinote, Pfunc { |e| e.use { ~val } } ]).play;\n\n// stop allows resuming, cleanup with free or Cmd-. \n\np.stop; // HS sy...
[ { "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": "What does this SuperCollider patch do?\n```supercollider\nPsloth {\n var seed, repeats;\n\n *new { arg seed, repeats=1;\n ^super.newCopyArgs(seed, repeats);\n }\n\n storeArgs{^[seed, repeats]}\n\n embedInStream { arg inval;\n var size=seed.size;\n ...
[ { "role": "user", "content": "Explain `Pgauss` in SuperCollider briefly." }, { "role": "assistant", "content": "Pgauss — random values that follow a Gaussian Distribution This pattern uses the Box-Muller transform to generate a gaussian distribution from uniformly distributed values: `sqrt(-2 * ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{\n var f, sf;\n sf = K2A.ar(MouseX.kr > 0.5) > 0;\n f = Ball.ar(sf, MouseY.kr(0.01, 20, 1), 0.01);\n f = f * 10 + 500;\n SinOsc.ar(f, 0, 0.2)\n}.play;\n```" }, { ...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `SharedIn`." }, { "role": "assistant", "content": "```supercollider\n(\n// only works with the internal server\ns = Server.internal;\ns.boot;\n);\n\n(\nSynthDef(\"help-SharedIn1\", {\n Out.ar(0, SinOsc.ar(Lag.kr(Share...
[ { "role": "user", "content": "What is `PRunningMin` in SuperCollider?" }, { "role": "assistant", "content": "PRunningMin — UGenPatterns quark library Based on RunningMin Category: Streams-Patterns-Events > UGenPatterns > Modifiers." } ]
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// as a frequency control\n{ SinOsc.ar(Lag.ar(LorenzL.ar(MouseX.kr(1, 200)), 3e-3)*800+900)*0.4 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracke...
[ { "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\nb = Buffer.alloc(s,2048,1);\n\n(\nSynthDef(\"help-brick\", { arg out=0, bufnum=0;\n var in, chain;\n in = {WhiteNoise.ar(0.2)}.dup;\n chain = FFT(bufnum, in);\n ch...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// The indices arg might get a pattern which can generate Functions as well as arrays.\n// Start with sufficient number of zeros as lookBack to fill buffer.\n\n(\np = PSloop(\n Pbind(\n \\dur, Pn(Pshuf([1, 1, 2]/6)),\...
[ { "role": "user", "content": "Show another SuperCollider example using `Stethoscope`." }, { "role": "assistant", "content": "```supercollider\ns.boot;\n(\n{\n SinOsc.ar([225, 450, 900], 0, 0.2)\n + LPF.ar(\n LFPulse.ar(226 * [1, 2, 5], [0, 0.1, 0.1], 0.2, 0.2),\n MouseX.kr(20...
[ { "role": "user", "content": "Synth Iteration Help?" }, { "role": "assistant", "content": "SuperCollider forum — Synth Iteration Help\n\n```supercollider\n(\nSynthDef (\\sine_tone) {\narg freq = 440, amp = 1, len = 1, bus = 0;\nvar sig, env;\nenv = Env.step ([ amp ], [ len ]);\nenv = EnvGen.kr (...
[ { "role": "user", "content": "What is `RedMixMono` in SuperCollider?" }, { "role": "assistant", "content": "RedMixMono — mix 2 mono channels in stereo Simple mixer that take two mono sources, combines them and output to one stereo. Category: Red > redMix." } ]
[ { "role": "user", "content": "What does `Dictionary.asSortedArray` do?" }, { "role": "assistant", "content": "Return the values in a sorted array of key value pairs. Sorted by key. `d = Dictionary[\\a -> 5, \\b -> 7, \\c -> 1, \\d ->" } ]
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// Create a new empty collections with size 3:\nx = Array.new(3);\ny = Array.new(3);\nz = List.new(3);\n\n// Try to add 7 items to the array and list.\n// If the array exceeds maxSize, it will only\n// grow to an internal...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// Find/make a dataset of points:\nx = 15.collect{[1.0.rand, 1.0.rand]};\n// Append the index onto the end, for later reference\nx = x.collect{|data, i| data ++ i };\n// Use the KDTree quark and the .makeBufferData method...
[ { "role": "user", "content": "What is `PLseq` in SuperCollider?" }, { "role": "assistant", "content": "PLseq — dynamic scope Pseq variant Takes Symbol args for later reference by the Streams, which will read from variables in the Environments of their instantiation. See PLx_suite. Category: Libr...
[ { "role": "user", "content": "Give me a complete SuperCollider patch for flanger (a SuperCollider snippet): bind everything it needs before it is used." }, { "role": "assistant", "content": "```supercollider\n(\nSynthDef(\"flange\", {arg freq=440, release=0.1;\n var x, sig,out, mod1, depth, mfr...
[ { "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nvar synth = { Out.ar(99, SinOsc.ar([300, 700])) }.play;\n{ In.ar(99, 2) }.plot(0.02, synth);\n```" }, { "role": "assistant", "content": "A closing bracket is missi...
[ { "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{ LinCongC.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": "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": "Explain `Semaphore` in SuperCollider briefly." }, { "role": "assistant", "content": "Semaphore — control parallel execution of threads Category: Scheduling." } ]
[ { "role": "user", "content": "How big are you?" }, { "role": "assistant", "content": "198.42M parameters in total, 63.94M active per token. Eight layers, 768 wide, four experts with top-1 routing, and a 6,400-token vocabulary." } ]
[ { "role": "user", "content": "Explain `ApplicationStart` in SuperCollider briefly." }, { "role": "assistant", "content": "ApplicationStart — register functions to be evaluated on Application start Available in macOS SuperCollider.app only. Category: Control, Platform > macOS." } ]
[ { "role": "user", "content": "Are you ChatGPT?" }, { "role": "assistant", "content": "No. I am sc-mind, a 198M SuperCollider model trained from scratch on the language's own source and documentation. I am not a general assistant and I do not have a general model behind me." } ]
[ { "role": "user", "content": "Write a complete SuperCollider patch built around `Ringz` that runs as it is." }, { "role": "assistant", "content": "```supercollider\na = NodeProxy(s);\na[0] = { |freq = 440, dt=0.1, rate=2| Ringz.ar(Impulse.ar(rate * [1, 1.2]), freq, dt)*0.1 };\na.play;\n(\na[1] =...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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{ RLPF.ar(Saw.ar([100, 250...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `Function`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\nx = { |freq = 440| SinOsc.ar(freq, 0, 0.3) }.play; // this returns a Synth object;\nx.set(\\freq, 880); // note yo...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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.2, 0, 1, doneAction: Done.freeSelf))\n )\n}).add;\n);\n\n(\...
[ { "role": "user", "content": "What is `DemandEnvGen` in SuperCollider?" }, { "role": "assistant", "content": "DemandEnvGen — Demand rate envelope generator Plays back break point envelope contours (levels, times, shapes) given by demand ugens. The next values are called when the next node is rea...
[ { "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": "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": "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{ LPZ2.ar(WhiteNoise.ar(0.25) }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the pa...
[ { "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 this SuperCollider code do?\n```supercollider\ns.boot;\n// Simple polling of median values - you could do this without a UGen!\nx = {|val=1, t_trig=0| MedianTriggered.kr(val, t_trig, 3).poll(t_trig, \"Median of recent 3 values\"); }.play;\nx.set(\\val, 10.rand.postln,...
[ { "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{ HPZ2.ar(WhiteNoise.ar(0.25)) }.play;\n\n// HPZ2 is useful to detect changes in a signal:\n// see also HPZ1\n(\n{\n var changing...
[ { "role": "user", "content": "Give me a Pbind with fm voices and a 0.2 rhythm. (scale minorPentatonic, seq Pshuf, dur 0.2, octave 5, instr fm, root 0)" }, { "role": "assistant", "content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```supercollider\n(\nSy...
[ { "role": "user", "content": "What does `Dictionary.at` do?" }, { "role": "assistant", "content": "Access the value associated with the key. `d = Dictionary[\\robot ->" } ]
[ { "role": "user", "content": "Add gverb to a kick patch at room 0.85." }, { "role": "assistant", "content": "Put the reverb inside the `SynthDef` so it is part of the voice:\n\n```supercollider\n// reverb: gverb on a kick\n(\nSynthDef(\\reverb_synth, { |out = 0, freq = 330, amp = 0.2|\n var e...
[ { "role": "user", "content": "Show me a self-contained SuperCollider patch using `PulseCount`: bind everything it needs first." }, { "role": "assistant", "content": "```supercollider\nSynthDef(\"help-PulseCount\", { |out = 0|\n Out.ar(out,\n SinOsc.ar(\n PulseCount.ar(Impulse.ar(10), Im...
[ { "role": "user", "content": "What does `Dictionary.keysDo` do?" }, { "role": "assistant", "content": "Iterate over the associations, and evaluate the function for each, passing key as argument. `d = Dictionary[\\a -> \"hello\", \\b -> \"robot\", \\c -> [1, 2," } ]
[ { "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": "What does `TextView.selectionStart` do?" }, { "role": "assistant", "content": "The starting position of the selection. If no text is selected this variable represents the cursor Returns: An Integer position within the text, in characters." } ]
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n(\ns.waitForBoot {\n // Open a plotTree window with a refresh rate of 2 seconds:\n s.plotTree(2);\n\n // Define and play a repeating pattern that generates a new synth every 0.5 seconds:\n x = Pn((dur: 0.5, midinote: ...
[ { "role": "user", "content": "What does this SuperCollider patch do?\n```supercollider\n(\n{\nvar trigger, fund, flashInst;\nflashInst = Array.fill(7,\n{\ntrigger = Dust.kr(2)*PinkNoise.ar(1);\nfund = rrand(100, 137);\nPan2.ar(\nMix.ar(\nArray.fill(7,\n{arg counter;\nvar partial;\npartial = counter + 3;\n//...
[ { "role": "user", "content": "Give me a Pbind with sine voices and a 0.3 rhythm." }, { "role": "assistant", "content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nSynthDef(\\sine_pad, { |out = 0, freq = 440, amp = 0.2|\n var env = EnvGen.kr(Env.p...
[ { "role": "user", "content": "What does `StreamKrDur.guiClass` do?" }, { "role": "assistant", "content": "a 'control' rate player that combines a stream of values with a stream of durations and plays them" } ]
[ { "role": "user", "content": "What does `Archive.archiveDir` do?" }, { "role": "assistant", "content": "set or get the directory that the archive is written to. Default:" } ]
[ { "role": "user", "content": "What is `LocalBuf`?" }, { "role": "assistant", "content": "LocalBuf — Allocate a buffer local to the synth" }, { "role": "user", "content": "What does `LocalBuf.newFrom` do?" }, { "role": "assistant", "content": "Allocates a new buffer from a...
[ { "role": "user", "content": "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": "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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n// used to lag pitch\n{\n SinOsc.ar( // sine wave\n Lag2.kr( // lag the modulator\n LFPulse.kr(4, 0, 0.5, 50, 400), // frequency modulator\n Line.kr(0, ...
[ { "role": "user", "content": "What does `Scheduler.queue` do?" }, { "role": "assistant", "content": "schedules functions to be evaluated in the future Returns: The instance of PriorityQueue used internally as scheduling queue." } ]
[ { "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{ BPZ2.ar(WhiteNoise.ar(0.25) }.play;\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the pa...
[ { "role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// allocate buffer\nb = Buffer.alloc(s, 44100, 1);\n\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, WhiteNoise.ar);\n...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `XFade2`." }, { "role": "assistant", "content": "```supercollider\n{ XFade2.ar(Saw.ar, SinOsc.ar, LFTri.kr(0.1)) }.play\n```" } ]
[ { "role": "user", "content": "What does `MultiSliderView.editable` do? What arguments does it take?" }, { "role": "assistant", "content": "Whether the values can be edited using mouse or Arguments: A Boolean.." } ]
[ { "role": "user", "content": "What does `NumberBox.shift_scale` do? What arguments does it take?" }, { "role": "assistant", "content": "The factor by which #-step or #-scroll_step is multiplied when incrementing or decrementing the value using keyboard or mouse while the Shift key is Arguments: ...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{\n EnvGen.kr(\n Env.new([0.001, 1, 0.5, 0], [0.01, 0.3, 1], -4, 2, nil),\n Impulse.kr(10)\n ) * SinOsc.ar(440, 0, 0.1)\n}.play;\n);\n\n(\n{\n EnvGen.kr...
[ { "role": "user", "content": "Write a GrainBuf synth at 20 grains per second. (rate 20, dur 0.15, interp 4, mode sweep, rev 1)" }, { "role": "assistant", "content": "Granulation is `GrainBuf` plus a trigger rate; the position can move:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.w...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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,\n Dust.ar(XLine.kr(200...
[ { "role": "user", "content": "Write a minimal SuperCollider example that uses `Timer`." }, { "role": "assistant", "content": "```supercollider\n// using timer to modulate sine frequency: the slower the trigger is the higher the frequency\n(\n{ var trig;\n trig = Impulse.kr(MouseX.kr(0.5, 20, 1)...
[ { "role": "user", "content": "How current is your SuperCollider knowledge?" }, { "role": "assistant", "content": "It comes from a snapshot of the SuperCollider repository (documentation, class library and examples) plus code I can reason about. So classes and arguments in that snapshot I know we...
[ { "role": "user", "content": "Show another SuperCollider example using `LinCongC`." }, { "role": "assistant", "content": "```supercollider\n// randomly modulate params\n(\n{ LinCongC.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...
[ { "role": "user", "content": "What does `AbstractVector.isOrthogonal` do?" }, { "role": "assistant", "content": "`RealVector[0,0,1,0].isOrthogonal(RealVector[1,0,0,0])`" } ]
[ { "role": "user", "content": "Write an Ndef at 82.5 Hz I can retune while it plays. (ugens saw, cutoff 3200, 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: saw source through a...
[ { "role": "user", "content": "Give me a bell with damping 0.5 on the reverb. (verb gverb, room 0.85, damp 0.5, mix 0.45, source bell)" }, { "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...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// increase feedback\n{ FBSineC.ar(SampleRate.ir, 1, Line.kr(0.01, 4, 10), 1, 0.1) * 0.2 }.play(s;\n```" }, { "role": "assistant", "content": "A closing bracket is mi...
[ { "role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ TwoZero.ar(WhiteNoise.ar(0.125), XLine.kr(20, 20000, 8), 1 }.play\n```" }, { "role": "assistant", "content": "A closing bracket is missing: the parenthesis opened e...
[ { "role": "user", "content": "What does `ScoreClock.new` do? What arguments does it take?" }, { "role": "assistant", "content": "Create a new individual ScoreClock, mainly useful when there is need to run serveral clocks with different Arguments: tmp — Tempo in beats per second.." } ]
[ { "role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n(\np = Pbind(\n \\instrument, \\synth_1a,\n \\preAmp, PL(\\preAmp), \n \\amp, PL(\\amp), \n \\midinote, PLseq(\\seq) + PL(\\seqAdd), \n \\dur, 0.2\n);\n\n~spec = 4.collect { |i| [\\seq, [12*i + 24, 12*i + 48, \\...
[ { "role": "user", "content": "What does `View.absoluteBounds` do?" }, { "role": "assistant", "content": "The basic visible element of GUI Returns: A Rect describing the absolute position and the size of the view on the screen." } ]