conversations listlengths 2 6 |
|---|
[
{
"role": "user",
"content": "Give me an Ndef with an LFO at 0.3 Hz. (ugens tri, cutoff 800, lfo 0.3, freq 110, 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 800 Hz low-pass\n(\n... |
[
{
"role": "user",
"content": "What does this SuperCollider patch do?\n```supercollider\n(\n{\n var mod = SinOsc.ar([0.1,0.15,0.2]).range(0,1);\n var saw = LFSaw.ar([10,12,15]);\n var out = (saw - ((saw>0)*mod)+(mod*0.5));\n Splay.ar(out)*0.4;\n}.play;\n\n{\n var mod = SinOsc.ar([0.1,0.15,0.2]).range(0,... |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nSynthDef(\"mini\",{\n Out.ar( 0,\n Instr(\"minimoog.two\").ar( SinOsc.kr(1.0).range(300,500) )\n )\n}).send(s;\n```"
},
{
"role": "assistant",
"content": "A clos... |
[
{
"role": "user",
"content": "Explain this SuperCollider code.\n```supercollider\n// another example\n\n(\n// must have power of two framesize- FFT size will be sorted by Convolution2 to be double this\n// maximum is currently a = 8192 for FFT of size 16384\na = 2048;\n// kernel buffer\ng = Buffer.alloc(s, ... |
[
{
"role": "user",
"content": "Write an Ndef with a tri source and a 400 Hz low-pass. (ugens tri, cutoff 400, lfo 0.1, freq 220, amp 0.12)"
},
{
"role": "assistant",
"content": "`Ndef` is a named proxy you can redefine while it is playing:\n\n```supercollider\n// Ndef drone: tri source through a ... |
[
{
"role": "user",
"content": "Write a kick drum with a 0.5 s decay. (osc fm, sweep 0.06, decay 0.5, 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: fm oscillator, 0.06 s pitch sweep... |
[
{
"role": "user",
"content": "What is `HilbertHIm` in SuperCollider?"
},
{
"role": "assistant",
"content": "HilbertHIm — Applies the Imaginary part of the Hilbert Transform to an input signal. [1] Offers the Hilbert Transform of an input signal via Weaver's Second Method,footWeaver, Donald. “A T... |
[
{
"role": "user",
"content": "What is `Tdef`?"
},
{
"role": "assistant",
"content": "Tdef — task reference definition"
},
{
"role": "user",
"content": "What does `Tdef.all` do?"
},
{
"role": "assistant",
"content": "A global IdentityDictionary with all proxies."
},
{
... |
[
{
"role": "user",
"content": "Write a minimal SuperCollider example that uses `Ndef`."
},
{
"role": "assistant",
"content": "```supercollider\ns.boot;\n\nNdef(\\a).play; // play to hardware output.\nNdef(\\a).fadeTime = 2; // fadeTime specifies crossfade\n// set the source\nNdef(\\a, { SinOsc.ar... |
[
{
"role": "user",
"content": "Give me a Pbind with fm voices and a 0.2 rhythm. (scale majorPentatonic, seq Prand, dur 0.2, octave 6, 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": "Write a Pbind whose degrees repeat every Pshuf cycle. (scale majorPentatonic, seq Pshuf, dur 0.3, octave 4, instr fm, root 0)"
},
{
"role": "assistant",
"content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nSynthDef(\\... |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```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));\n SinOsc.ar(Timer.kr(t... |
[
{
"role": "user",
"content": "Write an Ndef with a saw source and a 400 Hz low-pass."
},
{
"role": "assistant",
"content": "`Ndef` holds the synth and the environment, so you can edit it live:\n\n```supercollider\n// Ndef drone: saw source through a 400 Hz low-pass\n(\nNdef(\\nd_saw_55_400, { |f... |
[
{
"role": "user",
"content": "What does this SuperCollider code do?\n```supercollider\n// Periphonic (3D) encoder, a 1/2 dome of 13 loudspeakers\n// [[0, 0], [45, 0], [90, 0], [135, 0], [-180, 0], [-135, 0], [-90, 0], [-45, 0],\n// [45, 35.3], [135, 35.3], [-135, 35.3], [-45, 35.3], [0, 90]]\n\n~directions... |
[
{
"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": "Explain `BendResponder` in SuperCollider briefly."
},
{
"role": "assistant",
"content": "BendResponder — allow functions to be registered to respond to MIDI pitchbend events Category: External Control > MIDI."
}
] |
[
{
"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 `Dust.ar` do? What arguments does it take?"
},
{
"role": "assistant",
"content": "Random impulses. Arguments: density — Average number of impulses per second.; mul — Output will be multiplied by this value.; add — This value will be added to the output.."
... |
[
{
"role": "user",
"content": "What does this SuperCollider code do?\n```supercollider\n{ Hasher.ar(Line.ar(0, 1, 1), 0.2) }.play;\n\n// Even adding a small amount to the input can result in a very different output. Compare these two examples:\n(\n{\n SinOsc.ar(\n Hasher.kr(MouseX.kr(0, 10).round(1), 300... |
[
{
"role": "user",
"content": "Write a granular texture, through a reverb. (rate 20, dur 0.1, interp 4, mode noise1, 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.waitF... |
[
{
"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": "How do I make this brighter?\n```supercollider\n{ LPF.ar(Saw.ar(110), 400) * 0.2 }.play;\n```"
},
{
"role": "assistant",
"content": "Raise the cutoff. 400 Hz is well below the harmonics that carry brightness, so open it to 2000-4000 Hz:\n\n```supercollider\n{ LPF.ar... |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// default params\n{ QuadL.ar(SampleRate.ir/4) * 0.2 }.play(s;\n```"
},
{
"role": "assistant",
"content": "A closing bracket is missing: the parenthesis opened earlie... |
[
{
"role": "user",
"content": "Show another SuperCollider example using `MIDIFreqPlayer`."
},
{
"role": "assistant",
"content": "```supercollider\n/*\n( // PlayerBinop not yet implemented\n\nPatch(\\monosynth,[\n BeatClockPlayer.new(16) * MIDIGatePlayer.new,\n MIDIFreqPlayer.new,\n CCPlayer(50... |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// record a buffer\nb = { Blip.ar(XLine.kr(10000, 4, 3) * [1, 1.2], 20) * 0.1 }.asBuffer(3, fadeTime: 0.1)\nb.plot; // after 3 seconds, you can see it.\n// play the soundfile bac... |
[
{
"role": "user",
"content": "What does `CountLimit.reset` do?"
},
{
"role": "assistant",
"content": "Counts how many items have been presented to it. returns true until limit false thereafter"
}
] |
[
{
"role": "user",
"content": "Give me a complete SuperCollider patch for seeking an Array!: bind everything it needs before it is used."
},
{
"role": "assistant",
"content": "```supercollider\n(// * //watch the postWindow\na=[\"m\",\"x\",\"f\",\"k\",\"d\",\"p\"];\nx=Array;\ny=x.newClear(6);\n~mx... |
[
{
"role": "user",
"content": "What is Ndef used for?"
},
{
"role": "assistant",
"content": "Ndef is the JITLib node proxy: a named placeholder for a running signal chain that you can redefine while it plays. `Ndef(\\drone, { SinOsc.ar(55) * 0.1 }).play` starts it, and calling Ndef(\\drone, { ...... |
[
{
"role": "user",
"content": "What is `PV_ChainUGen`?"
},
{
"role": "assistant",
"content": "PV_ChainUGen — Base class for UGens that operate on FFT chains"
},
{
"role": "user",
"content": "What does `PV_ChainUGen.fftSize` do?"
},
{
"role": "assistant",
"content": "Return... |
[
{
"role": "user",
"content": "Write an Ndef at 165 Hz I can retune while it plays. (ugens tri, cutoff 3200, lfo 0.8, freq 165, 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 3200 ... |
[
{
"role": "user",
"content": "What are the arguments of PlayBuf.ar?"
},
{
"role": "assistant",
"content": "`PlayBuf.ar(numChannels, bufnum, rate, trigger, startPos, loop)`. numChannels must match what is in the buffer, or you get a channel mismatch; bufnum is the Buffer's integer number; rate is... |
[
{
"role": "user",
"content": "What does `SoundFile.readData` do? What arguments does it take?"
},
{
"role": "assistant",
"content": "Reads the sample data of the file into the raw array you supply. You must have already called #-openRead. When you reach EOF, the array's size will be 0. Checking ... |
[
{
"role": "user",
"content": "Write a SuperCollider patch that uses `BufRd` and actually plays. Assume nothing about the session."
},
{
"role": "assistant",
"content": "```supercollider\nb = Buffer.read(s, ExampleFiles.child);\n\n{ BufRd.ar(1, b, Sweep.ar(Impulse.ar(BufDur.kr(b).reciprocal), Buf... |
[
{
"role": "user",
"content": "What are the arguments of Pan2?"
},
{
"role": "assistant",
"content": "`Pan2.ar(in, pos, level)` — in is the mono signal, pos is -1 (left) to 1 (right) with 0 in the middle, and level scales the output. It is equal-power, so a centred signal is -3 dB per channel rat... |
[
{
"role": "user",
"content": "Give me a granular patch with sweep grain position and interp 4."
},
{
"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 var buf = Buffer.read(s, ... |
[
{
"role": "user",
"content": "What does `Complex.abs` do?"
},
{
"role": "assistant",
"content": "the absolute value of a complex number is its"
}
] |
[
{
"role": "user",
"content": "What does this SuperCollider code do?\n```supercollider\ns.boot;\n// allocate an array of Buffers and fill them with different harmonics\n(\nb = Buffer.allocConsecutive(8, s, 4096, 1, { |buf, i|\n buf.sine1Msg((1 .. ((i + 1) * 6)).reciprocal) // completion messages\n});\n\na =... |
[
{
"role": "user",
"content": "How do I play a random majorPentatonic scale at octave 4? (scale majorPentatonic, seq Pwalk, dur 0.3, 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```superco... |
[
{
"role": "user",
"content": "What is `DigitalIO`?"
},
{
"role": "assistant",
"content": "DigitalIO — Read or write data to a digital pin"
},
{
"role": "user",
"content": "What does `DigitalIO.ar` do?"
},
{
"role": "assistant",
"content": "The output of this UGen is alway... |
[
{
"role": "user",
"content": "Write a minimal SuperCollider example that uses `QuadC`."
},
{
"role": "assistant",
"content": "```supercollider\n// default params\n{ QuadC.ar(SampleRate.ir/4) * 0.2 }.play(s);\n```"
}
] |
[
{
"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": "Write a minimal SuperCollider example that uses `DigitalIO`."
},
{
"role": "assistant",
"content": "```supercollider\n// write a sine oscillator's output to a pin, and read the pin value at other times\n\n(\nSynthDef(\"help-DigitalIO\", { |out = 0|\n DigitalIO.ar... |
[
{
"role": "user",
"content": "Write a GrainBuf synth at 6 grains per second. (rate 6, 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.wai... |
[
{
"role": "user",
"content": "Explain `Array` in SuperCollider briefly."
},
{
"role": "assistant",
"content": "Array — fixed size collection Arrays are ArrayedCollections whose slots may contain any object. Arrays have a fixed maximum size beyond which they cannot grow. For expandable arrays, us... |
[
{
"role": "user",
"content": "Write a self-contained SuperCollider patch that uses `Normalizer`. Define every value it uses."
},
{
"role": "assistant",
"content": "```supercollider\n(\n// example signal to process\n{\n var z;\n z = Decay2.ar(\n Impulse.ar(8, LFSaw.kr(0.25, -0.6, 0.7)),\n ... |
[
{
"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": "Write a minimal SuperCollider example that uses `RHPF`."
},
{
"role": "assistant",
"content": "```supercollider\n{ RHPF.ar(Saw.ar(200, 0.1), FSinOsc.kr(XLine.kr(0.7, 300, 20), 0, 3600, 4000), 0.2) }.play;\n\n(\n{ var ctl = RHPF.kr(LFSaw.kr(2), SinOsc.kr(XLine.kr(0... |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Lorenz2DL.ar(11025, 44100) }.play(s);\n\n// randomly modulate params\n(\n{ Lorenz2DL.ar(\n 11025, 44100,\n LFNoise0.kr(1, 2, 10),\n 20,\n LFNoise0.kr(1, 1.5, 2),\n 0.02\n)... |
[
{
"role": "user",
"content": "What does this SuperCollider code do?\n```supercollider\n//listen to x and y output with defaults\n{Out.ar(0,0.5*SpruceBudworm.ar(0.0))}.play\n\n\n//be careful with rate range, can blow-up easily here, or just not sound\n{Out.ar(0,0.5*SpruceBudworm.ar(0.0,MouseX.kr(0.09,0.1)))}... |
[
{
"role": "user",
"content": "What does `ServerLogGui.showTimes` do?"
},
{
"role": "assistant",
"content": "the interface for display and searching the ServerLog Returns: (returnvalue)"
}
] |
[
{
"role": "user",
"content": "Explain `SimpleController` in SuperCollider briefly."
},
{
"role": "assistant",
"content": "SimpleController — Controller according to the model-view-controller (M-V-C) paradigm SimpleController can be used as a controller according to the model-view-controller (M-V... |
[
{
"role": "user",
"content": "Write a minimal SuperCollider example that uses `Env`."
},
{
"role": "assistant",
"content": "```supercollider\n// an envelope in a synth\n(\n{\n var env = Env([0, 1, 0.5, 1, 0], [0.01, 0.5, 0.02, 0.5]);\n SinOsc.ar(470) * EnvGen.kr(env, doneAction: Done.freeSelf)... |
[
{
"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": "What does `RedBernoulli.ar` do? What arguments does it take?"
},
{
"role": "assistant",
"content": "white noise with Bernoulli distribution Arguments: thresh — Usually a value close to 1.0; mul — Scale the output.; add — Offset the output.."
}
] |
[
{
"role": "user",
"content": "What does `MxUnitApp.channel` do?"
},
{
"role": "assistant",
"content": "the channel object that this unit is Returns: an MxChannelApp"
}
] |
[
{
"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 is `Bus`?"
},
{
"role": "assistant",
"content": "Bus — Representation of a bus on the server"
},
{
"role": "user",
"content": "What does `Bus.control` do?"
},
{
"role": "assistant",
"content": "Allocate a control bus on the server."
},... |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{Decimator.ar(SinOsc.ar([400, 404], 0, 0.2), MouseX.kr(0, 44100), MouseY.kr(0, 31))}.play\n\n{Decimator.ar(SoundIn.ar, MouseX.kr(0, 44100), MouseY.kr(0, 31)}.play\n```"
},
{
... |
[
{
"role": "user",
"content": "Write a SuperCollider patch for number 10 for Quiz 4a. Start by defining the values the patch depends on."
},
{
"role": "assistant",
"content": "```supercollider\n(\n{\n var tri, bpf;\n tri = LFTri.ar(\n freq: [440,340, 513],\n mul: LFPulse.kr(\n freq: ... |
[
{
"role": "user",
"content": "Can you listen to the sound you generate?"
},
{
"role": "assistant",
"content": "No. I am 198M parameters trained on SuperCollider's documentation and class library; I have no audio input and no way to hear a result. What I can do is reason about the code: whether i... |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\np = SFPlayer.new; //shows open file dialog\n\n//specify the file\np = SFPlayer.new(Platform.resourceDir +/+ \"sounds/a11wlk01.wav\";\np.play;\np.stop;\np.gui;\n\n// shows open fi... |
[
{
"role": "user",
"content": "Give me an Ndef with an LFO at 0.1 Hz. (ugens sine, cutoff 400, lfo 0.1, freq 220, amp 0.12)"
},
{
"role": "assistant",
"content": "`Ndef` is a named proxy you can redefine while it is playing:\n\n```supercollider\n// Ndef drone: sine source through a 400 Hz low-pas... |
[
{
"role": "user",
"content": "How do I granulate a sample with 0.15 s grains? (rate 6, dur 0.15, interp 2, 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": "Write a kick drum with a 0.12 s decay. (osc saw, sweep 0.06, decay 0.12, f0 220, f1 40, amp 0.8, 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, ... |
[
{
"role": "user",
"content": "Write a complete SuperCollider patch built around `QuadC` 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 QuadC.ar(SampleRate... |
[
{
"role": "user",
"content": "Write a Pbind whose degrees repeat every Pwalk cycle. (scale majorPentatonic, seq Pwalk, dur 0.2, octave 6, instr pluck, root 0)"
},
{
"role": "assistant",
"content": "The pattern is the composition here; `\\strum` spreads the chord:\n\n```supercollider\n(\nSynthDef... |
[
{
"role": "user",
"content": "Write a kick at amp 0.6 with a click. (osc sine, sweep 0.06, decay 0.12, f0 180, f1 40, 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: sine oscillator,... |
[
{
"role": "user",
"content": "Write a minimal SuperCollider example that uses `Pan2`."
},
{
"role": "assistant",
"content": "```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 mo... |
[
{
"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.vol = 0.3;\nx.stop;\n```"
},
{
"role": "assis... |
[
{
"role": "user",
"content": "Show another SuperCollider example using `Latch`."
},
{
"role": "assistant",
"content": "```supercollider\n{ Blip.ar(LFNoise0.kr(9, 400, 500), 4, 0.2) }.play;\n```"
}
] |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.boot\n\n{Perlin3.ar(Integrator.ar(K2A.ar(MouseX.kr(0, 0.1))), Integrator.ar(K2A.ar(MouseY.kr(0, 0.1))))}.play(s)\n\n{Perlin3.ar(*{Line.ar(0, 1000, 30)}.dup(3))}.plot(1\n```"
... |
[
{
"role": "user",
"content": "Write a minimal SuperCollider example that uses `Lag2`."
},
{
"role": "assistant",
"content": "```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 mod... |
[
{
"role": "user",
"content": "Show another SuperCollider example using `Control`."
},
{
"role": "assistant",
"content": "```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]... |
[
{
"role": "user",
"content": "What does `History.loadStory` do?"
},
{
"role": "assistant",
"content": "read history into current, from a file in story"
}
] |
[
{
"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, 512, 1);\nb.sine1(1.0 / [1, 2, 3, 4], true, true, true);\nx = { Osc.ar(b, 200, 0, 0.5) }.play;\n;\nx.free; b.free;\n```"
},
{
"role": "ass... |
[
{
"role": "user",
"content": "What does `AbstractDispatcher.free` do?"
},
{
"role": "assistant",
"content": "Dispatches incoming messages to Functions"
}
] |
[
{
"role": "user",
"content": "What does this SuperCollider patch do?\n```supercollider\n(\n~resize_enveloppe = { | levels, times |\n var reverted_levels, index;\n index = 0;\n reverted_levels = levels.reverse;\n while( { reverted_levels[index] == 0 && reverted_levels[index+1] == 0 }, { times[ times.size... |
[
{
"role": "user",
"content": "Explain this SuperCollider code.\n```supercollider\n// data sharing between streams of same PmonoPar and streams of second PmonoPar,\n// use of Ptpar ensures that first stream of second PmonoPar comes after first stream of first PmonoPar,\n// consider also PpolyPar for such typ... |
[
{
"role": "user",
"content": "What does this SuperCollider code do?\n```supercollider\n// set() creates a local environment that overrides the outer currentEnvironment\n\nPdefn(\\z).set(\\a, 1, \\b, 5);\n(\nPdefn(\\z, { |e|\n loop { yield((e.a + e.b) + 0.1.rand.round(0.01)) }\n})\n); // [1]\n\nt = Pdefn(\\... |
[
{
"role": "user",
"content": "What does `MIDIFuncSrcMessageMatcher.new` do? What arguments does it take?"
},
{
"role": "assistant",
"content": "Make a new Arguments: srcID — The UID of the MIDI source to test against as an Integer.; func — The Function to evaluate if a match is found.. Returns: ... |
[
{
"role": "user",
"content": "Explain this code:\n```supercollider\nRoutine({ loop { Synth(\\kick); 0.5.wait } }).play;\n```"
},
{
"role": "assistant",
"content": "It starts a kick every half second, forever.\n\nA Routine is a language-side coroutine: `.play` runs it on the clock, and `wait` sus... |
[
{
"role": "user",
"content": "What is `Rest`?"
},
{
"role": "assistant",
"content": "Rest — Represents a rest in event patterns"
},
{
"role": "user",
"content": "What does `Rest.new` do?"
},
{
"role": "assistant",
"content": "Create an instance of Rest, with a value to be... |
[
{
"role": "user",
"content": "Explain `BBCutBlock` in SuperCollider briefly."
},
{
"role": "assistant",
"content": "BBCutBlock — A block of audio in BBCut2 Rendering in BBCut occurs a block at a time. What is a block? You can think of it as a roll where all events share a common buffer starting ... |
[
{
"role": "user",
"content": "Write a self-contained SuperCollider patch that uses `FoldIndex`. Define every value it uses."
},
{
"role": "assistant",
"content": "```supercollider\n// indexing into a table\n(\n{\n var buf = LocalBuf.newFrom([200, 300, 400, 500, 600, 800]);\n var freq = FoldInd... |
[
{
"role": "user",
"content": "How do I structure a live-coding performance in one file?"
},
{
"role": "assistant",
"content": "One Tdef per musical layer, each with its own loop, so you can start and stop layers while the set\nruns.\n\n```supercollider\n(\nTdef(\\kick, {\n loop {\n Syn... |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Trig.ar(Dust.ar(1), 0.2) * FSinOsc.ar(800, 0.5) }.play\n\n{ Trig.ar(Dust.ar(4), 0.1 }.play\n```"
},
{
"role": "assistant",
"content": "A closing bracket is missing:... |
[
{
"role": "user",
"content": "What does `Gate.ar` do? What arguments does it take?"
},
{
"role": "assistant",
"content": "Gate or hold. Arguments: in — The input signal.; trig — Gate - can be any signal. The output is held fixed when this is non-positive.."
}
] |
[
{
"role": "user",
"content": "What is `AbstractSample` in SuperCollider?"
},
{
"role": "assistant",
"content": "AbstractSample — base class for the BufferProxy and Sample classes Category: Libraries > crucial > Buffers > abstract."
}
] |
[
{
"role": "user",
"content": "What is `MultiSliderView` in SuperCollider?"
},
{
"role": "assistant",
"content": "MultiSliderView — A view displaying an array of sliders MultiSliderView displays a collection of values, each represented by the position of one of the sliders placed side by side. Ca... |
[
{
"role": "user",
"content": "Write a complete SuperCollider patch built around `PV_PhaseShift90` that runs as it is."
},
{
"role": "assistant",
"content": "```supercollider\ns.boot;\n\n(\n{ |out = 0, bufnum = 0|\n var in, fft, fft2, shifted;\n in = SinOsc.ar(500, 0, 0.1);\n fft = FFT(LocalBu... |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.boot;\n\n\n\n// create with cueSoundFile class method\nb = Buffer.cueSoundFile(s, ExampleFiles.apollo11, 0, 1);\nx = { DiskIn.ar(1, b) }.play;\nb.close; // must call close in ... |
[
{
"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~mdef =\n{\n |key, func, msgNum, permanent = true|\n\n MIDIdef(key, func ?? { MIDIdef(key).func }, msgNum ? MIDIdef(key).msgNum, MIDIdef(key).chan, MIDIdef(key).msgType, MIDIdef(key).srcID).permanent_(permanent)\n}\n``... |
[
{
"role": "user",
"content": "Write a minimal SuperCollider example that uses `SinOsc`."
},
{
"role": "assistant",
"content": "```supercollider\n// create an audio-rate sine wave at 200 Hz,\n// starting with phase 0 and an amplitude of 0.5\n{ SinOsc.ar(200, 0, 0.5) }.play;\n\n// modulate the fre... |
[
{
"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 `Routine`?"
},
{
"role": "assistant",
"content": "Routine — Functions that can return in the middle and then resume where they left off"
},
{
"role": "user",
"content": "What does `Routine.new` do?"
},
{
"role": "assistant",
"content"... |
[
{
"role": "user",
"content": "Write a minimal SuperCollider example that uses `EnvGen`."
},
{
"role": "assistant",
"content": "```supercollider\n{ PinkNoise.ar(EnvGen.kr(Env.perc, doneAction: Done.freeSelf)) }.play\n```"
}
] |
[
{
"role": "user",
"content": "Show me a self-contained SuperCollider patch using `DiskIn`: bind everything it needs first."
},
{
"role": "assistant",
"content": "```supercollider\ns.boot;\n\n\n\n// create with cueSoundFile class method\nb = Buffer.cueSoundFile(s, ExampleFiles.apollo11, 0, 1);\nx... |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n{ Standard2DC.ar(220, 11025, mul:0.3) }.play(s);\n\n// mouse-controlled param\n{ Standard2DC.ar(8000, 20000, MouseX.kr(0.9,4), mul:0.3) }.play(s);\n\n// as a frequency control\n{... |
[
{
"role": "user",
"content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// use input amplitude to control Pulse amplitude - use headphones to prevent feedback.\n{ Pulse.ar(90, 0.3, Amplitude.kr(SoundIn.ar(0)) }.play;\n```"
},
{
"role": "assis... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.