Multiple MIDI device naming confusion (Mac OS)

Status
Not open for further replies.

vince.cimo

Well-known member
Hi, I'm using a number of teensy usbMidi devices and am running into the issue of Mac OS confusing which device is which. I've tried renaming the devices to unique identifiers in the name.c, but strangely, unless I go into the Mac Audio MIDI Setup and delete all the cached devices, Mac will wrongly assign the device.

For example, let's say I've named the devices 'Device 1' and 'Device 2' in name.c:

Device 1 (on first plug shows up correctly)
Device 2 (on first plug shows up correctly)

---unplug, replug---

Device 1 (now shows as Device 2)
Device 2 (now shows as Device 1)

---unplug, clear all cached devices---

Device 1 (now shows as Device 1)
Device 2 (now shows as Device 2)

Is there any reliable way to fix this issue? Right now my workaround is to delete the cached devices, but it's very annoying and makes it unreliable to use the devices in a performance situation.
 
Tested in MacOS Monterey, can confirm there is an issue.

Truthfully I believe something has changed recently in MacOS, this was never an issue before, reason why I think something has changed is because you used to have to delete a device from Audio MIDI Setup in order for a name change to even take effect because it would be cached to that device. Now whenever you change the name in the sketch and reupload your code the name change is already there without you having to do anything. This was even documented in the Teensy usbMIDI reference page here: https://www.pjrc.com/teensy/td_midi.html

I can only speculate that the way that Core MIDI is now pulling the device name has been changed since there has been plenty of modifications to it with the addition of support for MIDI 2.0 and a ton of stuff has been deprecated as well to coincide with that. That being said, I'm not even sure if there's anything that can be done on the Teensy side since it is reporting itself correctly and the MIDI name is derived from the product name. This seems like more of an issue with Apple's implementation than anything else, perhaps a bug report can be submitted there.

The only work around I can think of besides using a different USB Type for each device is to name the devices the same thing then change their names in Audio MIDI Setup instead, when I did it this way the devices didn't get mixed up even after unplugging and replugging them several times in different orders.
 
Status
Not open for further replies.
Back
Top