[alsa-devel] Slow/piecewise send of sysex?
Hello.
I just created this question as a ticket https://github.com/opensrc/alsa/issues/24 but was instructed to ask here.
So:
I'm using amidi --send-hex to send data to a Commodore 64 via a CLab MIDI interface. The problem is that even with 100 bytes the probability of a buffer overrun is about 30%. I didn't find a way to throttle the send speed. I also tried sending the data in smaller chunks, but I cannot get amidi to send anything after the first chunk. I suspect it refuses to send anything if the data doesn't start with F0 i.e. sysex dump start.
If I am right about that assumption, as a workaround I could encapsulate each chunk as a full sysex dump, but that requires extra logic on the receiving side and it also wastes bandwidth, so I don't really wish to do that.
Primarily I would prefer a way to throttle the speed, but if I cannot have that, I would like to be able to send the data a few bytes at a time in a simple shell loop.
- Ville Oikarinen
Ville Oikarinen wrote:
I'm using amidi --send-hex to send data to a Commodore 64 via a CLab MIDI interface. The problem is that even with 100 bytes the probability of a buffer overrun is about 30%. I didn't find a way to throttle the send speed.
.syx files do not contain timing information.
In alsa-utils 1.1.3 or later, amidi has an option to insert a delay between F0...F7 messages.
But if your MIDI devices does not handle MIDI speeds at all, you have to put the SysEx data into a .mid file with the proper delays.
I would like to be able to send the data a few bytes at a time in a simple shell loop.
Binay data in the shell is not easy. Why not write a tool in some other language?
Regards, Clemens
On 12 July 2017 at 12:17, Clemens Ladisch clemens@ladisch.de wrote:
.syx files do not contain timing information.
Yes, I know this of course.
In alsa-utils 1.1.3 or later, amidi has an option to insert a delay between F0...F7 messages.
So it seems: the -i option, exactly what I need. Thank you, I just need to upgrade, since I'm now running 1.1.2. :)
But if your MIDI devices does not handle MIDI speeds at all, you have to put the SysEx data into a .mid file with the proper delays.
Yes, I have considered that as a backup plan, but it's just so much easier to send raw data.
Binay data in the shell is not easy. Why not write a tool in some other language?
I am using other languages. But I am invoking amidi from shell.
- Ville Oikarinen
participants (2)
-
Clemens Ladisch
-
Ville Oikarinen