Receving & saving a MIDI sysex dump?

Hi all - I’m interested in configuring the organelle to receive and then save sysex data from my Meris pedals so that I can ‘catch’ and then later recall preset settings from the pedals associated with my Organelle patches. I’ve implemented this already in terms of CC messages, but that’s not very elegant - to change ‘presets’ now I just send a burst of CC mesages to dictate all the parameters of the pedal. This has a few unwanted side effects, and the pedals support sysex dump and receive of internal presets, so I think that’s the way to go.

My question is - what data structure should I be thinking about piping the received data from the MIDI input to to save it, and how do I access that again to send it back to the pedal at a later time? Has anybody implemented something like this before?

1 Like

Pd has a [sysexin] object which I have not used but I assume it just outputs a stream of MIDI bytes, similar to [midirealtimein]. you could write those bytes to a text file using [textfile] object (one byte per line). Then when you want to recall, send them out byte by byte using [midiout]. I don’t know if [sysexin] outputs the 0xF0 (240 in decimal) sysex start byte, so you might need to prepend the transmission with this.