| 1 |
// white noise to Pan2 (stereo) to dac |
| 2 |
Noise n => Pan2 p => dac; |
| 3 |
// pan type; 1 is equal power panning |
| 4 |
// <<< "pan type:", p.panType() >>>; |
| 5 |
// not too loud |
| 6 |
.1 => n.gain; |
| 7 |
|
| 8 |
// variable |
| 9 |
0.0 => float t; |
| 10 |
// smaller == smoother |
| 11 |
10::ms => dur T; |
| 12 |
|
| 13 |
// print |
| 14 |
<<< "holding pan at center for 1 second...", "" >>>; |
| 15 |
// hold the pan to be in the middle first |
| 16 |
1::second => now; |
| 17 |
|
| 18 |
// print |
| 19 |
<<< "panning left <-> right...", "" >>>; |
| 20 |
// time loop |
| 21 |
while( true ) |
| 22 |
{ |
| 23 |
// pan goes from -1 (left) to 1 (right) |
| 24 |
Math.sin(t) => p.pan; |
| 25 |
// increment t (scaling by T) |
| 26 |
T / second * 2.5 +=> t; |
| 27 |
// advancde time |
| 28 |
T => now; |
| 29 |
} |