{
   "ancestor_list" : [],
   "description" : "Just for fun and a demonstration of gui/2Darrays/synths/tasks in less than 30 lines.",
   "name" : "SuperSimpleSequencer",
   "author" : "rukano",
   "code" : "SynthDef(\\peep,{|freq=100|\r\n\tvar snd = SinOsc.ar(freq);\r\n\tsnd = snd * EnvGen.ar(Env.perc(0.001,0.25), doneAction:2);\r\n\tOut.ar(0, snd ! 2);\r\n}).add;\r\nw = Window(\"sequencer\", Rect(0, 0, 400, 200)).front;\r\na = 0!16!8;\r\na.do{ |rows, i|\r\n\trows.do{ |cell, j|\r\n\t\tButton(w, Rect(j*25, i*25, 25, 25))\r\n\t\t.states_([\r\n\t\t\t[\"-\", Color.black, Color.white],\r\n\t\t\t[\"O\", Color.white, Color.black],\r\n\t\t])\r\n\t\t.action_{ |v|\r\n\t\t\ta[i][j] = v.value;\r\n\t\t};\r\n\t};\r\n};\r\nPpar(a.collect({|c, r| Pbind(\r\n\t\\instrument, \\peep,\r\n\t\\freq, Pif(Pseq(a[r], inf).coin, 100+(a.size-100*r), \\rest),\r\n\t\\dur, 0.25\r\n)}), inf).play;",
   "is_private" : null,
   "id" : "1-4Qq",
   "labels" : [
      "sequencer"
   ]
}
