MIDI Device name mangling per platform

MIDI devices don’t show up with nice names for display - they have various cruft tacked onto them to make them unique, but the exact nature of the cruft differs by platform.

For example, my Keystep 32 comes in named:

Platform I/O Name
Windows in Arturia Keystep 32 1
Windows out Arturia Keystep 32 2
Linux (ALSA) in Arturia Keystep 32: Arturia Keystep 32 MIDI 1 24:0
Linux (ALSA) out Arturia Keystep 32: Arturia Keystep 32 MIDI 1 24:0
Mac in <please let me know>
Mac out <please let me know>

On Windows a space and a port number are appended. On nix, you get a repeat of the device name and a bunch of stuff (at least with the ALSA driver), but it doesn’t differ between in and out. Thankfully there’s a ‘:’ delimiter which hopefully never appears in a real device name.

I haven’t tried Jack yet to see if things are different.

How do the names show up on a Mac? You can use Stoermelder MIDI Plug to show the names because it lets you choose both ins and outs, or use Rack Core MIDI-CV and CV-MIDI.

I don’t have a Mac to try it out, but Il need to write platform-specific demangling code to get a nice name to display. Can someone share a sample of how MIDI devices names show up in the menus of the device picker on a Mac?

I’d appreciate it.

To make it worse, as I was trying this out, swapping midi devices in and out, and it’s easy to confuse the Core modules. I’m currently looking at this:

Confused MIDI-CV

Stoermelder MIDI Plug does a better job of keeping track.

on my mac no cruft is added, in or out.

In: Keystep 37

Out: Keystep 37

for example

Thank you! That makes it a lot easier, because I don’t have to try to test on a platform I don’t have readily available.