Device issue?

Started by AjaxDoggo, Yesterday at 00:07:38

Previous topic - Next topic

AjaxDoggo

Hello~

I am running into an issue.

https://www.youtube.com/watch?v=4uHuxeLHaPQ


It seems I cannot use a device for multiple plugins. I wouldn't normally mind that fact, but for some reason, my system likes to randomly re-order my MIDI devices, causing all of my FX plugins' output devices get shifted since the order they appear in the device list changes. I can eventually fix it, but it is super obnoxious. OpenMPT isn't the only program I see affected by this issue, and I wish I could figure out a real fix on the system itself, but is there a way to programmatically prevent that? Asking for both openMPT sake, and my programs as well. Usually, if I catch it and don't save any changes to the module, I can close and reopen the program, and be unaffected, but sometimes I save out of sheer habit, and then I have to manually change all of the FX output devices again (oops!)

Saga Musix

There's some improvements coming in OpenMPT 1.32 that should prevent a few issues with device reordering, not sure if it will help in your case. You can try a test build at https://builds.openmpt.org/builds/ and give feedback if it helps you.

The source of the reordering problem is probably to be found in whatever virtual MIDI routing software you are using. MIDI devices normally don't just magically reorder themselves, so it might be worth reporting this to the author of that software. With hardware MIDI devices, the list can be reordered if devices are connected and disconnected, but I don't see a reason why virtual devices should do this, so it could be a bug in the software.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

AjaxDoggo

#2
I am not sure if it's the virtual software or my external keyboard. Despite being powered on, it will randomly not send any midi notes until I power it off and back on, which is equally annoying. either way, I will try out the experimental build and letcha know.


EDIT: OMG y'all added a metronome!

Saga Musix

If you power it off and on again, and it's connected via USB rather than 5-pin DIN, then it's definitely going to cause a device list update.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

AjaxDoggo

#4
I can officially confirm. It's my external midi keyboard (Which is USB). I just unplugged it while running 1.31.14 and everything got shifted immediately.
The latest experimental build you linked me was unaffected (Cool!!) Now the next questions are... How did you do that and why is my keyboard doing this to me???

LOL Thanks!

Saga Musix

#5
A lot of MIDI device handling code in OpenMPT (and probably also audio software, which is why you may have noticed similar issues there) is centered around just remembering the ID of the chosen device (which is simply a number), assuming that it wouldn't change while the program is in use. That was fine during the days before USB because it was pretty much impossible that the MIDI configuration could change while the computer was in use. But with devices dynamically being added and removed, their IDs can change any time the list updated. The MIDI I/O plugin in OpenMPT didn't consider that, and for OpenMPT 1.32 it has been updated to try to find a matching device with the same name as the previously active device when resuming playback, instead of blindly assuming that the same device ID still refers to the same actual MIDI device.

What also plays into that is that the classic MIDI APIs, which have remain unchanged since the Windows 3.x days essentially, have no way of notifying that a device has been added or removed, which reinforces the idea of just keeping a device ID and use it for the rest of the duration the program is used.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.