You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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:
Note: The iOS implementation using PGMidi provides an ofxMidiConnectionListener base class for receiving connection add/remove events, but this is leveraging the CoreMidi event system which works differently on other platforms.
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: