Spencer Salazarnew testing framework3e7be8b13 years agoHistory
37 lines · 636 B · Text
RawDownload
// 47.ck : midi write (fail-correct) sinosc s => dac; MidiIn min;MidiMsg msg;MidiMsgOut mrw;  // use MidiMsgOut // open MIDI deviceif( !min.open( 0 ) )    me.exit(); // open for writemrw.open( "z.txt" ); int count; // 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.data1, msg.data2, msg.data3 >>>;            std.mtof(msg.data2) => s.freq;            msg.data3 / 128.0 => s.gain;            mrw.write( msg, now );            //<<<count + 1 => count>>>;	}    }} 

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