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?

有帮助吗?

解决方案

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

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top