Closed shimpe closed 3 years ago
Do you want sysex_interval to be specified in milliseconds?
yes that sounds ok to me
hello, I started looking into it - however from what I could see from the source code of amidi.c, it uses the raw alsa api while this library was made with the higher-level sequencer API so it's going to need another backend from my understanding.
I prototyped the following API, would that be good for you ? https://github.com/jcelerier/RtMidi17/blob/feature/chunking/tests/unit/midi_out.cpp#L14
(the "wait" function can be used to sleep, or make a spinner thing run in your gui for instance)
Looks good to me! Thanks for looking into it.
okay, took the better part of my afternoon but I'm starting to get a midi output in raw ALSA. If you fancy testing with your hardware, it's with the https://github.com/jcelerier/RtMidi17/tree/feature/chunking/ branch
(please test with hardware that will support incomplete / bad transfers in case I have a bug, I don't want to brick your stuff x))
ouch... the brick comment made me nervous to try it :)
I'm merging as-is and will mark it as experimental in the next release, hopefully there can be some testing (as I don't really have any hardware to try this on my side :/)
When sending large sysex messages (> 1MB, containing e.g. an OS update) to my hardware synth, I need the option to configure a maximum buffer size and minimum delay between sending successive buffers. Sending the complete message at once fails because of (presumably) hardware limitations in the synth.
Large sysex messages should be divided in chunks of size sysex_bufsize and these chunks should be sent one by one, with a sysex_interval sleep in between the sends.
So far the only tool on linux (that I'm aware of) that supports this is amidi from the alsa-utils, see https://git.alsa-project.org/?p=alsa-utils.git;a=blob;f=amidi/amidi.c;hb=HEAD
On windows the midi-ox tool supports configuring buffer size, and on MAC-OS sysex librarian also supports setting a buffer size.