| 1 |
// Listing 7.13 Experimenting with the parameters of one particular shaker preset |
| 2 |
|
| 3 |
// Mess with the parameters of the (1) "Quarters in coffee mug" preset |
| 4 |
Shakers shak => dac; |
| 5 |
17 => shak.preset; |
| 6 |
|
| 7 |
// then fiddle around with #objects and damping |
| 8 |
while (1) { |
| 9 |
Math.random2f(0.0,128.0) => shak.objects; // (2) Random number of quarters |
| 10 |
Math.random2f(0.0,1.0) => shak.decay; // (3) Random amount of damping (decay time) |
| 11 |
<<< "#Objects=", shak.objects(), "damp=", shak.decay() >>>; |
| 12 |
1.0 => shak.energy; |
| 13 |
1.0 :: second => now; |
| 14 |
} |
| 15 |
|
| 16 |
|