Question

I'm wondering if there are any libraries to read live MIDI input from a USB device and translate that data to a web-friendly format like JSON. I've come across a few that can read MIDI files, but this needs to be directly from a USB device. No sound needs to be generated, just the data from the MIDI device. Eventually the goal is to transfer live MIDI data via WebSockets. I've come across Pygame, but I'm not sure if that'll do the trick. Any suggestions?

Was it helpful?

Solution

OSC is similar to JSON and was devised for this purpose.

There are quite a few libraries that deal with OSC. For whatever it's worth, I use micro-osc with micromidi (libraries I wrote) to do what you're asking

OTHER TIPS

I made a NPAPI browser plugin that sends MIDI messages to Javascript.

Currently the MIDI messages are sent as string with comma separated values (notenumber,velocity), but you can easily convert that to JSON.

See: http://abumarkub.net/abublog/?p=754

The new Web MIDI API allows for MIDI input in JavaScript.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top