Funny enough, I was just going to start a thread about something remotely similar.
Last night I got WebMIDI working in Node.js. Nothing worth sharing yet, but that is just because I suck at JS.
Somebody with some JS chops can probably whip up new MIDI I/O objects easily. Which not only can find Push, you can look for its ports specifically and use them. Hence me hijacking your thread
This is what I found so far:
The engine JZZ.js comes from Jazz-soft and is very actively maintained:
https://jazz-soft.net/doc/JZZ/
I'm using the version from GIT:
https://github.com/jazz-soft/JZZ/tree/master/minified
I got it working by putting JZZ.js in the source path and including it with:
Code: Select all
const JZZ = require('JZZ');
Code: Select all
JZZ({sysex:true}).or('Cannot start MIDI engine!')
.openMidiIn('Ableton Push User Port').or('MIDI-In: Cannot open!')
.and(function(){ console.log('MIDI-In:', this.name()); })
.connect(function(msg){ console.log(msg.toString()); }) // and log to the console
With the code above, I think that only the last line needs a change so that it uses an outlet to spit out the Raw MIDI Bytes instead of strings. Not sure if the Hex needs converting to Integers.
I haven't gotten it working well enough to rule out any flaws. But the upsides so far: Cross-Platform, Supports the entire spec including MPE and SMF, Easy to update, supposedly can connect to the same port multiple times and I haven't gotten any "Ports in Use" conflicts on windows yet.