Bug 17724 - MIDI API naming
MIDI API naming
Status: CLOSED FIXED
Product: AudioWG
Classification: Unclassified
Component: MIDI API
unspecified
PC Linux
: P2 normal
: TBD
Assigned To: This bug has no owner yet - up for the taking
public-audio
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-09 17:55 UTC by Jussi Kalliokoski
Modified: 2012-11-15 17:24 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jussi Kalliokoski 2012-07-09 17:55:32 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.
Comment 1 Chris Wilson 2012-07-10 22:45:38 UTC
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
Comment 2 Jussi Kalliokoski 2012-08-12 14:47:32 UTC
(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
Comment 3 Jussi Kalliokoski 2012-08-12 15:04:00 UTC
"device" prefixes removed:
 * https://dvcs.w3.org/hg/audio/rev/8a31db30feb2
 * https://dvcs.w3.org/hg/audio/rev/6e7e48ed2d82

(I forgot to include deviceType at the first attempt ;)
Comment 4 Olivier Thereaux 2012-08-13 09:17:48 UTC
Sounds uncontroversial. 

Marking as FIXED, will close within a week if there is no objection.
Comment 5 Chris Wilson 2012-08-13 18:12:26 UTC
(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?
Comment 6 Chris Wilson 2012-10-17 23:45:29 UTC
I withdraw my object.
Comment 7 Olivier Thereaux 2012-11-15 08:27:48 UTC
(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.
Comment 8 Chris Wilson 2012-11-15 17:24:25 UTC
(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.