examples/book/digital-artists/chapter6/Listing6.2.ck
raw| 1 | // suck samples through Gain UGen into blackhole |
| 2 | adc => Gain g => blackhole; // (1) blackhole sucks samples from adc through Gain |
| 3 | |
| 4 | while (true) |
| 5 | { |
| 6 | if (g.last() > 0.9) // if it's loud enough |
| 7 | { // (2) .last() gets last sample from any UGen |
| 8 | <<< "LOUD!!!", g.last() >>>; // print it out |
| 9 | } |
| 10 | samp => now; // do this for every sample |
| 11 | } |