conversations listlengths 2 6 |
|---|
[
{
"role": "user",
"content": "Write a minimal SuperCollider example that uses `BrownNoise`."
},
{
"role": "assistant",
"content": "```supercollider\n{ BrownNoise.ar(0.1) }.play;\n{ WhiteNoise.ar(0.1) }.play;\n```"
}
] |
[
{
"role": "user",
"content": "Write a SuperCollider patch for Feedback resonator. Start by defining the values the patch depends on."
},
{
"role": "assistant",
"content": "```supercollider\n// Resonator, must subtract blockSize for correct tuning\n(\nSynthDef(\"testRes\", {\n \nvar freq = 300, ... |
[
{
"role": "user",
"content": "Write a minimal SuperCollider example that uses `SortedList`."
},
{
"role": "assistant",
"content": "```supercollider\nt = SortedList.new(8, {|a,b| a.first < b.first });\nt.add([10, \"last\"]);\nt.add([1, \"first\"]);\nt.postln;\n```"
}
] |
[
{
"role": "user",
"content": "What does `ControlPatchOut.synthArg` do?"
},
{
"role": "assistant",
"content": "manages a Player's output when connecting to other Players"
}
] |
[
{
"role": "user",
"content": "What does `SimpleNumber.hash` do?"
},
{
"role": "assistant",
"content": "one-dimensional value Returns: a hash value"
}
] |
[
{
"role": "user",
"content": "What does this SuperCollider code do?\n```supercollider\n(\n// given a simple instrument\nInstr(\\Pulse,{ arg freq=440.0,width=0.5,mul=0.1;\n Pulse.ar( freq, width, mul )\n});\n\n// a patch specifies inputs (arguments) to that instrument\np = Patch( \\Pulse, [ 300, 0.2, 0.1 ])... |
[
{
"role": "user",
"content": "Show me a self-contained SuperCollider patch using `BufSampleRate`: bind everything it needs first."
},
{
"role": "assistant",
"content": "```supercollider\nb = Buffer.read(s, ExampleFiles.child);\n\n// compares a 1102.5 Hz sine tone (11025 * 0.1, left) with a 1100 ... |
[
{
"role": "user",
"content": "What does this SuperCollider code do?\n```supercollider\n// define two Pbinds of same length, play first\n\n// data sharing with rhythms of coinciding entry points is sure as streams are time-shifted\n\n(\np = PmonoPar([\n [\n \\dur, Prand([1, 1, 2]/3, inf).collect(~dur = _... |
[
{
"role": "user",
"content": "What does `Mx.prMakeUnit` do? What arguments does it take?"
},
{
"role": "assistant",
"content": "A mixer and dynamic patching Arguments: object. Returns: MxUnit"
}
] |
[
{
"role": "user",
"content": "Explain `Signal` in SuperCollider briefly."
},
{
"role": "assistant",
"content": "Signal — Sampled audio buffer A Signal is a FloatArray that represents a sampled function of time buffer. Signals support math operations. Category: Collections > Ordered."
}
] |
[
{
"role": "user",
"content": "What is `Int32Array` in SuperCollider?"
},
{
"role": "assistant",
"content": "Int32Array — an array whose indexed slots are all of the same type These classes implement arrays whose indexed slots are all of the same type. Category: Collections > Ordered."
}
] |
[
{
"role": "user",
"content": "What does `InstrBrowser.new` do? What arguments does it take?"
},
{
"role": "assistant",
"content": "Browse your instrument library, with customizable actions Arguments: toolbarFunc; topBarFunc; showUGenInstr."
}
] |
[
{
"role": "user",
"content": "What does this SuperCollider code do?\n```supercollider\n// We'll hear the sawtooth wave when the two sine oscillators are both in the region x = 0.0 to 0.5, y = 0.5 to 1.0\n(\n{\n InRect.ar(\n SinOsc.ar(1), SinOsc.ar(1.3), Rect(0, 0.5, 0.5, 0.5)\n ) * LFSaw.ar(44, 0, 0.1)... |
[
{
"role": "user",
"content": "What is `Knob` in SuperCollider?"
},
{
"role": "assistant",
"content": "Knob — A rotary controller view Knob displays a value from 0.0 to 1.0 in rotary fashion, and allows to control it with either circular or linear mouse motion. Category: GUI > Views."
}
] |
[
{
"role": "user",
"content": "How do I play a random majorPentatonic scale at octave 5? (scale majorPentatonic, seq Pseq, 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```supercoll... |
[
{
"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": "Write a SuperCollider patch for Very quick-and-dirty hack to show stereo phase. Start by defining the values the patch depends on."
},
{
"role": "assistant",
"content": "```supercollider\n(\nb = Bus.audio(s, 2);\na = { |inbus = 0|\n var sig = In.ar(inbus, 2);\n //... |
[
{
"role": "user",
"content": "Show another SuperCollider example using `List`."
},
{
"role": "assistant",
"content": "```supercollider\n(\n// Create a new empty List with size: 3\nx = List.new(3);\n\nx.postln; // -> List[ ]\n\n// Add numbers 0 to 4 to the List\n5.do({ |i| x.add(i) });\n\n// The ... |
[
{
"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": "Write a bell in SuperCollider."
},
{
"role": "assistant",
"content": "A bell is a set of inharmonic partials with a long percussive decay. The ratios below are the\nclassic bell ones; the envelope frees the Synth when it ends.\n\n```supercollider\n(\nSynthDef(\\bell... |
[
{
"role": "user",
"content": "What does this SuperCollider patch do?\n```supercollider\n(\n\n ~needed_interval = 20;\n\n ~funk = {\n\n // if last time isn't defined, create it with 1000 seconds ago time\n if( ~last_time.isNil ) {\n ~last_time = Date.getDate.bootSeconds;\n ~last_time = ~last_time -... |
[
{
"role": "user",
"content": "What is `FloatArray` in SuperCollider?"
},
{
"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": "Show another SuperCollider example using `FBSineN`."
},
{
"role": "assistant",
"content": "```supercollider\n// increase feedback\n{ FBSineN.ar(SampleRate.ir, 1, Line.kr(0.01, 4, 10), 1, 0.1) * 0.2 }.play(s);\n```"
}
] |
[
{
"role": "user",
"content": "Write a minimal SuperCollider example that uses `ProxySpace`."
},
{
"role": "assistant",
"content": "```supercollider\ns.boot;\n\np = ProxySpace.new;\np.fadeTime = 2; // fadeTime specifies crossfade\np[\\out].play; // monitor an empty placeholder through hardware ou... |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.boot;\n\n{ Mix.new([PinkNoise.ar(0.1), FSinOsc.ar(801, 0.1), LFSaw.ar(40, 0.1)]) }.play\n\n(\nplay({\n Mix.new(Array.fill(8, { SinOsc.ar(500 + 500.0.rand, 0, 0.05) }));\n}))\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*Maths.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 is... |
[
{
"role": "user",
"content": "How do I granulate a sample with 0.07 s grains? (rate 10, dur 0.07, interp 4, 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": "Explain `GravityGrid2` in SuperCollider briefly."
},
{
"role": "assistant",
"content": "GravityGrid2 — dynamical system simulation (Newtonian gravitational force) Fixed masses apply Newtonian gravitational force dynamics to a central moving mass which cannot escape ... |
[
{
"role": "user",
"content": "Write a complete SuperCollider patch built around `SyncSaw` that runs as it is."
},
{
"role": "assistant",
"content": "```supercollider\ns.boot;\n(\n// send a synth def to server\nSynthDef(\"tpulse\", { arg out=0,freq=700,sawFreq=440.0;\n Out.ar(out, SyncSaw.ar(fre... |
[
{
"role": "user",
"content": "Give me an Ndef with an LFO at 0.8 Hz. (ugens blip, cutoff 400, lfo 0.8, 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: blip source through a 400 Hz... |
[
{
"role": "user",
"content": "Write a complete SuperCollider patch built around `TIRand` that runs as it is."
},
{
"role": "assistant",
"content": "```supercollider\n(\nSynthDef(\"help-TIRand\", {\n var trig, outBus;\n trig = Dust.kr(10);\n outBus = TIRand.kr(0, 1, trig); // play on random ch... |
[
{
"role": "user",
"content": "How do I build a live drone with Ndef at 55 Hz?"
},
{
"role": "assistant",
"content": "Use `Ndef` when the patch has to change without stopping:\n\n```supercollider\n// Ndef drone: blip source through a 3200 Hz low-pass\n(\nNdef(\\nd_blip_55_3200, { |freq = 55, amp ... |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// increase feedback\n{ FBSineN.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": "Explain `BBCut2` in SuperCollider briefly."
},
{
"role": "assistant",
"content": "BBCut2 — splices and reassembles audio This help file is for the BBCut2 class. For an overview of the BBCut2 library, see BBCut . Category: Libraries > BBCut > Core."
}
] |
[
{
"role": "user",
"content": "Write a filter sweep over a saw."
},
{
"role": "assistant",
"content": "An LFO on the cutoff of a resonant low-pass; XLine or an LFO both work, the LFO is the loopable one.\n\n```supercollider\n{ LPF.ar(Saw.ar([60, 60.2]), SinOsc.kr(0.2).exprange(150, 4000), 0.4) * ... |
[
{
"role": "user",
"content": "Show another SuperCollider example using `LinCongN`."
},
{
"role": "assistant",
"content": "```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... |
[
{
"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": "Write a minimal SuperCollider example that uses `FOS`."
},
{
"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, x)\n}.play;\n);\n\n(\n// same as OneZero\... |
[
{
"role": "user",
"content": "What is `BufRateScale` in SuperCollider?"
},
{
"role": "assistant",
"content": "BufRateScale — Buffer rate scaling in respect to server samplerate. Returns a ratio by which the playback of a soundfile is to be scaled. Category: UGens > Buffer > Info."
}
] |
[
{
"role": "user",
"content": "Write a self-contained SuperCollider patch that uses `ControlSpec`. Define every value it uses."
},
{
"role": "assistant",
"content": "```supercollider\n// ControlSpec-map can also be used to map ugens\n(\nvar spec;\nspec = [100, 18000, \\exp].asSpec;\n{\n var freq... |
[
{
"role": "user",
"content": "What does this SuperCollider code do?\n```supercollider\n// When we provide the 'root' argument an array, we should hear a chord.\n// the synth def is defined above\n(\nPbind(\n \\instrument, \\acid, \\dur, Pseq([0.25, 0.5, 0.25], inf),\n \\root, [-24, -17], // expand root\n ... |
[
{
"role": "user",
"content": "Write a minimal SuperCollider example that uses `In`."
},
{
"role": "assistant",
"content": "```supercollider\ns.boot;\n\n(\nSynthDef(\"help-PinkNoise\", { |out = 0|\n Out.ar(out, PinkNoise.ar(0.1))\n}).add;\n\nSynthDef(\"help-In\", { |out = 0, in = 0|\n var input... |
[
{
"role": "user",
"content": "Show another SuperCollider example using `StandardN`."
},
{
"role": "assistant",
"content": "```supercollider\n// mouse-controlled param\n{ StandardN.ar(SampleRate.ir/2, MouseX.kr(0.9, 4)) * 0.3 }.play(s);\n```"
}
] |
[
{
"role": "user",
"content": "What does `MxApp.commit` do?"
},
{
"role": "assistant",
"content": "Internal usage: commits all changes, updates the Mx (which sends changes to the server) and sends .changed to the Mx which updates all Returns: this"
}
] |
[
{
"role": "user",
"content": "Write a kick at amp 0.8 with no click. (osc sine, sweep 0.06, decay 0.12, f0 150, f1 48, 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": "Give me a sine kick with a 0.06 s pitch sweep. (osc sine, sweep 0.06, decay 0.5, f0 180, f1 48, 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 ... |
[
{
"role": "user",
"content": "How do I build a live drone with Ndef at 55 Hz? (ugens blip, cutoff 1400, lfo 0.8, freq 55, amp 0.12)"
},
{
"role": "assistant",
"content": "`Ndef` is a named proxy you can redefine while it is playing:\n\n```supercollider\n// Ndef drone: blip source through a 1400 ... |
[
{
"role": "user",
"content": "Write a minimal SuperCollider example that uses `Diwhite`."
},
{
"role": "assistant",
"content": "```supercollider\n(\n{\n var a, freq, trig;\n a = Diwhite(0, 15, inf);\n trig = Impulse.kr(MouseX.kr(1, 40, 1));\n freq = Demand.kr(trig, 0, a) * 30 + 340;\n SinOs... |
[
{
"role": "user",
"content": "Write a kick drum with a 0.25 s decay. (osc saw, sweep 0.06, decay 0.25, f0 180, f1 48, amp 0.8, rev 0)"
},
{
"role": "assistant",
"content": "A kick is a sine with a fast pitch drop and a short amplitude envelope:\n\n```supercollider\n// kick drum: saw oscillator, ... |
[
{
"role": "user",
"content": "Show me a self-contained SuperCollider patch using `RecordBuf`: bind everything it needs first."
},
{
"role": "assistant",
"content": "```supercollider\nb = Buffer.alloc(s, s.sampleRate * 5, 1); // a 5 second 1 channel Buffer\n\n// record for four seconds\n(\nx = Sy... |
[
{
"role": "user",
"content": "Explain this SuperCollider patch.\n```supercollider\n// for the members of the cult of q\n// who don't want to ~tilde\n\n\n//-- INIT\nq = q ? ();\n\nq.local = currentEnvironment;\n\nq.local.pattern = Pbind(\\note, Pbrown(0, { 17.rand + 1 } ! 12), \\dur, 0.05, \\amp, 0.01);\n\n\... |
[
{
"role": "user",
"content": "Give me a Pbind with sine voices and a 0.25 rhythm. (scale majorPentatonic, seq Pshuf, dur 0.25, octave 5, instr sine, root 0)"
},
{
"role": "assistant",
"content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nSynthDef(\... |
[
{
"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 `TextField.action` do?"
},
{
"role": "assistant",
"content": "The action object evaluated whenever the user changes the"
}
] |
[
{
"role": "user",
"content": "Write a minimal SuperCollider example that uses `StandardL`."
},
{
"role": "assistant",
"content": "```supercollider\n// vary frequency\n{ StandardL.ar(MouseX.kr(20, SampleRate.ir)) * 0.3 }.play(s);\n```"
}
] |
[
{
"role": "user",
"content": "Give me a bell with damping 0.5 on the reverb. (verb freeverb, room 0.5, damp 0.5, mix 0.45, source bell)"
},
{
"role": "assistant",
"content": "Put the reverb inside the `SynthDef` so it is part of the voice:\n\n```supercollider\n// reverb: freeverb on a bell\n(\nS... |
[
{
"role": "user",
"content": "What is `Foa` in SuperCollider?"
},
{
"role": "assistant",
"content": "Foa — First Order Ambisonic (FOA) UGen superclass UGen superclass from the Ambisonic Toolkit (ATK) Category: Libraries > Ambisonic Toolkit > UGens > Internals > FOA."
}
] |
[
{
"role": "user",
"content": "Write a minimal SuperCollider example that uses `NamedControl`."
},
{
"role": "assistant",
"content": "```supercollider\n// use NamedControl to create a number of multichannel controls:\n\na = { SinOsc.ar(NamedControl.kr(\\freq, [300, 330, 370], [1, 0.3, 0.02])).sum... |
[
{
"role": "user",
"content": "What is `Pdef`?"
},
{
"role": "assistant",
"content": "Pdef — stream reference definition"
},
{
"role": "user",
"content": "What does `Pdef.all` do?"
},
{
"role": "assistant",
"content": "A global IdentityDictionary with all proxies."
},
... |
[
{
"role": "user",
"content": "Explain `TextView` in SuperCollider briefly."
},
{
"role": "assistant",
"content": "TextView — A view displaying editable formatted text TextView consists of an area where multi-line text can be typed in and edited. Category: GUI > Views."
}
] |
[
{
"role": "user",
"content": "What does `FlowLayout.shift` do?"
},
{
"role": "assistant",
"content": "Set the current left and top indentation (see"
}
] |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n//code that utilizes the glitch.\n//warning! extremely loud.\n//note: might not sound the same on all soundcards\n(\n{GlitchRHPF.ar(\n BrownNoise.ar(1.dup),\n 0.5,\n Saw.kr(1... |
[
{
"role": "user",
"content": "Write a complete SuperCollider patch built around `Pan2` that runs as it is."
},
{
"role": "assistant",
"content": "```supercollider\n(\ns.bind {\n SynthDef(\"tpulse2\", { arg out=0, freq=700, sawFreq=440.0;\n Out.ar(out, Pan2.ar(SyncSaw.ar(freq, sawFreq, 0.1),... |
[
{
"role": "user",
"content": "What does `ObjectInsp.registerHook` do? What arguments does it take?"
},
{
"role": "assistant",
"content": "displays all the variables and internals of an object for debugging purposes Arguments: class; displayFunction; includeSubclasses. Returns: (returnvalue)"
}... |
[
{
"role": "user",
"content": "What does `Platform.formatPathForCmdLine` do? What arguments does it take?"
},
{
"role": "assistant",
"content": "handle cross-platform differencies Arguments: path — A path string.. Returns: The input string formatted as a command-line argument. On Windows this met... |
[
{
"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": "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 `TwoPole`."
},
{
"role": "assistant",
"content": "```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(White... |
[
{
"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": "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{ 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": "Show another SuperCollider example using `BusPlug`."
},
{
"role": "assistant",
"content": "```supercollider\nb = BusPlug.new;\n{ Blip.ar(b + 5) }.play;\nb.bus.set(12);\n```"
}
] |
[
{
"role": "user",
"content": "Explain `VMScan2D` in SuperCollider briefly."
},
{
"role": "assistant",
"content": "VMScan2D — 2D scanning pattern virtual machine Converts a buffer of virtual machine instructions into the synthesis of a 2D path. Category: UGens > Buffer //SLUGens released under th... |
[
{
"role": "user",
"content": "Explain `RedAbstractModule` in SuperCollider briefly."
},
{
"role": "assistant",
"content": "RedAbstractModule — abstract class Category: Red > redModule."
}
] |
[
{
"role": "user",
"content": "How do I build a live drone with Ndef at 110 Hz? (ugens blip, cutoff 800, lfo 0.8, freq 110, amp 0.12)"
},
{
"role": "assistant",
"content": "`Ndef` is a named proxy you can redefine while it is playing:\n\n```supercollider\n// Ndef drone: blip source through a 800 ... |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nSynthDef(\"help-PulseDivider\", { |out = 0|\n var p, a, b;\n p = Impulse.ar(8);\n a = SinOsc.ar(1200, 0, Decay2.ar(p, 0.005, 0.1));\n b = SinOsc.ar(600, 0, Decay2.ar(PulseDiv... |
[
{
"role": "user",
"content": "What does this SuperCollider code do?\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\nq = Pbindf(p, \\midinote, PLseq(\\seq));\n\nv = VarG... |
[
{
"role": "user",
"content": "What does `MKtl.name` do?"
},
{
"role": "assistant",
"content": "get and set the name (a Symbol) of the MKtl. This also changes the name under which the MKtl is stored in Mktl.all. `MKtl(\\test,"
}
] |
[
{
"role": "user",
"content": "Write a minimal SuperCollider example that uses `PeakFollower`."
},
{
"role": "assistant",
"content": "```supercollider\ns.boot;\n\n// no decay\n(\n{\n SinOsc.ar(\n PeakFollower.ar(Dust.ar(20, Line.kr(0, 1, 4)), 1.0) * 1500 + 200,\n 0, 0.2\n )\n\n}.play;... |
[
{
"role": "user",
"content": "What does `UGen.varlag` do?"
},
{
"role": "assistant",
"content": "Wraps the receiver in a VarLag UGen, smoothing its output by `time`"
}
] |
[
{
"role": "user",
"content": "Write a self-contained SuperCollider patch that uses `ControlSpec`. Define every value it uses."
},
{
"role": "assistant",
"content": "```supercollider\n// ControlSpec-map can also be used to map ugens\n(\nvar spec;\nspec = [100, 18000, \\exp].asSpec;\n{\n var freq... |
[
{
"role": "user",
"content": "Write a kick at amp 0.6 with a click. (osc saw, sweep 0.06, decay 0.35, f0 220, f1 55, amp 0.6, rev 1)"
},
{
"role": "assistant",
"content": "A kick is a sine with a fast pitch drop and a short amplitude envelope:\n\n```supercollider\n// kick drum: saw oscillator, 0... |
[
{
"role": "user",
"content": "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": "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": "What does `Patch.synthDef` do?"
},
{
"role": "assistant",
"content": "Pairs an Instr with inputs that that will be passed to the Instr"
}
] |
[
{
"role": "user",
"content": "Write a minimal SuperCollider example that uses `MultiTap`."
},
{
"role": "assistant",
"content": "```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, PinkNoi... |
[
{
"role": "user",
"content": "Write an Ndef at 220 Hz I can retune while it plays. (ugens saw, cutoff 2400, lfo 0.8, freq 220, 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 thro... |
[
{
"role": "user",
"content": "Show me a self-contained SuperCollider patch using `Stethoscope`: bind everything it needs first."
},
{
"role": "assistant",
"content": "```supercollider\n(\n{\n var f = { |l,h| SinOsc.kr(0.1, {pi.rand}).range(l, h) } ;\n Pulse.ar({ f.(20, 1000) }!6, { f.(0.0, 1) ... |
[
{
"role": "user",
"content": "How do I put a pluck in a reverb at mix 0.45? (verb freeverb, room 0.85, damp 0.5, mix 0.45, source pluck)"
},
{
"role": "assistant",
"content": "`FreeVerb` is in the core library; the room and damp arguments do the work:\n\n```supercollider\n// reverb: freeverb on ... |
[
{
"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 an Ndef with a saw source and a 1400 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 1400 Hz low-pass\n(\nNdef(\\nd_saw_82_1400, { |freq ... |
[
{
"role": "user",
"content": "Write an Ndef with a saw source and a 200 Hz low-pass. (ugens saw, cutoff 200, 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: saw source through a 200... |
[
{
"role": "user",
"content": "Write a kick drum with a 0.12 s decay. (osc saw, sweep 0.06, decay 0.12, f0 220, f1 55, amp 0.6, rev 1)"
},
{
"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": "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": "Why does every UGen have mul and add arguments?"
},
{
"role": "assistant",
"content": "They are a convenience applied to the UGen's output: the result is `ugens_result * mul + add`. So `SinOsc.ar(440, 0, 0.2)` is the same as `SinOsc.ar(440) * 0.2`, and `SinOsc.ar(44... |
[
{
"role": "user",
"content": "What does `NodeProxy.asCode` do?"
},
{
"role": "assistant",
"content": "stores the proxy as executable code. see also JITLib/jitlib_asCompileString for more examples. `//"
}
] |
[
{
"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": "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 is `Node`?"
},
{
"role": "assistant",
"content": "Node — Abstract superclass of Synth and Group"
},
{
"role": "user",
"content": "What does `Node.free` do?"
},
{
"role": "assistant",
"content": "Stop this Node and free it from its parent... |
[
{
"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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.