A couple of days ago I put the final touches on a settings editor that can generate sysex for changing the MPG-200 internal settings like CC mappings and midi channel etc.
I wrote everything using javascript and HTML, and initially made it generate a sysex file that you could download and send using your favourite tool.
As an experiment, I thought I'd make it possible to send the data directly to the device using the newly available WebMIDI standard. I had a few issues but now it seems to work nicely.
I have been using Google Chrome to do the development, and there are a few things to be aware of:
1) In WebMIDI you have to ask the user for access to sysex messages. In Chrome, this cannot be done if the javascript file is accessed as a local file or from a local html file (file://...). Neither can it be accessed through an insecure connection (I assume this means you have to use HTTPS).
To get around this, I installed a tiny webserver (The TinyWeb actually) locally and ran the code through it. Works like a charm.
2) You have to send the complete sysex message in one go - it must start with F0 and end with F7. You cannot send the messages in blocks so the message has to be calculated up front.
3) Running status is not allowed, as with the sysex message each message has to be self contained and complete.
The sysex editor and my WebMIDI code is found on the Xonik webside, but as I said, you cannot use the WebMIDI part directly as it is not served over HTTPS.
No comments:
Post a Comment