Interfacing a midi keyboard or other real-time midi input with javascript?

Jon Biz picture Jon Biz · Jun 29, 2011 · Viewed 10.3k times · Source

I want to create a simple visualization tool that would allow to represent my playing a midi keyboard on the screen. I play a relatively novel instrument type, called the harmonic table:

http://en.wikipedia.org/wiki/Harmonic_table_note_layout

http://www.soundonsound.com/newspix/image/axis49.jpg

And want to build tools to ease their use and to teach others how to use them.

However, I can't find a good way to get get midi into javascript environment (or, for that matter, Flash, or Java without a large helping of jiggery-pokery slightly beyond my reach, and the use of code from what look to be rather stale and abandoned open source projects. Neither language I am too enthused to work in for this project in any case).

Is there a suitable library or application that I have missed, that will enable me to do this?

Answer

Jon Biz picture Jon Biz · Jun 30, 2011

While searching around for another solution (Flash based, using the functions of the Red5 Open source flash server - really ugly, but I'm desperate at this point) I found someone who had done exactly what I needed using Java to interface with the hardware. They had started with a flash solution and recently ported to Javascript. Yay!

http://www.abumarkub.net/abublog/?p=505

Don't let the caveats about 'proof of concept' discourage you: the basic functionality appears solid, at least with everything I have been able to throw at it.

So now I'm on my way, and so is anyone else who want to build javascript based midi interfaces/synths/what have you.

I can manipulate real-time midi in javascript! This is much better than flying cars and jetboots.