conversations listlengths 2 6 |
|---|
[
{
"role": "user",
"content": "What does this SuperCollider code do?\n```supercollider\n// \\b should thus take twice the value of \\a in each event:\np = Pbind(\\a, Pwhite(1, 10, inf), \\b, Pkey(\\a) * 2).asStream;\n\n\np.next(()) // for Pbind, must pass in a default event even if empty\n\n('a': 10, 'b': 2... |
[
{
"role": "user",
"content": "How do I make a piece reproducible instead of a different take every time?"
},
{
"role": "assistant",
"content": "Three things make a SuperCollider piece repeatable: a fixed seed, a fixed tempo, and no live input.\n\n```supercollider\n(\nthisThread.randSeed = 1234;\... |
[
{
"role": "user",
"content": "Write a minimal SuperCollider example that uses `Dust2`."
},
{
"role": "assistant",
"content": "```supercollider\n(\nSynthDef(\"help-Dust2\", { |out = 0|\n Out.ar(out,\n Dust2.ar(200, 0.5)\n )\n}).play;\n);\n\n(\nSynthDef(\"help-Dust2\", { |out = 0|\n Out.ar(o... |
[
{
"role": "user",
"content": "Write a GrainBuf synth at 20 grains per second. (rate 20, dur 0.2, 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(\n... |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ SinOsc.ar(300, 0, 0.5) * SinOsc.kr(2.unipolar * 0.1 }.play;\n```"
},
{
"role": "assistant",
"content": "A closing bracket is missing: the parenthesis opened earlier... |
[
{
"role": "user",
"content": "Explain this SuperCollider code.\n```supercollider\n// every other note of the diatonic cluster: stacked thirds\n(degree: (0..12), amp: [0, 0.1]).play;\n\n// every other note of the semitone cluster: a wholetone cluster again\n(note: (0..12), amp: [0, 0.1]).play;\n\n// every th... |
[
{
"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 `KDRMaskTester.value` do? What arguments does it take?"
},
{
"role": "assistant",
"content": "KeyCodeResponder utility for comparing modifier masks Arguments: view; char; modifier; unicode; keycode."
}
] |
[
{
"role": "user",
"content": "Explain `KeyMode` in SuperCollider briefly."
},
{
"role": "assistant",
"content": "KeyMode — Find best correlated key mode with chromagram between major, minor and chromatic cluster A key mode tracker where output 0 = major, 1 = minor, 2 = chromatic (cluster). Categ... |
[
{
"role": "user",
"content": "What is `LFDNoise3` in SuperCollider?"
},
{
"role": "assistant",
"content": "LFDNoise3 — Dynamic cubic noise Similar to LFNoise2, it generates polynomially interpolated random values at a rate given by the `freq` argument, with 3 differences: Category: UGens > Gener... |
[
{
"role": "user",
"content": "How should I organise a SuperCollider project on disk?"
},
{
"role": "assistant",
"content": "One folder per piece, with a fixed shape:\n\n```text\nmy-piece/\n synthdefs.scd // only SynthDef(...).add, loaded first\n material.scd // buffers, samples, scales\n ... |
[
{
"role": "user",
"content": "What does this SuperCollider code do?\n```supercollider\n// start a noise patch and set the id of the generator\n(\nSynthDef(\"help-RandID\", { |out = 0, id = 1|\n RandID.ir(id);\n Out.ar(out,\n WhiteNoise.ar(0.05) + Dust2.ar(70)\n )\n}).add;\n);\n\n// reset the seed of m... |
[
{
"role": "user",
"content": "What does `UScore.findEmptyRegion` do? What arguments does it take?"
},
{
"role": "assistant",
"content": "(describe method Arguments: startTime — (describe argument here); endTime — (describe argument here); startTrack — (describe argument here); endTrack — (descri... |
[
{
"role": "user",
"content": "Write a minimal SuperCollider example that uses `PV_RectComb`."
},
{
"role": "assistant",
"content": "```supercollider\n(\n{\n var sig, chain;\n sig = WhiteNoise.ar(0.2);\n chain = FFT(LocalBuf(2048), sig);\n chain = PV_RectComb(chain, 8, LFTri.kr(0.097, 0, 0.4,... |
[
{
"role": "user",
"content": "How does multi-channel expansion work?"
},
{
"role": "assistant",
"content": "If any argument of a UGen is an Array, the UGen is built once per element and the results are returned as an Array. So `SinOsc.ar([220, 330, 440])` is three oscillators, and `SinOsc.ar(220... |
[
{
"role": "user",
"content": "What does `View.minSize` do? What arguments does it take?"
},
{
"role": "assistant",
"content": "Set minimum allowed size of the view. The view will not be able to shrink smaller than this size, neither by user interaction nor Arguments: size — A Size.."
}
] |
[
{
"role": "user",
"content": "What does this SuperCollider code do?\n```supercollider\n(\ns = Server.local;\nServer.default = s;\ns.boot;\n);\n \n \n// definition for future reference in arbitrary Environments\n\n(\np = Pbind(\n \\midinote, PLnaryop('+', \\src, [\\dev]),\n \\dur, 0.1\n);\n);\n\n... |
[
{
"role": "user",
"content": "What is `Dictionary`?"
},
{
"role": "assistant",
"content": "Dictionary — associative collection mapping keys to values"
},
{
"role": "user",
"content": "What does `Dictionary.new` do?"
},
{
"role": "assistant",
"content": "Creates a Dictiona... |
[
{
"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": "Write a SuperCollider patch that uses `Scale` and actually plays. Assume nothing about the session."
},
{
"role": "assistant",
"content": "```supercollider\n(\nr = {\n var scale = Scale.choose.postln;\n SinOsc.ar(\n (\n DegreeToKey.kr(\n scale.as(Lo... |
[
{
"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 `Dgeom`."
},
{
"role": "assistant",
"content": "```supercollider\n// example\n\n(\n{\n var a, freq, trig;\n a = Dgeom(1, 1.2, 15);\n trig = Impulse.kr(MouseX.kr(1, 40, 1));\n freq = Demand.kr(trig, 0, a) * 30 + 340... |
[
{
"role": "user",
"content": "What does `EnvelopeView.setThumbSize` do? What arguments does it take?"
},
{
"role": "assistant",
"content": "Sets both width and height of the node at the given index to Arguments: index — An Integer.; size — An Integer.."
}
] |
[
{
"role": "user",
"content": "Write a SuperCollider patch for Server-side sequencing (a SuperCollider snippet) that runs as it is, with nothing assumed about the session."
},
{
"role": "assistant",
"content": "```supercollider\n(\nf = { |f0=200, rate=4|\n {\n var seq = Dseq(f0*[1/2,3/4, Dstu... |
[
{
"role": "user",
"content": "Write a GrainBuf synth at 6 grains per second. (rate 6, 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.... |
[
{
"role": "user",
"content": "What does `Interface.didSpawn` do?"
},
{
"role": "assistant",
"content": "Sets up an environment in which you can build a player, a GUI and responders for midi and keyboard control"
}
] |
[
{
"role": "user",
"content": "Give me a Pbind with pluck voices and a 0.3 rhythm. (scale minorPentatonic, seq Pwalk, dur 0.3, octave 4, instr pluck, 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": "Explain this code:\n```supercollider\n{ LPF.ar(Saw.ar(100), SinOsc.kr(0.5).exprange(200, 2000)) * 0.2 }.play;\n```"
},
{
"role": "assistant",
"content": "A sawtooth through a low-pass filter whose cutoff is swept slowly up and down — a classic filter\nsweep.\n\n- `S... |
[
{
"role": "user",
"content": "What does this SuperCollider code do?\n```supercollider\n(\n//var board= CytonSerial(\"/dev/tty.usbserial-DM00DRM0\", initAction: {|b| b.start});\nvar board= PlaybackData(\"~/Desktop/OpenBCI-RAW-2019-04-10_19-04-26.txt\", initAction: {|b| b.start});\n~board= board;\n);\n\n~boar... |
[
{
"role": "user",
"content": "What does `U.synths` do? What arguments does it take?"
},
{
"role": "assistant",
"content": "(describe method Arguments: synths — (describe argument here). Returns: (returnvalue)"
}
] |
[
{
"role": "user",
"content": "What is `ApplicationStart` in SuperCollider?"
},
{
"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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Out.ar(87, SinOsc.ar(MouseX.kr(340, 1000, 1) * [1, 2, 3], 0, 0.2)) }.play;\nx = Monitor.new.play(87, 3, 0, fadeTime: 3;\nx.stop;\nx.play;\n```"
},
{
"role": "assistant"... |
[
{
"role": "user",
"content": "Explain `Pgbrown` in SuperCollider briefly."
},
{
"role": "assistant",
"content": "Pgbrown — geometric brownian motion pattern Returns a stream that behaves like a geometric brownian motion. Category: Streams-Patterns-Events > Patterns > Random."
}
] |
[
{
"role": "user",
"content": "Write a granular texture, dry. (rate 28, dur 0.1, interp 2, mode noise, rev 0)"
},
{
"role": "assistant",
"content": "Granulation is `GrainBuf` plus a trigger rate; the position can move:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.waitForBoot {\n ... |
[
{
"role": "user",
"content": "Write a self-contained SuperCollider patch for it goes beyond vibrato too. Define every value it uses."
},
{
"role": "assistant",
"content": "```supercollider\n(\nSynthDef(\"vibrato\", {arg freq=440, release=0.1;\n var x, sig,out, mod1, depth, mfreq,maxfreq, maxdep... |
[
{
"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{ FBSineN.ar(\n LFNoise2.kr(1, 1e4, 1e4),\n LFNoise2.kr(1, 32, 33),\n LFNoise2.kr(1, 0.5),\n LFNoise2.kr(1, 0.05, 1.05),\n LFNoise2.kr(1, 0.3... |
[
{
"role": "user",
"content": "What is `Error` in SuperCollider?"
},
{
"role": "assistant",
"content": "Error — superclass of all Errors Error and its subclasses separate different types of error is that can occur in the SuperCollider program into distinct classes, so that they can be reported di... |
[
{
"role": "user",
"content": "Write a minimal SuperCollider example that uses `OneZero`."
},
{
"role": "assistant",
"content": "```supercollider\n{ OneZero.ar(WhiteNoise.ar(0.5), 0.5) }.play\n\n{ OneZero.ar(WhiteNoise.ar(0.5), -0.5) }.play\n\n{ OneZero.ar(WhiteNoise.ar(0.5), Line.kr(-0.5, 0.5, 1... |
[
{
"role": "user",
"content": "Give me a complete SuperCollider patch for Wake up call: bind everything it needs before it is used."
},
{
"role": "assistant",
"content": "```supercollider\nNdef(\\a, { |freq=2000, rate=1, width=0.6|\n LFPulse.kr(rate, 0, 4/6) *\n LFPulse.kr(rate * 6, 0, width) *... |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nSynthDef(\"help-PrintVal\",{PrintVal.kr(SinOsc.kr(440,0,0.1), 100)}).play\n\n\n//two at once\n(\nSynthDef(\"help-PrintVal\",{\n\nPrintVal.kr(SinOsc.kr(440,0,0.1), 100, 1);\n\nPri... |
[
{
"role": "user",
"content": "How do I play a random majorPentatonic scale at octave 5? (scale majorPentatonic, seq Pseq, dur 0.25, octave 5, instr fm, root 0)"
},
{
"role": "assistant",
"content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```supercollid... |
[
{
"role": "user",
"content": "Give me a saw kick with a 0.06 s pitch sweep. (osc saw, sweep 0.06, decay 0.5, f0 180, f1 40, amp 0.8, 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: saw oscill... |
[
{
"role": "user",
"content": "What does `Image.fromWindow` do? What arguments does it take?"
},
{
"role": "assistant",
"content": "Creates a new Image from a portion of a Window. this can be used to capture either a window or a specific View. `// WINDOW Arguments: window — the Window object.; re... |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// ControlSpec-map can also be used to map ugens\n(\nvar spec;\nspec = [100, 18000, \\exp].asSpec;\n{\n var freq, osc;\n osc = SinOsc.kr(0.1).range(0, 1);\n freq = spec.map(os... |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.boot;\n(\nz = { // thru\nBAllPass.ar(\n SoundIn.ar([0, 1]),\n MouseX.kr(10, 18000, \\exponential),\n 0.8, // rq\n 0.5); // mul\n}.play)\nz.release;\n\n(\nz = { // like a ba... |
[
{
"role": "user",
"content": "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": "How do I granulate a sample with 0.07 s grains? (rate 6, dur 0.07, interp 4, mode sweep, rev 0)"
},
{
"role": "assistant",
"content": "Granulation is `GrainBuf` plus a trigger rate; the position can move:\n\n```supercollider\n// granular synth with GrainBuf\n(\ns.wa... |
[
{
"role": "user",
"content": "What are the server's default sample rate and block size?"
},
{
"role": "assistant",
"content": "44100 Hz and 64 samples per block by default, so the control rate is 44100/64 = 689.06 Hz. You can read them from the language with `s.sampleRate` and `s.options.blockSi... |
[
{
"role": "user",
"content": "Write a Pbind whose degrees repeat every Prand cycle. (scale minorPentatonic, seq Prand, dur 0.4, octave 4, instr fm, root 0)"
},
{
"role": "assistant",
"content": "`Pbind` sequences an Event per beat, and `\\degree` + `\\scale` does the pitch:\n\n```supercollider\n... |
[
{
"role": "user",
"content": "Give me an Ndef with an LFO at 0.3 Hz. (ugens saw, cutoff 200, lfo 0.3, 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: saw source through a 200 Hz low-pass\... |
[
{
"role": "user",
"content": "What is `PSrecur` in SuperCollider?"
},
{
"role": "assistant",
"content": "PSrecur — Pattern to generate new values with a recursive Function Category: Libraries > miSCellaneous > PSx stream patterns, Streams-Patterns-Events > PSx stream patterns."
}
] |
[
{
"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": "What does `MKtlElement.valueNoSend` do?"
},
{
"role": "assistant",
"content": "Set the element's deviceValue or value without sending back to the hardware"
}
] |
[
{
"role": "user",
"content": "Write a minimal SuperCollider example that uses `BPZ2`."
},
{
"role": "assistant",
"content": "```supercollider\n// Compare:\n\n{ WhiteNoise.ar(0.25) }.play;\n\n{ BPZ2.ar(WhiteNoise.ar(0.25)) }.play;\n```"
}
] |
[
{
"role": "user",
"content": "Write a SuperCollider patch that uses `QuadN` and actually plays. Assume nothing about the session."
},
{
"role": "assistant",
"content": "```supercollider\n// logistic map\n// equation: x1 = -r*x0^2 + r*x0\n(\n{ var r;\n r = MouseX.kr(3.5441, 4); // stable range\... |
[
{
"role": "user",
"content": "Explain this SuperCollider code.\n```supercollider\n// SynthDefs from Ex. 1a\n\n(\n// Similar to Ex. 1b, but the midinote pattern will cause the stream to generate arrays of two elements,\n// they will be distributed to the indicated synths\n\nr = { |add = 0, int = 7| Pstutter(... |
[
{
"role": "user",
"content": "What does `Env.asStream` do?"
},
{
"role": "assistant",
"content": "Creates a Routine and embeds the Env in it. This allows the Env to function as a"
}
] |
[
{
"role": "user",
"content": "What is `Set`?"
},
{
"role": "assistant",
"content": "Set — a set according to equality"
},
{
"role": "user",
"content": "What does `Set.add` do?"
},
{
"role": "assistant",
"content": "Add an Object to the Set. An object which is equal to an ... |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nNdef(\\x, { SinOsc.ar(Rand(500, 900)) * 0.1 }).play;\nNdef(\\x).copy(\\y);\nNdef(\\y.play;\n```"
},
{
"role": "assistant",
"content": "A closing bracket is missing: t... |
[
{
"role": "user",
"content": "Write a complete SuperCollider patch built around `QuadL` that runs as it is."
},
{
"role": "assistant",
"content": "```supercollider\n// logistic map\n// equation: x1 = -r*x0^2 + r*x0\n(\n{ var r;\n r = MouseX.kr(3.5441, 4); // stable range\n QuadL.ar(SampleRate... |
[
{
"role": "user",
"content": "Show another SuperCollider example using `Paddp`."
},
{
"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.001, sustain), 1, doneActio... |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// hear the difference, LinPan having a slight drop in the middle...\n{ LinPan2.ar(SinOsc.ar(440), Line.kr(-1, 1, 5)) }.play\n\n// ... whereas Pan2 is more smooth\n{ Pan2.ar(SinO... |
[
{
"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": "What does `View.alpha` do? What arguments does it take?"
},
{
"role": "assistant",
"content": "If the view is a window, this controls its Arguments: aFloat — A Float between 0.0 (invisible) and 1.0 (opaque).."
}
] |
[
{
"role": "user",
"content": "What does `ContiguousBlockAllocator.alloc` do?"
},
{
"role": "assistant",
"content": "Return the starting index of a free block that is n slots wide. The default is 1 slot. Note that the returned address is not guaranteed to be the lowest possible address that can s... |
[
{
"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, 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 SinOsc.ar(f, 0, 0.2)\n}... |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{\n var trig = Dust.kr(10);\n SinOsc.ar(\n TBetaRand.kr(300, 3000, 0.1, 0.1, trig)\n ) * 0.1\n}.play;\n);\n\n(\n{\n var trig, prob1, prob2;\n trig = Dust.kr(10);\n pr... |
[
{
"role": "user",
"content": "Show another SuperCollider example using `ControlRate`."
},
{
"role": "assistant",
"content": "```supercollider\n{ SinOsc.ar(ControlRate.ir) * 0.1 }.play;\n```"
}
] |
[
{
"role": "user",
"content": "What is `Pbind`?"
},
{
"role": "assistant",
"content": "Pbind — combine several value patterns to one event stream by binding keys to values"
},
{
"role": "user",
"content": "What does `Pbind.new` do?"
},
{
"role": "assistant",
"content": "Th... |
[
{
"role": "user",
"content": "What does `UScore.stopChains` do? What arguments does it take?"
},
{
"role": "assistant",
"content": "(describe method Arguments: releaseTime — (describe argument here). Returns: (returnvalue)"
}
] |
[
{
"role": "user",
"content": "Explain this SuperCollider patch.\n```supercollider\n//spinning box / cube\n//after Shiffman https://codingtrain.github.io/website-archive/CodingChallenges/112-3d-rendering.html\n\n(\nvar width= 640, height= 480, w,\ntheta= 0, speed= 0.01, box;\n\nw= RedWindow(\"3Dbox\", Rect(1... |
[
{
"role": "user",
"content": "What is a UGen?"
},
{
"role": "assistant",
"content": "A UGen is a unit generator: the primitive signal-processing node of the server. SinOsc, Saw, WhiteNoise, LPF and EnvGen are UGens, and they are wired into a graph inside a SynthDef."
}
] |
[
{
"role": "user",
"content": "I get 'server not running' or nothing happens at all."
},
{
"role": "assistant",
"content": "The server is not booted. In the IDE press Ctrl+B, or evaluate `s.boot`. If code depends on a SynthDef being there, put it inside `s.waitForBoot { ... }`. When a script runs... |
[
{
"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{GlitchBPF.ar(\n ClipNoise.ar(1.dup),\n 0.5,\n SinO... |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ BrownNoise.ar(0.1) }.play;\n{ WhiteNoise.ar(0.1 }.play;\n```"
},
{
"role": "assistant",
"content": "A closing bracket is missing: the parenthesis opened earlier is ... |
[
{
"role": "user",
"content": "Explain `NLFiltC` in SuperCollider briefly."
},
{
"role": "assistant",
"content": "NLFiltC — Non-linear Filter Implements the filter `Y{n} =a Y{n-1} + b Y{n-2} + d Y^2{n-l} + X{n} - c` described in Dobson and sigmoid clipping. This filter is inherently unstable, so ... |
[
{
"role": "user",
"content": "Explain `AbstractPlayer` in SuperCollider briefly."
},
{
"role": "assistant",
"content": "AbstractPlayer — the base class for all Players : a playable object Players are things that can play. The AbstractPlayer interface encapsulates each of the steps to load an obj... |
[
{
"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*Maths2.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": "Write a minimal SuperCollider example that uses `IFFT`."
},
{
"role": "assistant",
"content": "```supercollider\n// without any modification, convert FFT chain (frequency domain signal) back to audio (time domain signal)\n(\n{ var in, chain;\n in = WhiteNoise.a... |
[
{
"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": "How do I put a bell in a reverb at mix 0.3? (verb freeverb, room 0.85, damp 0.5, mix 0.3, source bell)"
},
{
"role": "assistant",
"content": "`FreeVerb` is in the core library; the room and damp arguments do the work:\n\n```supercollider\n// reverb: freeverb on a be... |
[
{
"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": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nfork {\n { SinOsc.ar(440 ! 2) * Line.kr(0, 1, 5, doneAction: Done.freeSelf) }.play.waitForFree;\n { PinkNoise.ar(1) * Line.kr(1, 0, 2, doneAction: Done.freeSelf) }.play.... |
[
{
"role": "user",
"content": "How do I pan notes around the stereo field in a pattern?"
},
{
"role": "assistant",
"content": "Put `\\pan` in the Pbind: the default instrument understands it and passes it to Pan2.\n\n```supercollider\n(\nPbind(\n \\scale, Scale.minorPentatonic,\n \\degree, ... |
[
{
"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 a = [\n SinOsc.ar,\n Saw.ar,\n Pulse.ar\n ];\n TChoose.ar(Dust.ar(MouseX.kr(1, 1000, 1)), a) * 0.2\n\n}.play;\n```"
},
{
"role": "ass... |
[
{
"role": "user",
"content": "What does `FoaDecoderMatrix.newDiametric` do? What arguments does it take?"
},
{
"role": "assistant",
"content": "Gerzon's classic diametric decoder, suitable for varied periphonic and pantophonic loudspeaker arrays. footSee: M. A. Gerzon, \"Practical Periphony: The... |
[
{
"role": "user",
"content": "Write a complete SuperCollider patch built around `NamedControl` that runs as it is."
},
{
"role": "assistant",
"content": "```supercollider\n// compare this:\n(\na = {\n var x, y;\n x = NamedControl.kr(\\freq, 440).lag(3.5);\n y = NamedControl.kr(\\freq, 4... |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nb = Buffer.read(s, ExampleFiles.child);\n\n(\nx = { |rate = 1|\n BufRd.ar(1, b, Phasor.ar(0, BufRateScale.kr(b) * rate, 0, BufFrames.kr(b)))\n}.play;\n```"
},
{
"role": ... |
[
{
"role": "user",
"content": "What does `LID.openDevices` do?"
},
{
"role": "assistant",
"content": "A dictionary of the opened Returns: an IdentityDictionary"
}
] |
[
{
"role": "user",
"content": "Explain this SuperCollider code.\n```supercollider\n// implicitly, the composition operator <> returns a Pchain when applied to a pattern.\n// so that a <> b creates a Pchain (a, b).\n// as seen above, in Pchain(a, b), a specifies (and overrides) b: b is the input to a.\n\n// t... |
[
{
"role": "user",
"content": "What does `SoundFile.writeArray` do? What arguments does it take?"
},
{
"role": "assistant",
"content": "Writes an array (or nested array) to a path as a sound Arguments: array — The data to write. Can be an array of numbers for a mono audio file, or an array of arr... |
[
{
"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": "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{GlitchHPF.ar(\n BrownNoise.ar(1.dup),\n 0.5,\n Saw.kr(1,... |
[
{
"role": "user",
"content": "What does `Collection.asEvent` do?"
},
{
"role": "assistant",
"content": "Answer an Event: with the key value pairs. See"
}
] |
[
{
"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": "What does `TextView.editable` do? What arguments does it take?"
},
{
"role": "assistant",
"content": "Whether the contents of the view are editable, i.e. the text can be typed in and deleted by the Arguments: A Boolean.."
}
] |
[
{
"role": "user",
"content": "Add freeverb2 to a pluck patch at room 0.85."
},
{
"role": "assistant",
"content": "A send-style patch: dry signal plus the reverb on the tail:\n\n```supercollider\n// reverb: freeverb2 on a pluck\n(\nSynthDef(\\reverb_synth, { |out = 0, freq = 330, amp = 0.2|\n ... |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-Dust2\", { |out = 0|\n Out.ar(out,\n Dust2.ar(200, 0.5)\n )\n}).play;\n);\n\n(\nSynthDef(\"help-Dust2\", { |out = 0|\n Out.ar(out,\n Dust2.ar(XLine.kr... |
[
{
"role": "user",
"content": "What is `PV_Div` in SuperCollider?"
},
{
"role": "assistant",
"content": "PV_Div — Complex division Category: UGens > FFT."
}
] |
[
{
"role": "user",
"content": "Show another SuperCollider example using `Symbol`."
},
{
"role": "assistant",
"content": "```supercollider\na = { Ringz.ar(T2A.ar(\\trig.tr), \\freq.kr(500, 1), 0.8) }.play;\na.set(\\freq, 330, \\trig, 1);\na.set(\\freq, 830, \\trig, 1);\na.release;\n```"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.