W3C home > Mailing lists > Public > public-audio@w3.org > October to December 2012

[Web MIDI API] Do we need MIDIOutput and MIDIInput?

From: Marcos Caceres <marcosscaceres@gmail.com>
Date: Sun, 23 Dec 2012 19:52:21 +0000
To: "public-audio@w3.org" <public-audio@w3.org>
Message-ID: <E51B83DC4E4642899DC9647873749DA5@gmail.com>
I'm wondering if we really need MIDIOutput and MIDinput to extend MIDIPort. It seems like a  bit of overkill to have to add two more additional interfaces to the platform when all that is being added is "onmessage" and on "send()" by each interface respectively. Additionally, the "type" attribute of MIDIPort is already restricted to "input" or "output", hence it feels redundant to have a whole new interface to determine the type of an object (which is already part of the base class).    

I recommend just folding MIDIPOutput and MIDIIntput back onto MIDIPort. An port of type input simply does noting when send() is invoked, and MIDIPort of type output does not receive message events.  

Is there a particular use case I'm missing that is not already covered? 

Marcos Caceres
Received on Sunday, 23 December 2012 19:52:52 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:14 UTC