Created
November 7, 2016 20:51
-
-
Save magnusdahlstrand/971119b150471ef9e96d10146b918e54 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MidiIn min; | |
MidiOut mou; | |
MidiMsg msg; | |
2 => int input_device; | |
1 => int output_device; | |
if( me.args() ) me.arg(0) => Std.atoi => input_device; | |
if( me.args() ) me.arg(1) => Std.atoi => output_device; | |
if(!min.open(input_device)) me.exit(); | |
if(!mou.open(output_device)) me.exit(); | |
<<< "Midi input: ", min.name() >>>; | |
<<< "Midi output: ", mou.name() >>>; | |
while(true) { | |
min => now; | |
while(min.recv(msg)) { | |
<<< "Input", msg.data1 >>>; | |
mou.send(msg); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment