1 // 45.ck : midi event and writing to file (fail-correct)
8 // open MIDI device - see 'chuck --probe'
22 while( min.recv( msg ) )
24 if( msg.data1 == 144 ) // note on
26 <<<"now: ", now, "msg: ", msg.data1, msg.data2, msg.data3>>>;
27 std.mtof(msg.data2) => s.freq;
28 msg.data3 / 128.0 => s.gain;
29 mrw.write( msg, now );