Created
January 22, 2016 18:08
-
-
Save bencevans/1b0dba0639921f1ce01c to your computer and use it in GitHub Desktop.
AKAI LPK25 Keyboard Events
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
const midi = require('midi') | |
var input = new midi.input() | |
input.getPortCount() | |
input.getPortName(0) | |
input.on('message', function (deltaTime, message) { | |
var info = { | |
eventCode: message[0], // 144=keydown 128=keyup | |
key: message[1], | |
weight: message[2], | |
deltaTime: deltaTime | |
} | |
console.log(info) | |
}) | |
input.openPort(0) | |
input.ignoreTypes(false, false, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment