Spencer Salazarnew testing framework3e7be8b13 years agoHistory
33 lines · 579 B · Text
RawDownload
// 45.ck : midi event and writing to file (fail-correct)sinosc s => dac; MidiIn min;MidiMsg msg;MidiRW mrw; // open MIDI device - see 'chuck --probe'if( !min.open( 0 ) )    me.exit(); // openmrw.open( "y.txt" ); // infinite time loopwhile( true ){    // wait on event    min => now;     // loop through msg    while( min.recv( msg ) )    {	if( msg.data1 == 144 ) // note on	{            <<<"now: ", now, "msg: ", msg.data1, msg.data2, msg.data3>>>;	    std.mtof(msg.data2) => s.freq;	    msg.data3 / 128.0 => s.gain;	    mrw.write( msg, now );	}    }} 

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t