MIDI browser plugin

I made a NPAPI browser plugin that gives you access to the MIDI devices connected to your computer directly from within your browser. The plugin is built with the JUCE library.

You can download the plugin from Github or directly from here.

In the zip you find the plugin file and a simple test page. The comments in main.js explain how to use the plugin and its API. In the README file you’ll find instructions on how to install the plugin in various browsers. Currently on OSX Chrome and Safari are supported, and on Windows Chrome is supported.

The API of the plugin is rather basic:

getMIDIInputs() -> retrieves MIDI inputs as a single string, devices are separated by a comma

getMIDIOutputs() -> retrieves MIDI outputs as a single string, devices are separated by a comma

addConnection(int inputId, int outputId) -> establishes a connection between the specified MIDI devices, the id of the device corresponds to the position of the device in the string as retrieved by one of the methods above

registerCallbackObject -> passes a Javascript object to the plugin; the plugin can call the functions of this object to communicate with Javascript

cleanup() -> clears all current connections

The coming months i will implement the API as described in the W3C proposal of Jussi Kalliokoski. You can read his proposal on Github.

Eventually, the MIDI plugin will replace the Midibridge.

And the plugin will be redundant as soon as browsers support MIDI natively ;)

Note: if your project only needs to connect to MIDI outputs, the Jazz plugin might be more appropriate for you!

4 Responses to “MIDI browser plugin”


  • Very impressive work—it’s nice to see this being pushed forwards.

    Working well on OSX using Webkit :)

  • Very cool. Looking forward to playing with the full spec!

    • Thanks! But it is very unlikely that will do any further development on the plugin since the Jazz plugin now supports both MIDI in and MIDI out in all major browsers, see:

      http://jazz-soft.net/doc/Jazz-Plugin/

      • I’ve been getting reports that the Jazz plugin is not working on Mac computers, and asked Sema some time ago [1] if he knew anything about that, and whether it could be fixed. Don’t know why, but I’ve had no response.
        Also, Jussi Kalliokoski yesterday asked [2] if any of the browser manufacturers are actually working on a test implementation of his proposed standard. The public response has been a bit sluggish. Maybe things are going on behind the scenes, but I suspect that MIDI is rather low on their list of priorities, even though the necessary code is probably quite small compared to implementing the Web Audio spec.
        Maybe interesting MIDI applications require too much expertise on the part of their users. Browsers are primarily for the general public. MIDI is for musicians.
        So I think MIDI programmers will be needing a reliable, cross-platform browser plugin for some time to come.
        I’d like to get away from Java, so this MIDI browser plugin seems like a very good idea. Any chance of exposing a MIDIMessage, in the way MIDIBridge did?

        best wishes,
        James

        [1] http://jazz-soft.org/bb/viewtopic.php?f=2&t=109
        (23rd October 2012)

        [2] http://lists.w3.org/Archives/Public/public-audio/2012OctDec/0433.html

Comments are currently closed.