{"id":754,"date":"2012-03-26T23:34:17","date_gmt":"2012-03-26T22:34:17","guid":{"rendered":"http:\/\/abumarkub.net\/abublog\/?p=754"},"modified":"2015-08-22T13:54:59","modified_gmt":"2015-08-22T12:54:59","slug":"midi-browser-plugin","status":"publish","type":"post","link":"https:\/\/abumarkub.net\/abublog\/?p=754","title":{"rendered":"MIDI browser plugin"},"content":{"rendered":"<p><strong>Deprecated, please use Chris Wilson&#8217;s <a target=\"blank\" href=\"https:\/\/github.com\/cwilso\/WebMIDIAPIShim\">WebMIDIAPI Shim<\/a><\/strong> 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<\/p>\n<p><a href=\"http:\/\/www.rawmaterialsoftware.com\/juce.php\" title=\"abumarkub MIDIPlugin built with JUCE\" target=\"_blank\">JUCE<\/a> library. You can download the plugin from <a href=\"https:\/\/github.com\/abudaan\/MIDIPlugin\" title=\"abumarkub MIDIPlugin Github\" target=\"_blank\">Github<\/a> or directly from <a href=\"https:\/\/github.com\/abudaan\/MIDIPlugin\/zipball\/master\" title=\"abumarkub MIDIPlugin download\">here<\/a>. In the zip you find the plugin file and a simple <a href=\"http:\/\/abumarkub.net\/midiplugin\" title=\"abumarkub MIDI plugin test page\" target=\"_blank\">test page<\/a>. The comments in <a href=\"https:\/\/github.com\/abudaan\/MIDIPlugin\/blob\/master\/main.js\" title=\"abumarkub MIDI plugin\" target=\"_blank\">main.js<\/a> explain how to use the plugin and its API. In the <a href=\"https:\/\/github.com\/abudaan\/MIDIPlugin\/blob\/master\/README\" title=\"abumarkub MIDI plugin readme\" target=\"_blank\">README<\/a> file you&#8217;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. <!--more--> The API of the plugin is rather basic:<\/p>\n<p><code>getMIDIInputs()<\/code> -> retrieves MIDI inputs as a single string, devices are separated by a comma <code>getMIDIOutputs()<\/code> -> retrieves MIDI outputs as a single string, devices are separated by a comma <code>addConnection(int inputId, int outputId)<\/code> -> 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 <code>registerCallbackObject<\/code> -> passes a Javascript object to the plugin; the plugin can call the functions of this object to communicate with Javascript <code>cleanup()<\/code> -> clears all current connections The coming months i will implement the API as described in the W3C proposal of <a href=\"http:\/\/avd.io\/#about-me\" title=\"abumarkub Jussi Kalliokoski\" target=\"_blank\">Jussi Kalliokoski<\/a>. You can read his proposal on <a href=\"https:\/\/gist.github.com\/1752949\" title=\"Jussi Kalliokoski W3C MIDI proposal\" target=\"_blank\">Github<\/a>. Eventually, the MIDI plugin will replace the <a href=\"http:\/\/abumarkub.net\/abublog\/?page_id=399\" title=\"Midibridge\" target=\"_blank\">Midibridge<\/a>. And the plugin will be redundant as soon as browsers support MIDI natively \ud83d\ude09 <strong>Note:<\/strong> if your project only needs to connect to MIDI outputs, the <a href=\"http:\/\/jazz-soft.net\/\" title=\"Jazz MIDI plugin\" target=\"_blank\">Jazz plugin<\/a> might be more appropriate for you!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Deprecated, please use Chris Wilson&#8217;s WebMIDIAPI Shim 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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,9],"tags":[],"class_list":["post-754","post","type-post","status-publish","format-standard","hentry","category-javascript","category-midi"],"_links":{"self":[{"href":"https:\/\/abumarkub.net\/abublog\/index.php?rest_route=\/wp\/v2\/posts\/754","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/abumarkub.net\/abublog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/abumarkub.net\/abublog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/abumarkub.net\/abublog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/abumarkub.net\/abublog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=754"}],"version-history":[{"count":48,"href":"https:\/\/abumarkub.net\/abublog\/index.php?rest_route=\/wp\/v2\/posts\/754\/revisions"}],"predecessor-version":[{"id":1032,"href":"https:\/\/abumarkub.net\/abublog\/index.php?rest_route=\/wp\/v2\/posts\/754\/revisions\/1032"}],"wp:attachment":[{"href":"https:\/\/abumarkub.net\/abublog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=754"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/abumarkub.net\/abublog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=754"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/abumarkub.net\/abublog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=754"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}