Reputation: 21
I'm trying to build a web program that allows the input of electric guitar's or other midi input. my question is, "is this possible", and what programming language would you prefer? thank in advance
Upvotes: 1
Views: 310
Reputation: 2197
It is certainly possible to do this using javascript with the Web MIDI API, though as of writing this, the Web MIDI API is only available in Chrome as an experimental feature, and it must be manually enabled. You will also need to install the Jazz plugin to enable low level MIDI support.
To make your life a bit easier, I would recommend using Wad.js. Upon initializing, Wad.js will automatically detect all connected midi devices, and store references to them in the array Wad.midiInputs
. Then, all you need to do is write a handler function to handle incoming data, and assign that function to your midi device's onmidimessage
property. For example,
Wad.midiInputs[0].onmidimessage = function(event){
console.log(event.receivedTime, event.data);
};
Full disclosure: I am the author of Wad.js. https://github.com/rserota/wad#midi-input
Upvotes: 0
Reputation: 1160
I have just tried MIDI on google-chrome Canary and it works. You just have to go to chrome://flags/#enable-web-midi and enable Web MIDI API.
Upvotes: 1
Reputation: 10368
It looks like it's possible.
There is a browser plugin by Jazz-soft which adds low level MIDI support. http://jazz-soft.net/
WebMIDI is an API supporting the MIDI protocol, enabling web applications to enumerate and select MIDI input and output devices on the client system and send and receive MIDI messages.
http://www.w3.org/TR/webmidi/
A bit of web searching also turned up something called Web MIDI API Polyfill.
Upvotes: 2