Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: Re: Launchpad Spiral
name
code content
( MIDIClient.init; MIDIIn.connectAll; ~lpChan = 0; ~lpIn = MIDIClient.sources.select({arg item, i; (item.name == "Launchpad Mini")})[0]; //Pick the first launcpad mini you find ~lpOut = MIDIOut.newByName("Launchpad Mini", "Launchpad Mini"); ~lpNoteNums = Array.fill([8,8], {|i,j| j+(i*16) }); ) ( var path = { var dir = [1,0]; var list = List.new; var idx = [-1,0]; var size = 8; size.do { arg x; if(x==0, 1, 2).do { (size-x).do { idx = idx + dir; list.add(idx); }; dir = [ -1 * dir[1], dir[0] ]; // rotate }; }; list; }.value.collect({ arg x; x[0]+(x[1]*16) }); r = Routine({ inf.do{ var velocity = [127, 120, 107].choose; path.do{|note, i| ~lpOut.noteOn(~lpChan, note, velocity); 0.015.wait; ~lpOut.noteOff(~lpChan, note, velocity); } } }); TempoClock.default.sched(0, r); )
code description
For the challenge, let's make the path algorithmically =)
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