Midi recall

Hi,

Amazing lib, love the way it makes the web midi api easy to use.

I think a full recall of the connected midi device could be something really useful.

Right now I'm storing the patches/values as a json but I didn't found yet the proper method to update it in the midi connected device at once.

I tried to iterate through all the parameters using a delay between update and update (like this the midi connected device do not crash) but it sounds a bit hacky to me.

It would be great to have an optimised method to the job... or probably I'm missing something?

Any tip about this practice is welcome,

Best

Comments

  • Hello Andrea,

    MIDI devices are widely different. As far as I know, there is no normalized way to retrieve all settings from any device. If you want to save and restore all settings, I believe you will have to send a system exclusive (sysex) message to ask your device to dump all its data. Later, you will send another such sysex message to restore the data. However, the way this is done is manufacturer-specific. So, there is no standard way for WebMidi.js to do it.

    Maybe somebody else here has another idea?

  • Thanks for the prompt response Jean-Philippe,

    Effectively this sounds as the proper way to do it. I'm going to investigate more on how to handle sysex with the stuff I want to control.

  • Hi Andrea,

    I am working on a small React app to interact with a few MIDI capable guitar pedals.

    Something that I am doing in my own project is saving the state of the MIDI connections, MIDI channels, and MIDI capable guitar pedal settings to localStorage in a JSON object. Basically, anytime I move a knob, add or remove a pedal, the state is saved to localeStorage.

    When the page is reloaded, the state of the various components will pull the state from localStorage.

    This seems to work for now and also assumes that I am using the same connections each time I start up the app.

    Kind Regards,

    Raj

  • edited March 27

    Thanks for the feedback @Rajan Gordon Davis. The only caveat I can see is that if your devices changes state while not connected, the changes will not be reflected in the localStorage. This may or may not be an issue, depending on the user's needs.

Sign In or Register to comment.