Вопрос

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