supernova: fix for small audio vector sizes
[supercollider.git] / examples / misuse_and_hacks / redWorm.scd
blobb22056685ada07d5fbfe6f91fdeb4a121284668d
1 (                                               //w w w w w w w w w w w  ww
2 s.waitForBoot{{                                                                 
3         var c,i=0,j=1,                                                          
4                 syn={|f,o|SinOsc.ar(o*[1,4],LFTri.ar(f,0,pi))}.play,
5                 d=Document.allDocuments.choose.front;                   
6                 0.5.wait;                                                                       
7         loop{                                                                           
8                 d.selectRange(i.div(2)%d.string.size,1);c=d.selectedText[0];
9                 syn.set(\f,c.ascii.midicps/2,\o,c.ascii/80);    
10                 if(c.isDecDigit,{d.selectedString_((c.ascii/d.string.size).asString);j=j.neg*(c.digit+1)});
11                 i=i+j;                                                                  
12                 (1/20).wait                                                             
13         }                                                                                       
14 }                                                                                               
15 .fork(AppClock)                                                                 
16 }                                                                                               
20 // f0 // March 17th 2007