danomatika / ofxMidi

(maintained) Midi addon for openFrameworks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rtMidi Alsa Bug

like-a-bause opened this issue · comments

Hi there,
I recently noticed a Bug in the Alsa Implementation of rtMidi. When opening more than one input Port of the same device (in my case two Launchpads, or two Input Ports of an MPD32), the Inputs are not always send to the right object.
From time to time I get:
MidiInAlsa::alsaMidiHandler: unknown MIDI input error!
which in fact is an "-EAGAIN" return of Alsa. I think this means, that there is no midi data to be received, meaning, that when an midi event occurs both objects, which are registered with a callback receive the event, regardless if its the right port or not. One of them is faster in reading this out and the others gets this error.
Has anyone experienced the same issue, or can reproduce this?

Some more info. We basically have two objects of this class: http://pastebin.com/VGs84xkC
Both Objects open an distinct port with a distinct RtMidiIn Object, which is a class member. This works on Mac OSX, every Push on a Button goes to the correct corresponding Launchpad Object. On Linux the Routing is nondeterministic.
Could this be a threading Issue?

Dunno. It sounds like an issue in RtMidi. You could try filing a bug report with the RtMidi people.

I contacted Gary from Mc Gill University and gave him the link to this issue here, so others could maybe contribute.

Any luck with this? I don't have easy access to an Ubuntu machine.

I haven't heard anything from Gary yet. Since then I had no time getting into the ALSA API, myself.

Having a MIDI controller and a MIDI keyboard connected to Raspberry Pi and an OF application listening to both devices, I was lucky to get this error within 15 minutes of tweaking controls,
It ended with Segmentation fault - is there a nice way to handle the error?

Does this issue still happen? I imagine it's been fixed in newer versions of RtMidi.

Sorry, I have no idea. Didn't use this project through all these years.

On 23.10.2016 20:18, Dan Wilcox wrote:

Does this issue still happen? I imagine it's been fixed in newer
versions of RtMidi.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#19 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABcuvxRvMfW2jEWtlnVm0R8jx8oQZEe1ks5q25bkgaJpZM4Avnf5.