Unique identifiers for duplicate MIDI devices

For what it’s worth, using encapsulated identifier classes for purposes like this is probably the best way to ensure future changes won’t break existing code.

I’m using identifier classes for referencing all kinds of objects persistently. Some boil down to simple strings or numbers, others use combinations of strings, numbers and bit sets.