examples/book/digital-artists/chapter6/Listing6.14.ck
raw| 1 | // Listing 6.14 Using ChucK's built-in pitch shifter UGen, PitShift |
| 2 | |
| 3 | // run mic input through pitch shifter |
| 4 | adc => PitShift p => dac; |
| 5 | |
| 6 | // set mix to all pitch shift (no dry signal) |
| 7 | 1.0 => p.mix; |
| 8 | |
| 9 | // forever shifting pitch |
| 10 | while (1) |
| 11 | { |
| 12 | // pick a random shift across +/- 1 octave |
| 13 | Math.random2f(0.5,2.0) => p.shift; |
| 14 | 0.2 :: second => now; |
| 15 | } |
| 16 |