Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALSA and JACK do not support large SysEx messages #214

Open
keinstein opened this issue Mar 31, 2020 · 9 comments
Open

ALSA and JACK do not support large SysEx messages #214

keinstein opened this issue Mar 31, 2020 · 9 comments

Comments

@keinstein
Copy link

As there were some patches that improve the support of larger SysEx messages on different backends (e.g. #91 ). However neither ALSA nor JACK support these kind of messages. While the ALSA sequencer theoretically allows larger SysEx messages. The kernel silently clears the input buffer as soon as an event could not be delivered to it. This means when the sender is to fast by a single packet about 2-3k of SysEx data gets silently dropped, when communicating with a software device.

A workaround could be to implement RawMIDI support for ALSA.
Another workaround could be to implement user defined input/output pool sizes.

@KoSv
Copy link

KoSv commented Dec 23, 2020

hi there,
I'm trying to send around 6k and my hardware device freezes (sysex massage is not complete)
where receiving is not a problem!
Is there a workaround?
greets and happy christmas! :)

@jcelerier
Copy link
Contributor

Hello,
I have a partial work on a raw midi backend with support for chunking on the https://github.com/jcelerier/libremidi fork, testing would be appreciated.

@insolace
Copy link
Contributor

Hello,

I've confirmed that the libremidi fork works. The RAW send method can send large (60-100k) sysex payloads (firmware), the current RtMidi ALSA send method cannot handle more than 1-2k messages.

@jcelerier
Copy link
Contributor

yay :)

@insolace
Copy link
Contributor

yay :)

@jcelerier Any chance you'd be willing to port your fix into rtmidi and make a pull request?

@jcelerier
Copy link
Contributor

Well, it's more of a complete rewrite than a fix, I just don't have enough time for that sorry :(

@insolace
Copy link
Contributor

I figured as much when I looked at your Raw Send code. I wish I had the time to do this myself, but for now we will have to hold off on releasing Linux versions of our editors until this issue is fixed.

@keinstein
Copy link
Author

@jcelerier Did I read libremidi right that you have the possibility to configure the transfer rate by inserting an artificial sleep in the ALSA sending routine? This could be a compromise which is much easier to backport.

@jcelerier
Copy link
Contributor

yes pretty much, but that's with the "raw" alsa api, not the seq one (I remember trying and failing to make it work there though I could just have missed something simple... that was some months ago, it's not entirely clear in my mind). All the relevant code is there, feel free to backport: https://github.com/jcelerier/libremidi/blob/master/include/libremidi/detail/raw_alsa.hpp#L447

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants