Datasets:
v0.1.2: full profile
Browse filesFiles changed (7)
20 unmodified lines212223242526276 unmodified lines34353637383940414220 unmodified linescorpus, a supervised fine-tuning set whose code answers were compiled with `sclang`, and the manifeststhat make both checkable.Profile: **full** · visibility: **private** · revision `v0.1.1` · repo `vecnode/supercollider-moe-dataset` · 10 files, 72.1 MB> **Licence warning.** This build includes text derived from sccode.org, which states no> licence, and from scsynth.org, whose posts belong to their authors. It is published as6 unmodified lines|---|---|---|---|| `data/pretrain/train.jsonl` | 59,179 | 58.2 MB | `8454ed97da318f4d…` || `data/pretrain/val.jsonl` | 1,235 | 1.2 MB | `01c2d5fc0542d3a0…` || `data/sft/train.jsonl` | 6,000 | 4.4 MB | `d10cc71a4c9ef2f7…` || `data/sft/val.jsonl` | 215 | 0.1 MB | `d21af4f17525e30d…` || `data/sft/pool.jsonl` | 14,398 | 8.2 MB | `910fe8bdcd7a8de3…` || `data/sft/teacher.jsonl` | 94 | 0.1 MB | `74e4af14a1f151ef…` |`data/pretrain/train.jsonl` lines are exactly `{"text": …}`; `data/sft/train.jsonl` lines are exactly20 unmodified lines212223242526276 unmodified lines34353637383940414220 unmodified linescorpus, a supervised fine-tuning set whose code answers were compiled with `sclang`, and the manifeststhat make both checkable.Profile: **full** · visibility: **private** · revision `v0.1.2` · repo `vecnode/supercollider-moe-dataset` · 10 files, 70.5 MB> **Licence warning.** This build includes text derived from sccode.org, which states no> licence, and from scsynth.org, whose posts belong to their authors. It is published as6 unmodified lines|---|---|---|---|| `data/pretrain/train.jsonl` | 59,179 | 58.2 MB | `8454ed97da318f4d…` || `data/pretrain/val.jsonl` | 1,235 | 1.2 MB | `01c2d5fc0542d3a0…` || `data/sft/train.jsonl` | 6,000 | 4.0 MB | `f5d4c5831c44e1c1…` || `data/sft/val.jsonl` | 201 | 0.1 MB | `2036bf01c619da65…` || `data/sft/pool.jsonl` | 13,412 | 7.0 MB | `e138717619f49780…` || `data/sft/teacher.jsonl` | 94 | 0.1 MB | `74e4af14a1f151ef…` |`data/pretrain/train.jsonl` lines are exactly `{"text": …}`; `data/sft/train.jsonl` lines are exactly
123456789108454ed97da318f4de2c331bd195827b92e8c25ae5848211d89063513b7d50e0d data/pretrain/train.jsonl01c2d5fc0542d3a0d015e8d4403f612edfcee9cf0050dad195f009a7882f9928 data/pretrain/val.jsonl910fe8bdcd7a8de33ba9df18e9272fee08f0d1d92c3a52ae8555caac7200009c data/sft/pool.jsonl74e4af14a1f151ef9de1094eb2364f5bd5eb8377b9fbb8a6474b49fd69cf54d1 data/sft/teacher.jsonld10cc71a4c9ef2f75842e5ec968e98e1445463efc01c473697342b77b22de970 data/sft/train.jsonld21af4f17525e30df594debab4d630e80bd7fef28a7a69f568e96d16de518581 data/sft/val.jsonle48310f6d2062b4b6c7d2d12e5285ec14deb84e9d4339325879e746c3e0a4403 LICENCES.mdde92d20b5bd404834e1343e5bf60497e4d29cacd7c60367f2e0c97e7810a7c89 SCHEMA.mdc919aee58ff90d7c331907e71eaedafe653000aecb2c6f4d0a9e2e0eccfd9da1 stats.json632070786629a761d04467f5f52bbd83d94afc3f9076e15f007e94226b9ddce7 verify_report.md123456789108454ed97da318f4de2c331bd195827b92e8c25ae5848211d89063513b7d50e0d data/pretrain/train.jsonl01c2d5fc0542d3a0d015e8d4403f612edfcee9cf0050dad195f009a7882f9928 data/pretrain/val.jsonle138717619f49780c81be0a83dfffef3744347ae5a88b0880b1e8dc833a762d1 data/sft/pool.jsonl74e4af14a1f151ef9de1094eb2364f5bd5eb8377b9fbb8a6474b49fd69cf54d1 data/sft/teacher.jsonlf5d4c5831c44e1c1be3a255fa1e8a51780933c93f117a983147e243e593ac305 data/sft/train.jsonl2036bf01c619da65bd0cd66be28507b05d2057965456ea4259b36b2be396af95 data/sft/val.jsonle48310f6d2062b4b6c7d2d12e5285ec14deb84e9d4339325879e746c3e0a4403 LICENCES.mdde92d20b5bd404834e1343e5bf60497e4d29cacd7c60367f2e0c97e7810a7c89 SCHEMA.mdc3bd07c50b05a13786cd936522afde5e46ab8aebd70d1ac6d59ed371b0bcf48f stats.jsonac93de78005e00897c935a8141c24d6a9531492e07d1eda6094ba224c7d48043 verify_report.md
183 unmodified lines184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213183 unmodified lines{"conversations": [{"role": "user", "content": "What does `SpecCentroid.kr` do? What arguments does it take?"}, {"role": "assistant", "content": "Spectral centroid Arguments: buffer — an FFT chain.."}]}{"conversations": [{"role": "user", "content": "What does `TGrains.ar` do? What arguments does it take?"}, {"role": "assistant", "content": "Buffer granulator. Arguments: numChannels — The number of output channels. Must be a nonzero, positive integer. This is fixed when the SynthDef is compiled so cannot be assigned to a SynthDef argument.; trigger — At each trigger, the following arguments are sampled and used as the arguments of a new grain. A trigger occurs when a signal changes from non-positive to a positive value. If the trigger is audio rate then the grains will start with sample accuracy.; bufnum — The index of the buffer to use. It must be a one channel (mono) buffer.; rate — 1.0 is normal, 2.0 is one octave up, 0.5 is one octave down -1.0 is backward normal rate… etc.; centerPos — The position in the buffer in seconds at which the grain envelope will reach maximum amplitude.; dur — Duration of the grain in seconds.; pan — determines where to pan the output.; amp — Amplitude of the grain.."}]}{"conversations": [{"role": "user", "content": "What does `ZeroCrossing.ar` do? What arguments does it take?"}, {"role": "assistant", "content": "Zero crossing frequency follower Arguments: in — Input signal.."}]}{"conversations": [{"role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\nb = BBCutBuffer(Platform.resourceDir +/+ \"sound/break.aiff\", 8);\n\n//defaults\nBBCut2(CutBuf3(),StatBalProc()).play(2.4);\n\n\n( //defaults\nBBCut2(CutBuf3(b),StatBalProc(\n StatBalStream([0.5,1.5],[0.3,0.7],0.02), //almost a deterministic swap in proportions 3:7\n StatBalStream([1,2],[0.6,0.4],1.0), //some random dispersion in the short term (long term works out at 3:2)\n 8000.0 //don't constrain the phrase for 2000 4/4 bars, ie 13 minutes at this tempo\n// …\n```"}, {"role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never closed, so the expression cannot be parsed.\n\n```supercollider\nb = BBCutBuffer(Platform.resourceDir +/+ \"sound/break.aiff\", 8);\n\n//defaults\nBBCut2(CutBuf3(),StatBalProc()).play(2.4);\n\n\n( //defaults\nBBCut2(CutBuf3(b),StatBalProc(\n StatBalStream([0.5,1.5],[0.3,0.7],0.02), //almost a deterministic swap in proportions 3:7\n StatBalStream([1,2],[0.6,0.4],1.0), //some random dispersion in the short term (long term works out at 3:2)\n 8000.0 //don't constrain the phrase for 2000 4/4 bars, ie 13 minutes at this tempo\n //note that it makes rolls very very rare!\n)).play(2.4);\n);\n\n\n\n( //comparison with ChooseCutProc and Lehmer choices\nBBCut2(CutBuf3(b),\n ChooseCutProc({[0.5,1.5].wchoose([0.3,0.7])},{[1,2].wchoose([0.6,0.4])},nil,8000.0)\n).play(2.4);\n)\n```"}]}{"conversations": [{"role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-LFNoise1\", { arg out=0;\n Out.ar(out,\n LFBrownNoise1.ar(1000, 1, MouseX.kr(0, 5), 0.25)\n )\n}).play;\n);\n\n//use as frequency control\n(\nSynthDef(\"help-LFNoise1\", { arg out=0;\n Out.ar(out,\n SinOsc.ar(\n LFBrownNoise1.ar(8.dup, 0.2, 2, 400, 450),\n 0, 0.2\n )\n )\n}).play;\n```"}, {"role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never closed, so the expression cannot be parsed.\n\n```supercollider\n(\nSynthDef(\"help-LFNoise1\", { arg out=0;\n Out.ar(out,\n LFBrownNoise1.ar(1000, 1, MouseX.kr(0, 5), 0.25)\n )\n}).play;\n);\n\n//use as frequency control\n(\nSynthDef(\"help-LFNoise1\", { arg out=0;\n Out.ar(out,\n SinOsc.ar(\n LFBrownNoise1.ar(8.dup, 0.2, 2, 400, 450),\n 0, 0.2\n )\n )\n}).play;\n)\n```"}]}{"conversations": [{"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, 100);\nb.zero;\nb.set(33, -1.034);\n// This should detect the 33rd value as the highest...\nx = {BufMin.kr(b).poll}.play;\n\n// ...until we set a new winner...\nb.set(74, -1.038;\n```"}, {"role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never closed, so the expression cannot be parsed.\n\n```supercollider\ns.boot;\n\nb = Buffer.alloc(s, 100);\nb.zero;\nb.set(33, -1.034);\n// This should detect the 33rd value as the highest...\nx = {BufMin.kr(b).poll}.play;\n\n// ...until we set a new winner...\nb.set(74, -1.038);\n```"}]}{"conversations": [{"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{ BRZ2.ar(WhiteNoise.ar(0.25) }.play;\n```"}, {"role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never closed, so the expression cannot be parsed.\n\n```supercollider\n// Compare:\n\n{ WhiteNoise.ar(0.25) }.play;\n\n{ BRZ2.ar(WhiteNoise.ar(0.25)) }.play;\n```"}]}{"conversations": [{"role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// used to lag pitch\n(\nSynthDef(\\lagud_help, { |out, freq = 300, lagup = 1, lagdown = 5|\n Out.ar(out,\n SinOsc.ar( // sine wave\n LagUD.kr( // lag the frequency\n freq,\n lagup,\n lagdown\n ),\n 0, // phase\n 0.2 // sine amplitude\n )\n );\n}).add;\n);\n\nx = Synth(\\lagud_help); // create the synth\nx.set(\\freq, 500); // set the frequency to a higher value (takes 1 second)\nx.set(\\freq, 100); // set the frequency to a lower value (takes 5 seconds\nx.free;\n```"}, {"role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never closed, so the expression cannot be parsed.\n\n```supercollider\n// used to lag pitch\n(\nSynthDef(\\lagud_help, { |out, freq = 300, lagup = 1, lagdown = 5|\n Out.ar(out,\n SinOsc.ar( // sine wave\n LagUD.kr( // lag the frequency\n freq,\n lagup,\n lagdown\n ),\n 0, // phase\n 0.2 // sine amplitude\n )\n );\n}).add;\n);\n\nx = Synth(\\lagud_help); // create the synth\nx.set(\\freq, 500); // set the frequency to a higher value (takes 1 second)\nx.set(\\freq, 100); // set the frequency to a lower value (takes 5 seconds)\nx.free;\n```"}]}{"conversations": [{"role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{\n NumChannels.ar(\n SinOsc.ar(100, 0, 0.2), // 1 becomes 2\n 2)\n}.play\n);\n\n(\n{\n NumChannels.ar(\n SinOsc.ar([100, 200, 300], 0, 0.2), // 3 becomes 2\n 2)\n}.play\n);\n\n(\n{\n NumChannels.ar(\n SinOsc.ar([100, 200, 300, 100], 0, 0.2), // 4 becomes 2\n\n 2)\n}.play\n```"}, {"role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never closed, so the expression cannot be parsed.\n\n```supercollider\n(\n{\n NumChannels.ar(\n SinOsc.ar(100, 0, 0.2), // 1 becomes 2\n 2)\n}.play\n);\n\n(\n{\n NumChannels.ar(\n SinOsc.ar([100, 200, 300], 0, 0.2), // 3 becomes 2\n 2)\n}.play\n);\n\n(\n{\n NumChannels.ar(\n SinOsc.ar([100, 200, 300, 100], 0, 0.2), // 4 becomes 2\n\n 2)\n}.play\n)\n```"}]}{"conversations": [{"role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.boot;\n\n(\nb = Buffer.alloc(s, 2048, 1);\nc = Buffer.read(s, ExampleFiles.child);\nd = Buffer.alloc(s, 2048, 1);\n);\n\n(\nSynthDef(\\help_pvconj, { |out = 0, bufnum = 0, soundBufnum = 2|\n var in, chain;\n in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);\n chain = FFT(bufnum, in);\n chain = PV_Conj(chain);\n // Original is left, conj is right\n Out.ar(out, 0.3 * [in, IFFT(chain)]);\n}).play(s, [\\out, 0, \\\n// …\n```"}, {"role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never closed, so the expression cannot be parsed.\n\n```supercollider\ns.boot;\n\n(\nb = Buffer.alloc(s, 2048, 1);\nc = Buffer.read(s, ExampleFiles.child);\nd = Buffer.alloc(s, 2048, 1);\n);\n\n(\nSynthDef(\\help_pvconj, { |out = 0, bufnum = 0, soundBufnum = 2|\n var in, chain;\n in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);\n chain = FFT(bufnum, in);\n chain = PV_Conj(chain);\n // Original is left, conj is right\n Out.ar(out, 0.3 * [in, IFFT(chain)]);\n}).play(s, [\\out, 0, \\bufnum, b, \\soundBufnum, c]);\n);\n\n(\nSynthDef(\\help_pvconj2, { |out = 0, bufnum = 0, soundBufnum = 2|\n var in, chainA, chainB;\n in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);\n chainA = FFT(bufnum, in);\n chainB = PV_Copy(chainA, d);\n chainB = PV_Conj(chainB);\n // Now we have the original and conjugate, what happens if we add them?\n Out.ar(out, 0.3 * (IFFT(PV_Add(chainA, chainB)).dup));\n}).play(s, [\\out, 0, \\bufnum, b, \\soundBufnum, c]);\n)\n```"}]}{"conversations": [{"role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n// A sample synthDef\n// Here we use store instead of add to store the compiled synthdef in Platform.defaultTempDir +/+ \"synthdefs/\"\n// and make it available to the NRT server\n(\nSynthDef(\"helpscore\", { |out, freq = 440|\n Out.ar(out,\n SinOsc.ar(freq, 0, 0.2) * Line.kr(1, 0, 0.5, doneAction: Done.freeSelf)\n )\n}).store;\n);\n\n// write a sample file for testing\n(\nvar f, g;\nTempoClock.default.tempo = 1;\ng = [\n [0.1, [\\s_new, \\helpscore, 1000, 0, 0, \\freq, 440]],\n [0.2, [\\s_\n// …\n```"}, {"role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never closed, so the expression cannot be parsed.\n\n```supercollider\n// A sample synthDef\n// Here we use store instead of add to store the compiled synthdef in Platform.defaultTempDir +/+ \"synthdefs/\"\n// and make it available to the NRT server\n(\nSynthDef(\"helpscore\", { |out, freq = 440|\n Out.ar(out,\n SinOsc.ar(freq, 0, 0.2) * Line.kr(1, 0, 0.5, doneAction: Done.freeSelf)\n )\n}).store;\n);\n\n// write a sample file for testing\n(\nvar f, g;\nTempoClock.default.tempo = 1;\ng = [\n [0.1, [\\s_new, \\helpscore, 1000, 0, 0, \\freq, 440]],\n [0.2, [\\s_new, \\helpscore, 1001, 0, 0, \\freq, 660]],\n [0.3, [\\s_new, \\helpscore, 1002, 0, 0, \\freq, 220]],\n [1, [\\c_set, 0, 0]] // finish\n ];\nf = File(Platform.defaultTempDir +/+ \"score-test\", \"w\");\nf.write(g.asCompileString);\nf.close;\n);\n\n// convert it to a binary OSC file for use with NRT\nScore.writeFromFile(Platform.defaultTempDir +/+ \"score-test\", Platform.defaultTempDir +/+ \"test.osc\");\n```"}]}{"conversations": [{"role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"helpscore\", { |out, freq = 440|\n Out.ar(out,\n SinOsc.ar(freq, 0, 0.2) * Line.kr(1, 0, 0.5, doneAction: Done.freeSelf)\n )\n}).store;\n);\n\n// new pattern\n(\np = Pbind(\n \\instrument, \\helpscore,\n \\dur, Prand([0.3, 0.5], inf),\n \\freq, Prand([200, 300, 500], inf)\n);\n);\n\n// make a score from the pattern, 4 beats long\nz = p.asScore(4.0);\nz.score.postcs;\nz.play;\n\n// rendering a pattern to sound file directly:\n// render the pattern to wav (4 beats)\np.render(Platform\n// …\n```"}, {"role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never closed, so the expression cannot be parsed.\n\n```supercollider\n(\nSynthDef(\"helpscore\", { |out, freq = 440|\n Out.ar(out,\n SinOsc.ar(freq, 0, 0.2) * Line.kr(1, 0, 0.5, doneAction: Done.freeSelf)\n )\n}).store;\n);\n\n// new pattern\n(\np = Pbind(\n \\instrument, \\helpscore,\n \\dur, Prand([0.3, 0.5], inf),\n \\freq, Prand([200, 300, 500], inf)\n);\n);\n\n// make a score from the pattern, 4 beats long\nz = p.asScore(4.0);\nz.score.postcs;\nz.play;\n\n// rendering a pattern to sound file directly:\n// render the pattern to wav (4 beats)\np.render(Platform.defaultTempDir +/+ \"asScore-Help.wav\", 4.0);\n```"}]}{"conversations": [{"role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\ns.boot;\nb = Buffer.alloc(s, 2048, 1);\n(\nx = {\n var in, chain, freq, rq, centroid;\n\n // freq = LFPar.kr(0.3).exprange(100, 1000);\n freq = MouseY.kr(1000, 100, 1);\n in = Blip.ar(freq, MouseX.kr(1, 100, 1));\n chain = FFT(LocalBuf(2048), in);\n centroid = SpecCentroid.kr(chain);\n centroid.poll(10);\n in.dup * 0.1\n\n}.play\n;\n\nx.free;\n```"}, {"role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never closed, so the expression cannot be parsed.\n\n```supercollider\ns.boot;\nb = Buffer.alloc(s, 2048, 1);\n(\nx = {\n var in, chain, freq, rq, centroid;\n\n // freq = LFPar.kr(0.3).exprange(100, 1000);\n freq = MouseY.kr(1000, 100, 1);\n in = Blip.ar(freq, MouseX.kr(1, 100, 1));\n chain = FFT(LocalBuf(2048), in);\n centroid = SpecCentroid.kr(chain);\n centroid.poll(10);\n in.dup * 0.1\n\n}.play\n);\n\nx.free;\n```"}]}{"conversations": [{"role": "user", "content": "What does this SuperCollider code do?\n```supercollider\ns.boot;\n\nb = Buffer.alloc(s, 100);\nb.zero;\nb.set(33, -1.034);\n// This should detect the 33rd value as the highest...\nx = {BufMin.kr(b).poll}.play;\n\n// ...until we set a new winner...\nb.set(74, -1.038);\n```"}, {"role": "assistant", "content": "This should detect the 33rd value as the highest... ...until we set a new winner... (BufMin: detect the largest value (and its position) in an array of UGens)"}]}{"conversations": [{"role": "user", "content": "What does this SuperCollider code do?\n```supercollider\ns.boot;\n\n(\nb = Buffer.alloc(s, 2048, 1);\nc = Buffer.read(s, ExampleFiles.child);\nd = Buffer.alloc(s, 2048, 1);\n);\n\n(\nSynthDef(\\help_pvconj, { |out = 0, bufnum = 0, soundBufnum = 2|\n var in, chain;\n in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);\n chain = FFT(bufnum, in);\n chain = PV_Conj(chain);\n // Original is left, conj is right\n Out.ar(out, 0.3 * [in, IFFT(chain)]);\n}).play(s, [\\out, 0, \\\n// …\n```"}, {"role": "assistant", "content": "Original is left, conj is right Now we have the original and conjugate, what happens if we add them? (PV_Conj: Complex conjugate)"}]}{"conversations": [{"role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// A sample synthDef\n// Here we use store instead of add to store the compiled synthdef in Platform.defaultTempDir +/+ \"synthdefs/\"\n// and make it available to the NRT server\n(\nSynthDef(\"helpscore\", { |out, freq = 440|\n Out.ar(out,\n SinOsc.ar(freq, 0, 0.2) * Line.kr(1, 0, 0.5, doneAction: Done.freeSelf)\n )\n}).store;\n);\n\n// write a sample file for testing\n(\nvar f, g;\nTempoClock.default.tempo = 1;\ng = [\n [0.1, [\\s_new, \\helpscore, 1000, 0, 0, \\freq, 440]],\n [0.2, [\\s_\n// …\n```"}, {"role": "assistant", "content": "Here we use store instead of add to store the compiled synthdef in Platform.defaultTempDir +/+ \"synthdefs/\" and make it available to the NRT server (Score: score of timed OSC commands)"}]}{"conversations": [{"role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n(\nSynthDef(\"helpscore\", { |out, freq = 440|\n Out.ar(out,\n SinOsc.ar(freq, 0, 0.2) * Line.kr(1, 0, 0.5, doneAction: Done.freeSelf)\n )\n}).store;\n);\n\n// new pattern\n(\np = Pbind(\n \\instrument, \\helpscore,\n \\dur, Prand([0.3, 0.5], inf),\n \\freq, Prand([200, 300, 500], inf)\n);\n);\n\n// make a score from the pattern, 4 beats long\nz = p.asScore(4.0);\nz.score.postcs;\nz.play;\n\n// rendering a pattern to sound file directly:\n// render the pattern to wav (4 beats)\np.render(Platform\n// …\n```"}, {"role": "assistant", "content": "make a score from the pattern, 4 beats long rendering a pattern to sound file directly: (Score: score of timed OSC commands)"}]}{"conversations": [{"role": "user", "content": "Write a minimal SuperCollider example that uses `BRZ2`."}, {"role": "assistant", "content": "```supercollider\n// Compare:\n\n{ WhiteNoise.ar(0.25) }.play;\n\n{ BRZ2.ar(WhiteNoise.ar(0.25)) }.play;\n```"}]}{"conversations": [{"role": "user", "content": "Write a minimal SuperCollider example that uses `LagUD`."}, {"role": "assistant", "content": "```supercollider\n// used to lag pitch\n(\nSynthDef(\\lagud_help, { |out, freq = 300, lagup = 1, lagdown = 5|\n Out.ar(out,\n SinOsc.ar( // sine wave\n LagUD.kr( // lag the frequency\n freq,\n lagup,\n lagdown\n ),\n 0, // phase\n 0.2 // sine amplitude\n )\n );\n}).add;\n);\n\nx = Synth(\\lagud_help); // create the synth\nx.set(\\freq, 500); // set the frequency to a higher value (takes 1 second)\nx.set(\\freq, 100); // set the frequency to a lower value (takes 5 seconds)\nx.free;\n```"}]}{"conversations": [{"role": "user", "content": "Write a minimal SuperCollider example that uses `NumChannels`."}, {"role": "assistant", "content": "```supercollider\n(\n{\n NumChannels.ar(\n SinOsc.ar(100, 0, 0.2), // 1 becomes 2\n 2)\n}.play\n);\n\n(\n{\n NumChannels.ar(\n SinOsc.ar([100, 200, 300], 0, 0.2), // 3 becomes 2\n 2)\n}.play\n);\n\n(\n{\n NumChannels.ar(\n SinOsc.ar([100, 200, 300, 100], 0, 0.2), // 4 becomes 2\n\n 2)\n}.play\n)\n```"}]}{"conversations": [{"role": "user", "content": "Write a minimal SuperCollider example that uses `PV_Conj`."}, {"role": "assistant", "content": "```supercollider\ns.boot;\n\n(\nb = Buffer.alloc(s, 2048, 1);\nc = Buffer.read(s, ExampleFiles.child);\nd = Buffer.alloc(s, 2048, 1);\n);\n\n(\nSynthDef(\\help_pvconj, { |out = 0, bufnum = 0, soundBufnum = 2|\n var in, chain;\n in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);\n chain = FFT(bufnum, in);\n chain = PV_Conj(chain);\n // Original is left, conj is right\n Out.ar(out, 0.3 * [in, IFFT(chain)]);\n}).play(s, [\\out, 0, \\bufnum, b, \\soundBufnum, c]);\n);\n\n(\nSynthDef(\\help_pvconj2, { |out = 0, bufnum = 0, soundBufnum = 2|\n var in, chainA, chainB;\n in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);\n chainA = FFT(bufnum, in);\n chainB = PV_Copy(chainA, d);\n chainB = PV_Conj(chainB);\n // Now we have the original and conjugate, what happens if we add them?\n Out.ar(out, 0.3 * (IFFT(PV_Add(chainA, chainB)).dup));\n}).play(s, [\\out, 0, \\bufnum, b, \\soundBufnum, c]);\n)\n```"}]}{"conversations": [{"role": "user", "content": "Show another SuperCollider example using `Score`."}, {"role": "assistant", "content": "```supercollider\n(\nSynthDef(\"helpscore\", { |out, freq = 440|\n Out.ar(out,\n SinOsc.ar(freq, 0, 0.2) * Line.kr(1, 0, 0.5, doneAction: Done.freeSelf)\n )\n}).store;\n);\n\n// new pattern\n(\np = Pbind(\n \\instrument, \\helpscore,\n \\dur, Prand([0.3, 0.5], inf),\n \\freq, Prand([200, 300, 500], inf)\n);\n);\n\n// make a score from the pattern, 4 beats long\nz = p.asScore(4.0);\nz.score.postcs;\nz.play;\n\n// rendering a pattern to sound file directly:\n// render the pattern to wav (4 beats)\np.render(Platform.defaultTempDir +/+ \"asScore-Help.wav\", 4.0);\n```"}]}{"conversations": [{"role": "user", "content": "Write a minimal SuperCollider example that uses `SpecCentroid`."}, {"role": "assistant", "content": "```supercollider\ns.boot;\nb = Buffer.alloc(s, 2048, 1);\n(\nx = {\n var in, chain, freq, rq, centroid;\n\n // freq = LFPar.kr(0.3).exprange(100, 1000);\n freq = MouseY.kr(1000, 100, 1);\n in = Blip.ar(freq, MouseX.kr(1, 100, 1));\n chain = FFT(LocalBuf(2048), in);\n centroid = SpecCentroid.kr(chain);\n centroid.poll(10);\n in.dup * 0.1\n\n}.play\n);\n\nx.free;\n```"}]}{"conversations": [{"role": "user", "content": "Write a SuperCollider patch that makes 360 audio (a SuperCollider snippet)."}, {"role": "assistant", "content": "```supercollider\n(\ns.waitForBoot({\n Routine({\n var duration = 60; // Duration in seconds\n var filePath = \"~/Desktop/360_Soundscape.wav\".standardizePath;\n\n // 1. Define the Synth for a spatialized sound source\n SynthDef(\\SpatialSource, { |out=0, freq=440, az=0, amp=0.2, gate=1|\n var signal, w, x, y, z;\n \n // Generate a placeholder sound (using noise/filters to mimic your list)\n signal = HPF.ar(PinkNoise.ar(amp), freq) * EnvGen.kr(Env.asr(2, 1, 2), gate, doneAction: 2);\n \n // Encode into Ambisonics (B-format)\n #w, x, y, z = PanB.ar(signal, az, 0, 1); \n \n Out.ar(out, [w, x, y, z]);\n }).add;\n\n s.sync;\n\n // 2. Start Recording\n s.prepareForRecord(filePath, 4); // 4 channels for B-format\n s.record;\n\n // 3. Instantiate the 5 Sounds at different angles\n // [Sound Type, Frequency, Azimuth (-1 to 1)]\n // -1 = Rear, -0.5 = Left, 0 = Front, 0.5 = Right, 1 = Rear\n \n ~wind = Synth(\\SpatialSource, [\\freq, 100, \\az, -0.8, \\amp, 0.1]); // Back-Left\n ~birds = Synth(\\SpatialSource, [\\freq, 2000, \\az, 0.4, \\amp, 0.05]); // Front-Right\n ~car = Synth(\\SpatialSource, [\\freq, 50, \\az, 0.0, \\amp, 0.15]); // Center-Front\n ~chime = Synth(\\SpatialSource, [\\freq, 800, \\az, 0.8, \\amp, 0.1]); // Back-Right\n ~water = Synth(\\SpatialSource, [\\freq, 500, \\az, -0.3, \\amp, 0.08]); // Front-Left\n\n duration.wait;\n\n // 4. Cleanup and Save\n [~wind, ~birds, ~car, ~chime, ~water].do(_.set(\\gate, 0));\n 2.wait;\n s.stopRecording;\n \"File saved to Desktop as 360_Soundscape.wav\".postln;\n }).play;\n});\n)\n```"}]}{"conversations": [{"role": "user", "content": "Write a SuperCollider patch for Compander coded with ugens."}, {"role": "assistant", "content": "```supercollider\n(//compander -> amplitude\nn=Ndef(\\ct,{\n //var sig=SinOsc.ar*(1-LFSaw.ar(1,0,0.5,0.5));\n var sig=SinOsc.ar*(1-LFPulse.ar(1));\n var inputspecs=[\n Spec.add(\\clampTime, [0.00001, 10,\\exp,0,0.05]);\n Spec.add(\\clampTime2, [0, 1,\\lin,0,0.05]);\n Spec.add(\\relaxTime, [0.00001, 60,\\exp,0,1]);\n Spec.add(\\compression, [0.01, 1,\\lin,0,0.1]);\n Spec.add(\\slopeBelow, [0.01, 10,\\lin,0,0.1]);\n Spec.add(\\slopeAbove, [0.0001, 1,\\lin,0,0.25]);\n ];\n var t=\\thresh.kr(0.75);\n var ct=\\clampTime.kr(0.05);\n var rt=\\relaxTime.kr(1);\n var slopeBelow= \\slopeBelow.kr(1);\n var slopeAbove= \\slopeAbove.kr(0.9);\n\n var a=Amplitude.ar(sig,ct,rt);\n var prevmaxval=a.abs;\n var lg1=pow(prevmaxval / t, slopeBelow - 1);\n var absx = lg1.abs;\n var lg=if((absx < 1e-15),0,if((absx > 1e15),1,lg1));\n var ag=pow(prevmaxval / t, slopeAbove - 1);\n var next_gain=if (prevmaxval < t,lg,ag);\n \n var cp=Compander.ar(sig,sig,t,slopeBelow,slopeAbove,ct,rt);\n Out.ar(0,[sig * next_gain,cp]);\n});\nn.gui;\n\n);\n\ns.scope(bufsize:2**14)\n```"}]}{"conversations": [{"role": "user", "content": "Write a SuperCollider patch that makes Kind of music box."}, {"role": "assistant", "content": "```supercollider\nSynthDef(\\ping, { |out, freq=440, amp=0.1, impdecay=0.01, attack=0.0001,sustain=0.1, famt=3, ffreq=1000, hdur=0.1|\n var snd, trig, decay;\n trig = Impulse.ar(0);\n decay = Decay2.ar(trig, attack, impdecay) * 1;\n snd = Mix(Ringz.ar(decay, freq*[1,2], sustain));\n snd = snd + Mix(SinOsc.ar(freq*[Rand(1,1.1),Rand(1.4, 1.6), Rand(1.9,2.1), Rand(3.9, 4.1)], mul:Decay2.ar(trig, 0.01,hdur)));\n snd = BLowPass.ar(snd, ffreq * decay.linexp(0,1,1,famt), 0.1);\n snd = snd * EnvGen.ar(Env.linen(0, sustain/Rand(1.0,4.0), 0.1), doneAction:2);\n OffsetOut.ar(out, (snd * amp)!2);\n}).add;\n\nNdef(\\ping, Pbind(\n \\instrument, \\ping,\n \\scale, Scale.mixolydian,\n \\n, Pwhite(1,4,inf),\n \\octave, Pclump(Pkey(\\n), Prand([6,7], inf)),\n// \\degree, Pclump(Pkey(\\n), Pwrand([0,2,3,4,5,6], [10,7,3,5,2,1].normalizeSum, inf)),\n \\degree, Pclump(Pkey(\\n), Place([[0,1,2,3,4], [2,3,4,5,6], [4,3,4,3,6,7], [0,2,1,2,1,4,3,3,5]], inf)),\n \\attack, Pclump(Pkey(\\n), Pwhite(0.0005, 0.001)),\n \\sustain, Pfunc{ |e| e.octave / 4 } + Pwhite(0.01, 0.5, inf),\n \\strum, Prand([0, 1/3, 1/4, 1/16, 1/32, 1, 2], inf),\n \\detune, Pclump(Pkey(\\n), Pwhite(-2.0, 2.0, inf)),\n \\ffreq, Pclump(Pkey(\\n), Pwhite(200.0, 2000.0, inf)),\n \\famt, Pclump(Pkey(\\n), Pwhite(3,6, inf)),\n \\hdur, Pclump(Pkey(\\n), Pwhite(0.05, 0.3, inf)),\n \\impdecay, Pclump(Pkey(\\n), Pwhite(0.001, 0.01, inf)),\n \\amp, Pclump(Pkey(\\n), Pwhite(0.01, 0.1, inf)) * 0.3,\n \\dur, Prand([1,2,4]/2, inf) + Pwhite(-0.1, 0.1, inf)\n)).play;\n\nNdef(\\ping)[10] = \\filter -> { |in|\n var amp = LFNoise2.kr(0.1).range(0.001, 0.1);\n in * SinOsc.ar(LFNoise2.kr(0.1).range(60.midicps,61.midicps) / 4, 0, amp, 1-amp)\n};\n\nNdef(\\ping)[15] = \\filter -> { |in| Compander.ar(in, in, 0.1, 1, 0.3) };\n```"}]}{"conversations": [{"role": "user", "content": "Write a SuperCollider patch for shepard tones alberto de campo."}, {"role": "assistant", "content": "```supercollider\n// shepard tones\n// alberto de campo\n(\nvar ampTable, freqTable, b1, b2;\n\nampTable = Signal.hanningWindow(1024).squared;\nfreqTable = Signal.newClear(1024).waveFill({ arg i; 0.5 ** i * 20000 }, 0, 10);\n\nb1 = Buffer.loadCollection(s, freqTable);\nb2 = Buffer.loadCollection(s, ampTable);\n\n{\n var freqs, amps, phasor, ratescale, rate, phases;\n ratescale = 1024 / 44100 / 10;\n rate = 0.1; // once per 10 sec\n phasor = Phasor.ar(0, rate * ratescale, 0, 1024);\n phases = (0..9) * 0.1 * 1024 + phasor;\n\n freqs = BufRd.ar(1, b1.bufnum, phases);\n amps = BufRd.ar(1, b2.bufnum, phases);\n\n Mix.ar(SinOsc.ar(freqs) * amps) * 0.1;\n}.play;\n\n)\n```"}]}{"conversations": [{"role": "user", "content": "How is `ZeroCrossing` typically used in SuperCollider?"}, {"role": "assistant", "content": "```supercollider\ns.boot;\n(\n{\n var a;\n a = SinOsc.ar(SinOsc.kr(1, 0, 600, 700), 0, 0.1);\n [a, ZeroCrossing.ar(a) * 0.0005]\n}.scope;\n)\n```"}]}{"conversations": [{"role": "user", "content": "How to sync between clock and running synth?"}, {"role": "assistant", "content": "SuperCollider forum — How to sync between clock and running synth\n\nFirst, I don’t encounter any drift with your example here on my system (SC 3.9.3 on Mac with 10.10).\n\nThere are two points that confused me a bit with this example: The doubling of the LFPulse frequency (due to causing 2 DC clicks per period, which is kind of harsh) and the random duration in the Pattern. OffsetOut improves accuracy, but even with Out this variant doesn’t run out of sync here:\n\n```supercollider\n(\n~myClock = TempoClock.new(2.2);\nSynthDef(\\beep, { OffsetOut.ar(0, SinOsc.ar(\\freq.kr(440), mul:\\amp.kr)!2*EnvGate()) }).add;\n{\n Ndef(\\a).proxyspace.clock = ~myClock;\n Ndef(\\a).proxyspace.quant = 1;\n Ndef(\\b).proxyspace.clock = ~myClock;\n Ndef(\\b).proxyspace.quant = 1;\n\n Ndef(\\a, Pbind(\\instrument, \\beep,\n \\dur, 1,\n \\degree, Prand((0..14),inf),\n \\amp, 0.4,\n \\legato, 0.03));\n Ndef(\\b, { Decay.ar(Impulse.ar(2.2!2), 1, mul:0.2).lag(0.001) });\n\n Ndef(\\a).play;\n Ndef(\\b).play;\n\n}.fork(~myClock);\n)\n```\n\nHow long does it need to get out of sync on your machine ?\n\nBesides of the concrete example: yes, syncing between Patterns and Server can be demanding and the reason for this is a necessary realtime adjustment that probably can’t be overcome. I have given an example here:\n\n Imperfection of language-based timing Learning\n\n This goes back to an observation of my colleague Gerhard Eckel. I posted this a while ago on the mailing list, but can’t find it anymore in the archives. As I think it’s an interesting topic I’m reposting it here again for future reference.\nTiming in general is a crucial topic and practically users are mainly confronted with asynchronicity between server and language, latency, quantization, the Out/OffsetOut differences etc. Sample-accurate timing isn’t relevant in all contexts, nevertheless in..."}]}{"conversations": [{"role": "user", "content": "Why does everyone wrap code in s.waitForBoot?"}, {"role": "assistant", "content": "Because the server boots asynchronously, and a SynthDef added before it is up never reaches it. `s.waitForBoot { ... }` runs the block once the server has finished booting; inside a Routine you can also use `s.boot; s.sync;` for the same effect. If you see 'SynthDef not found' on code that clearly looks right, this is usually why."}]}183 unmodified lines184185186187188189190191192193194195196197198199183 unmodified lines{"conversations": [{"role": "user", "content": "What does `SpecCentroid.kr` do? What arguments does it take?"}, {"role": "assistant", "content": "Spectral centroid Arguments: buffer — an FFT chain.."}]}{"conversations": [{"role": "user", "content": "What does `TGrains.ar` do? What arguments does it take?"}, {"role": "assistant", "content": "Buffer granulator. Arguments: numChannels — The number of output channels. Must be a nonzero, positive integer. This is fixed when the SynthDef is compiled so cannot be assigned to a SynthDef argument.; trigger — At each trigger, the following arguments are sampled and used as the arguments of a new grain. A trigger occurs when a signal changes from non-positive to a positive value. If the trigger is audio rate then the grains will start with sample accuracy.; bufnum — The index of the buffer to use. It must be a one channel (mono) buffer.; rate — 1.0 is normal, 2.0 is one octave up, 0.5 is one octave down -1.0 is backward normal rate… etc.; centerPos — The position in the buffer in seconds at which the grain envelope will reach maximum amplitude.; dur — Duration of the grain in seconds.; pan — determines where to pan the output.; amp — Amplitude of the grain.."}]}{"conversations": [{"role": "user", "content": "What does `ZeroCrossing.ar` do? What arguments does it take?"}, {"role": "assistant", "content": "Zero crossing frequency follower Arguments: in — Input signal.."}]}{"conversations": [{"role": "user", "content": "What does this SuperCollider code do?\n```supercollider\ns.boot;\n\nb = Buffer.alloc(s, 100);\nb.zero;\nb.set(33, -1.034);\n// This should detect the 33rd value as the highest...\nx = {BufMin.kr(b).poll}.play;\n\n// ...until we set a new winner...\nb.set(74, -1.038);\n```"}, {"role": "assistant", "content": "This should detect the 33rd value as the highest... ...until we set a new winner... (BufMin: detect the largest value (and its position) in an array of UGens)"}]}{"conversations": [{"role": "user", "content": "What does this SuperCollider code do?\n```supercollider\ns.boot;\n\n(\nb = Buffer.alloc(s, 2048, 1);\nc = Buffer.read(s, ExampleFiles.child);\nd = Buffer.alloc(s, 2048, 1);\n);\n\n(\nSynthDef(\\help_pvconj, { |out = 0, bufnum = 0, soundBufnum = 2|\n var in, chain;\n in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);\n chain = FFT(bufnum, in);\n chain = PV_Conj(chain);\n // Original is left, conj is right\n Out.ar(out, 0.3 * [in, IFFT(chain)]);\n}).play(s, [\\out, 0, \\\n// …\n```"}, {"role": "assistant", "content": "Original is left, conj is right Now we have the original and conjugate, what happens if we add them? (PV_Conj: Complex conjugate)"}]}{"conversations": [{"role": "user", "content": "What does this SuperCollider code do?\n```supercollider\n// A sample synthDef\n// Here we use store instead of add to store the compiled synthdef in Platform.defaultTempDir +/+ \"synthdefs/\"\n// and make it available to the NRT server\n(\nSynthDef(\"helpscore\", { |out, freq = 440|\n Out.ar(out,\n SinOsc.ar(freq, 0, 0.2) * Line.kr(1, 0, 0.5, doneAction: Done.freeSelf)\n )\n}).store;\n);\n\n// write a sample file for testing\n(\nvar f, g;\nTempoClock.default.tempo = 1;\ng = [\n [0.1, [\\s_new, \\helpscore, 1000, 0, 0, \\freq, 440]],\n [0.2, [\\s_\n// …\n```"}, {"role": "assistant", "content": "Here we use store instead of add to store the compiled synthdef in Platform.defaultTempDir +/+ \"synthdefs/\" and make it available to the NRT server (Score: score of timed OSC commands)"}]}{"conversations": [{"role": "user", "content": "Explain this SuperCollider code.\n```supercollider\n(\nSynthDef(\"helpscore\", { |out, freq = 440|\n Out.ar(out,\n SinOsc.ar(freq, 0, 0.2) * Line.kr(1, 0, 0.5, doneAction: Done.freeSelf)\n )\n}).store;\n);\n\n// new pattern\n(\np = Pbind(\n \\instrument, \\helpscore,\n \\dur, Prand([0.3, 0.5], inf),\n \\freq, Prand([200, 300, 500], inf)\n);\n);\n\n// make a score from the pattern, 4 beats long\nz = p.asScore(4.0);\nz.score.postcs;\nz.play;\n\n// rendering a pattern to sound file directly:\n// render the pattern to wav (4 beats)\np.render(Platform\n// …\n```"}, {"role": "assistant", "content": "make a score from the pattern, 4 beats long rendering a pattern to sound file directly: (Score: score of timed OSC commands)"}]}{"conversations": [{"role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\nSynthDef(\"help-LFNoise1\", { arg out=0;\n Out.ar(out,\n LFBrownNoise1.ar(1000, 1, MouseX.kr(0, 5), 0.25)\n )\n}).play;\n);\n\n//use as frequency control\n(\nSynthDef(\"help-LFNoise1\", { arg out=0;\n Out.ar(out,\n SinOsc.ar(\n LFBrownNoise1.ar(8.dup, 0.2, 2, 400, 450),\n 0, 0.2\n )\n )\n}).play;\n```"}, {"role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never closed, so the expression cannot be parsed.\n\n```supercollider\n(\nSynthDef(\"help-LFNoise1\", { arg out=0;\n Out.ar(out,\n LFBrownNoise1.ar(1000, 1, MouseX.kr(0, 5), 0.25)\n )\n}).play;\n);\n\n//use as frequency control\n(\nSynthDef(\"help-LFNoise1\", { arg out=0;\n Out.ar(out,\n SinOsc.ar(\n LFBrownNoise1.ar(8.dup, 0.2, 2, 400, 450),\n 0, 0.2\n )\n )\n}).play;\n)\n```"}]}{"conversations": [{"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, 100);\nb.zero;\nb.set(33, -1.034);\n// This should detect the 33rd value as the highest...\nx = {BufMin.kr(b).poll}.play;\n\n// ...until we set a new winner...\nb.set(74, -1.038;\n```"}, {"role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never closed, so the expression cannot be parsed.\n\n```supercollider\ns.boot;\n\nb = Buffer.alloc(s, 100);\nb.zero;\nb.set(33, -1.034);\n// This should detect the 33rd value as the highest...\nx = {BufMin.kr(b).poll}.play;\n\n// ...until we set a new winner...\nb.set(74, -1.038);\n```"}]}{"conversations": [{"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{ BRZ2.ar(WhiteNoise.ar(0.25) }.play;\n```"}, {"role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never closed, so the expression cannot be parsed.\n\n```supercollider\n// Compare:\n\n{ WhiteNoise.ar(0.25) }.play;\n\n{ BRZ2.ar(WhiteNoise.ar(0.25)) }.play;\n```"}]}{"conversations": [{"role": "user", "content": "This SuperCollider code does not compile. What is wrong and what should it be?\n\n```supercollider\n(\n{\n NumChannels.ar(\n SinOsc.ar(100, 0, 0.2), // 1 becomes 2\n 2)\n}.play\n);\n\n(\n{\n NumChannels.ar(\n SinOsc.ar([100, 200, 300], 0, 0.2), // 3 becomes 2\n 2)\n}.play\n);\n\n(\n{\n NumChannels.ar(\n SinOsc.ar([100, 200, 300, 100], 0, 0.2), // 4 becomes 2\n\n 2)\n}.play\n```"}, {"role": "assistant", "content": "A closing bracket is missing: the parenthesis opened earlier is never closed, so the expression cannot be parsed.\n\n```supercollider\n(\n{\n NumChannels.ar(\n SinOsc.ar(100, 0, 0.2), // 1 becomes 2\n 2)\n}.play\n);\n\n(\n{\n NumChannels.ar(\n SinOsc.ar([100, 200, 300], 0, 0.2), // 3 becomes 2\n 2)\n}.play\n);\n\n(\n{\n NumChannels.ar(\n SinOsc.ar([100, 200, 300, 100], 0, 0.2), // 4 becomes 2\n\n 2)\n}.play\n)\n```"}]}{"conversations": [{"role": "user", "content": "Write a minimal SuperCollider example that uses `BRZ2`."}, {"role": "assistant", "content": "```supercollider\n// Compare:\n\n{ WhiteNoise.ar(0.25) }.play;\n\n{ BRZ2.ar(WhiteNoise.ar(0.25)) }.play;\n```"}]}{"conversations": [{"role": "user", "content": "Write a minimal SuperCollider example that uses `NumChannels`."}, {"role": "assistant", "content": "```supercollider\n(\n{\n NumChannels.ar(\n SinOsc.ar(100, 0, 0.2), // 1 becomes 2\n 2)\n}.play\n);\n\n(\n{\n NumChannels.ar(\n SinOsc.ar([100, 200, 300], 0, 0.2), // 3 becomes 2\n 2)\n}.play\n);\n\n(\n{\n NumChannels.ar(\n SinOsc.ar([100, 200, 300, 100], 0, 0.2), // 4 becomes 2\n\n 2)\n}.play\n)\n```"}]}{"conversations": [{"role": "user", "content": "How is `ZeroCrossing` typically used in SuperCollider?"}, {"role": "assistant", "content": "```supercollider\ns.boot;\n(\n{\n var a;\n a = SinOsc.ar(SinOsc.kr(1, 0, 600, 700), 0, 0.1);\n [a, ZeroCrossing.ar(a) * 0.0005]\n}.scope;\n)\n```"}]}{"conversations": [{"role": "user", "content": "How to sync between clock and running synth?"}, {"role": "assistant", "content": "SuperCollider forum — How to sync between clock and running synth\n\nFirst, I don’t encounter any drift with your example here on my system (SC 3.9.3 on Mac with 10.10).\n\nThere are two points that confused me a bit with this example: The doubling of the LFPulse frequency (due to causing 2 DC clicks per period, which is kind of harsh) and the random duration in the Pattern. OffsetOut improves accuracy, but even with Out this variant doesn’t run out of sync here:\n\n```supercollider\n(\n~myClock = TempoClock.new(2.2);\nSynthDef(\\beep, { OffsetOut.ar(0, SinOsc.ar(\\freq.kr(440), mul:\\amp.kr)!2*EnvGate()) }).add;\n{\n Ndef(\\a).proxyspace.clock = ~myClock;\n Ndef(\\a).proxyspace.quant = 1;\n Ndef(\\b).proxyspace.clock = ~myClock;\n Ndef(\\b).proxyspace.quant = 1;\n\n Ndef(\\a, Pbind(\\instrument, \\beep,\n \\dur, 1,\n \\degree, Prand((0..14),inf),\n \\amp, 0.4,\n \\legato, 0.03));\n Ndef(\\b, { Decay.ar(Impulse.ar(2.2!2), 1, mul:0.2).lag(0.001) });\n\n Ndef(\\a).play;\n Ndef(\\b).play;\n\n}.fork(~myClock);\n)\n```\n\nHow long does it need to get out of sync on your machine ?\n\nBesides of the concrete example: yes, syncing between Patterns and Server can be demanding and the reason for this is a necessary realtime adjustment that probably can’t be overcome. I have given an example here:\n\n Imperfection of language-based timing Learning\n\n This goes back to an observation of my colleague Gerhard Eckel. I posted this a while ago on the mailing list, but can’t find it anymore in the archives. As I think it’s an interesting topic I’m reposting it here again for future reference.\nTiming in general is a crucial topic and practically users are mainly confronted with asynchronicity between server and language, latency, quantization, the Out/OffsetOut differences etc. Sample-accurate timing isn’t relevant in all contexts, nevertheless in..."}]}{"conversations": [{"role": "user", "content": "Why does everyone wrap code in s.waitForBoot?"}, {"role": "assistant", "content": "Because the server boots asynchronously, and a SynthDef added before it is up never reaches it. `s.waitForBoot { ... }` runs the block once the server has finished booting; inside a Routine you can also use `s.boot; s.sync;` for the same effect. If you see 'SynthDef not found' on code that clearly looks right, this is usually why."}]}
12345160 unmodified lines1661671681691701711721731741751761771781791801811821831841851865 unmodified lines19219319419519619719819920020120220320420520620720820921021121265 unmodified lines2782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233246 unmodified lines331332333334335336337338143 unmodified lines4824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315 unmodified lines537538539540541542543544545546547548549550551552553554555556557{"generated_at": "2026-11-21T10:36:08+00:00","root": "<local path removed>","stages": {"10-extracted": {160 unmodified lines},"40-sft": {"mix-sft": {"finished_at": "2026-11-21T10:32:05+00:00","counts": {"total": 6000,"val": 215,"pool": 14398,"teacher": 94,"families": {"F": {"share": 0.18,"pool": 215,"sampled": 1082,"repeats": 5.03,"wanted": 1080,"capped": 1080,"absorbs": 2},"B": {"share": 0.22,5 unmodified lines},"C": {"share": 0.11,"pool": 483,"sampled": 684,"repeats": 1.42,"wanted": 660,"capped": 660,"absorbs": 24},"E": {"share": 0.12,"pool": 1205,"sampled": 790,"repeats": 0.66,"wanted": 720,"capped": 720,"absorbs": 70},"A": {"share": 0.09,65 unmodified lines{"path": "sft_train.jsonl","lines": 6000,"sha256": "d10cc71a4c9ef2f75842e5ec968e98e1445463efc01c473697342b77b22de970"},{"path": "sft_val.jsonl","lines": 215,"sha256": "d21af4f17525e30df594debab4d630e80bd7fef28a7a69f568e96d16de518581"}]},"sft": {"finished_at": "2026-11-21T10:32:04+00:00","counts": {"pool": 14398,"families": {"D3": 118,"A": 3884,"B": 8050,"E": 1215,"D": 229,"C": 489,"F": 219,"G": 74,"C2": 85,"Q": 21,"I": 14},"dropped": {"prompt_too_long": 288,"answer_too_long": 1,"answer_too_short": 2,"code_does_not_compile": 765},"para": 2,"duplicate_questions_removed": 2233,"sft_seq": 512,"codecheck": {"tested": 1677,"dropped_pairs": 765,"dropped_blocks": 776,"compiled": 901}},"config": {"pretrain_seq": 512,6 unmodified lines"outputs": [{"path": "sft_pool.jsonl","lines": 14398,"sha256": "910fe8bdcd7a8de33ba9df18e9272fee08f0d1d92c3a52ae8555caac7200009c"}]}143 unmodified lines"kept_supercollider": 1726},"sft_stats": {"pool": 14398,"families": {"D3": 118,"A": 3884,"B": 8050,"E": 1215,"D": 229,"C": 489,"F": 219,"G": 74,"C2": 85,"Q": 21,"I": 14},"dropped": {"prompt_too_long": 288,"answer_too_long": 1,"answer_too_short": 2,"code_does_not_compile": 765},"para": 2,"duplicate_questions_removed": 2233,"sft_seq": 512,"codecheck": {"tested": 1677,"dropped_pairs": 765,"dropped_blocks": 776,"compiled": 901}},"mix_stats": {"total": 6000,"val": 215,"pool": 14398,"teacher": 94,"families": {"F": {"share": 0.18,"pool": 215,"sampled": 1082,"repeats": 5.03,"wanted": 1080,"capped": 1080,"absorbs": 2},"B": {"share": 0.22,5 unmodified lines},"C": {"share": 0.11,"pool": 483,"sampled": 684,"repeats": 1.42,"wanted": 660,"capped": 660,"absorbs": 24},"E": {"share": 0.12,"pool": 1205,"sampled": 790,"repeats": 0.66,"wanted": 720,"capped": 720,"absorbs": 70},"A": {"share": 0.09,12345160 unmodified lines1661671681691701711721731741751761771781791801811821831841851865 unmodified lines19219319419519619719819920020120220320420520620720820921021121265 unmodified lines2782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363376 unmodified lines344345346347348349350351143 unmodified lines4954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575 unmodified lines563564565566567568569570571572573574575576577578579580581582583{"generated_at": "2026-11-21T18:54:18+00:00","root": "<local path removed>","stages": {"10-extracted": {160 unmodified lines},"40-sft": {"mix-sft": {"finished_at": "2026-11-21T18:53:09+00:00","counts": {"total": 6000,"val": 201,"pool": 13412,"teacher": 94,"families": {"H": {"share": 0.18,"pool": 153,"sampled": 918,"repeats": 6.0,"wanted": 1080,"capped": 918,"absorbs": 0},"B": {"share": 0.22,5 unmodified lines},"C": {"share": 0.11,"pool": 241,"sampled": 722,"repeats": 3.0,"wanted": 660,"capped": 660,"absorbs": 62},"E": {"share": 0.12,"pool": 537,"sampled": 916,"repeats": 1.71,"wanted": 720,"capped": 720,"absorbs": 196},"A": {"share": 0.09,65 unmodified lines{"path": "sft_train.jsonl","lines": 6000,"sha256": "f5d4c5831c44e1c1be3a255fa1e8a51780933c93f117a983147e243e593ac305"},{"path": "sft_val.jsonl","lines": 201,"sha256": "2036bf01c619da65bd0cd66be28507b05d2057965456ea4259b36b2be396af95"}]},"sft": {"finished_at": "2026-11-21T18:51:08+00:00","counts": {"pool": 13412,"families": {"D3": 118,"A": 3884,"B": 8050,"D": 229,"E": 541,"G": 74,"C": 243,"C2": 85,"Q": 21,"H": 153,"I": 14},"dropped": {"prompt_too_long": 288,"answer_too_long": 7,"answer_too_short": 2,"code_does_not_compile": 556},"para": 2,"duplicate_questions_removed": 2285,"sft_seq": 512,"codecheck": {"tested": 1162,"dropped_pairs": 556,"dropped_blocks": 567,"compiled": 595},"prologue_gate": {"C": {"tested": 933,"dropped_no_audio": 266,"dropped_unbound": 239},"E": {"tested": 1273,"dropped_no_audio": 376,"dropped_unbound": 334}},"family_h_generated": 467},"config": {"pretrain_seq": 512,6 unmodified lines"outputs": [{"path": "sft_pool.jsonl","lines": 13412,"sha256": "e138717619f49780c81be0a83dfffef3744347ae5a88b0880b1e8dc833a762d1"}]}143 unmodified lines"kept_supercollider": 1726},"sft_stats": {"pool": 13412,"families": {"D3": 118,"A": 3884,"B": 8050,"D": 229,"E": 541,"G": 74,"C": 243,"C2": 85,"Q": 21,"H": 153,"I": 14},"dropped": {"prompt_too_long": 288,"answer_too_long": 7,"answer_too_short": 2,"code_does_not_compile": 556},"para": 2,"duplicate_questions_removed": 2285,"sft_seq": 512,"codecheck": {"tested": 1162,"dropped_pairs": 556,"dropped_blocks": 567,"compiled": 595},"prologue_gate": {"C": {"tested": 933,"dropped_no_audio": 266,"dropped_unbound": 239},"E": {"tested": 1273,"dropped_no_audio": 376,"dropped_unbound": 334}},"family_h_generated": 467},"mix_stats": {"total": 6000,"val": 201,"pool": 13412,"teacher": 94,"families": {"H": {"share": 0.18,"pool": 153,"sampled": 918,"repeats": 6.0,"wanted": 1080,"capped": 918,"absorbs": 0},"B": {"share": 0.22,5 unmodified lines},"C": {"share": 0.11,"pool": 241,"sampled": 722,"repeats": 3.0,"wanted": 660,"capped": 660,"absorbs": 62},"E": {"share": 0.12,"pool": 537,"sampled": 916,"repeats": 1.71,"wanted": 720,"capped": 720,"absorbs": 196},"A": {"share": 0.09,
45 unmodified lines464748495051525354552 unmodified lines585960616263646566674 unmodified lines72737475767778792 unmodified lines8283848586878845 unmodified lines"lines": 6000,"prompt_leaves_no_room": 0,"no_room_examples": [],"truncated": 1190,"markup_leaks": 0,"contradictory_answers": 0,"repeated_qa": 2153}```2 unmodified lines```json{"file": "sft_val.jsonl","lines": 215,"prompt_leaves_no_room": 0,"no_room_examples": [],"truncated": 11,"markup_leaks": 0,"contradictory_answers": 0,"repeated_qa": 04 unmodified lines```json{"train": 3847,"val": 215,"overlap": 0}```2 unmodified lines```json{"ugen_calls": 22216,"unknown": 0,"worst": []}45 unmodified lines464748495051525354552 unmodified lines585960616263646566674 unmodified lines72737475767778792 unmodified lines8283848586878845 unmodified lines"lines": 6000,"prompt_leaves_no_room": 0,"no_room_examples": [],"truncated": 787,"markup_leaks": 0,"contradictory_answers": 0,"repeated_qa": 2667}```2 unmodified lines```json{"file": "sft_val.jsonl","lines": 201,"prompt_leaves_no_room": 0,"no_room_examples": [],"truncated": 2,"markup_leaks": 0,"contradictory_answers": 0,"repeated_qa": 04 unmodified lines```json{"train": 3333,"val": 201,"overlap": 0}```2 unmodified lines```json{"ugen_calls": 21815,"unknown": 0,"worst": []}
README.md+4-4
checksums.sha256+5-5
data/sft/pool.jsonl
data/sft/train.jsonl
data/sft/val.jsonl+4-18
stats.json+90-64
verify_report.md+7-7