*** empty log message ***
[chuck-blob.git] / v2 / examples / event / kb2.ck
blobdc1695e5f1b28fcc8687aa75c2d292388712dba6
1 // computer key input, with sound
2 KBHit kb;
4 // patch
5 Impulse i => BiQuad f => dac;
6 // set the filter's pole radius
7 .99 => f.prad;
8 // set equal gain zeros
9 1 => f.eqzs;
10 // initialize float variable
11 0.0 => float v;
12 // set filter gain
13 .5 => f.gain;
15 // time-loop
16 while( true )
18     // wait on event
19     kb => now;
20     // generate impulse
21     1.0 => i.next;
23     // loop through 1 or more keys
24     while( kb.more() )
25     {
26         // set filtre freq
27         kb.getchar() => int c => Std.mtof => f.pfreq;
28         // print int value
29         <<< "ascii:", c >>>;
30     }