Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: SuperSimpleSequencer
name
code content
SynthDef(\peep,{|freq=100| var snd = SinOsc.ar(freq); snd = snd * EnvGen.ar(Env.perc(0.001,0.25), doneAction:2); Out.ar(0, snd ! 2); }).add; w = Window("sequencer", Rect(0, 0, 400, 200)).front; a = 0!16!8; a.do{ |rows, i| rows.do{ |cell, j| Button(w, Rect(j*25, i*25, 25, 25)) .states_([ ["-", Color.black, Color.white], ["O", Color.white, Color.black], ]) .action_{ |v| a[i][j] = v.value; }; }; }; Ppar(a.collect({|c, r| Pbind( \instrument, \peep, \freq, Pif(Pseq(a[r], inf).coin, 100+(a.size-100*r), \rest), \dur, 0.25 )}), inf).play;
code description
Just for fun and a demonstration of gui/2Darrays/synths/tasks in less than 30 lines.
use markdown for formating
category tags
comma separated, i.g. "wild, siren" (do not enter default SC class names, please)
ancestor(s)
comma separated identificators, i.g. "1-C,1-1,1-4M,1-x"
Private?
the code will be accessible by direct url and not visible in public activity
signup to submit public code without captcha
comment of change