Created
December 28, 2014 17:37
-
-
Save DatanoiseTV/89b389efe82329f3f61c 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
midi = require('midi'), | |
input = new midi.input(), | |
output = new midi.output(), | |
com = require("serialport"); | |
serialPort = new com.SerialPort("/dev/tty.usbmodem261", { | |
baudrate: 115200, | |
}); | |
input.openVirtualPort("My Virtual Midi Input"); | |
var b = new Buffer(7); | |
input.on('message', function(deltaTime, message) { | |
new Buffer("AxoM").copy(b); | |
new Buffer(message).copy(b,4); | |
serialPort.write(b); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment