Bugzilla – Bug 17724
MIDI API naming
Last modified: 2012-11-15 17:24:25 UTC
Currently, we have MIDIDevice, MIDIInputDevice and MIDIOutputDevice which can be misleading as they don't necessarily relate to devices per se, but instead they can be just MIDI ports of a single device. There has been quite a lot of discussion about this on the list. (Maybe someone/me can add links later, I'm a bit in a hurry now)
I was thinking about simplifying this a bit; At first I thought about renaming MIDIDevice to MIDIInterface, but that can be misleading as well, because you can have multiple ports in a single interface, and sometimes MIDI controllers are referred to as MIDI interfaces. Hence I'd suggest the following:
MIDIDevice -> MIDIPort
MIDIInputDevice -> MIDIInput
MIDIOutputDevice -> MIDIOutput
Also, Dom pointed out that the 'device' prefix in the properties of the MIDIDevice interface may be redundant, so I'd suggest we drop that as well.
I think this might help clear up some confusion. I would suggest keeping "Port" as part of the name for the input and output ports, i.e.:
MIDIDevice -> MIDIPort
MIDIInputDevice -> MIDIInputPort
MIDIOutputDevice -> MIDIOutputPort
(In reply to comment #1)
> I think this might help clear up some confusion. I would suggest keeping
> "Port" as part of the name for the input and output ports, i.e.:
> MIDIDevice -> MIDIPort
> MIDIInputDevice -> MIDIInputPort
> MIDIOutputDevice -> MIDIOutputPort
Hmm, I decided to drop the "Port" suffix anyway as a MIDIInput/MIDIOutput can't really be anything other than a port in this case. Changes applied in: https://dvcs.w3.org/hg/audio/rev/df28ddef0c73
"device" prefixes removed:
(I forgot to include deviceType at the first attempt ;)
Marking as FIXED, will close within a week if there is no objection.
(In reply to comment #4)
> Sounds uncontroversial.
> Marking as FIXED, will close within a week if there is no objection.
I'm still not a fan of this naming. "MIDIInput" could be a representation of a port, it could be a buffer of data, ... I still think it is clearer if "Port" is appended on the Input and Output types. Do we have other examples of how types are described from elsewhere in the platform?
I withdraw my object.
(In reply to comment #6)
> I withdraw my object.
Anything in particular convinced you?
It now seems we have reached consensus with no other objection in almost a month. Closing.
(In reply to comment #7)
> (In reply to comment #6)
> > I withdraw my object.
> Anything in particular convinced you?
Looking at it in practice, it's not quite as bad as I thought it would be. Still not my preferred pattern, but not worth fighting for alone.