supernova: fix for small audio vector sizes
[supercollider.git] / examples / pieces / DreamHouse.scd
blob8f05680dd8b4377e407f8deba86b832b025545c0
1 //Sam Pluta - 2007
2 //A poor simulation of LaMonte's Dream House, found on Church St. in New York
3 //No matter what you think of this patch, you should go check out the real thing!
4 //If you want to understand the math, read the actual title of the piece
5 //This will not be good in headphones - use speakers and walk around the room
8 c=0;
9 d=IdentitySet.new;
10 (224..288).do{arg i;
11         if((((i*(9/8))/((i*(9/8)).floor))==1.0)&&((i*(9/8))<289),{
12                 d.add(i);
13                 d.add((i*(9/8)).asInteger);
14                 c=c+1;
15         });
16         if((i.isPrime),{
17                 d.add(i);
18                 c=c+1;
19         });
20         if(i%2==1.0,{
21                 if(((i/2).asInteger.isPrime),{
22                         d.add(i);
23                         c=c+1;
24                 })
25         });
26         if(i%4==1.0,{
27                 if(((i/4).asInteger.isPrime),{
28                         d.add(i);
29                         c=c+1;
30                 })
31         });
32         if(i%8==1.0,{
33                 if(((i/8).asInteger.isPrime),{
34                         d.add(i);
35                         c=c+1;
36                 })
37         });
39 d=d.asArray;
40 d.sort;
41 d=d*10;
42 d.do{arg item, i;
43         { Out.ar(2.rand, SinOsc.ar(item, 0, 0.006), ((2/d.size)*i-1).postln)  }.play;  //if you have more than 2 speakers, change the 2.rand to n.rand, where n is the number of speakers you have