-
Notifications
You must be signed in to change notification settings - Fork 72
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
Reordering reconnected MIDI devices #82
Comments
This addon was originally written with a simple "open some ports and run for awhile" approach without any deeper event handling. You are running into the need for this now. :) ofxMidi doesn't do this automatically for you, but it should be possible. You would basically need to detect when a device is disconnected, then manually close/reopen all ports, possibly using the previous device name to find it's new index. I would suggest looking into the latest version of RtMidi which may have added some functionality to help, then we can look into strategies to add support within ofxMidi, at the very least some extra even handling: https://www.music.mcgill.ca/~gary/rtmidi/ Note: The iOS implementation using PGMidi provides an https://github.com/danomatika/ofxMidi/blob/master/src/ofxMidi.h#L18 |
Thanks for the tips, I'll look into it when I get the opportunity |
Hi, I've been using ofxMidi happily in my app vooku/skinny but come across this problem when implementing GUI for MIDI devices. I specifically encountered this on Windows.
When I connect multiple devices, they get a number appended to their name.
However if I disconnect one, the numbers get redistributed.
This poses a problem when I try to access the same device again (to disconnect), but have no persistent handle. Have I missed something? Is this because of one of the underlying libraries?
The MIDI input still works however, so there must be something below the layers that I have looked into.
The text was updated successfully, but these errors were encountered: