src/test/01-Basic/38.ck.disabled
raw| 1 | // 38.ck : midi (fail-correct) |
| 2 | |
| 3 | MidiOut mout; |
| 4 | MidiMsg msg; |
| 5 | |
| 6 | // open (see 'chuck --probe') |
| 7 | if( !mout.open( 0 ) ) |
| 8 | { |
| 9 | <<<"bad">>>; |
| 10 | me.exit(); |
| 11 | } |
| 12 | |
| 13 | // infinite time loop |
| 14 | while( true ) |
| 15 | { |
| 16 | // make MIDI msg |
| 17 | 144 => msg.data1; |
| 18 | std.rand2( 10, 80 ) => msg.data2; |
| 19 | std.rand2( 40, 100 ) => msg.data3; |
| 20 | |
| 21 | // send it |
| 22 | mout.send( msg ); |
| 23 | |
| 24 | // wait |
| 25 | 100::ms => now; |
| 26 | } |
| 27 |