<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>20506</bug_id>
          
          <creation_ts>2012-12-24 08:17:43 +0000</creation_ts>
          <short_desc>Do we need MIDIOutput and MIDIInput?</short_desc>
          <delta_ts>2013-01-18 15:51:02 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>AudioWG</product>
          <component>MIDI API</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>TBD</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Marcos Caceres">w3c</reporter>
          <assigned_to name="Chris Wilson">cwilso</assigned_to>
          <cc>cwilso</cc>
    
    <cc>w3c</cc>
          
          <qa_contact>public-audio</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>80553</commentid>
    <comment_count>0</comment_count>
    <who name="Marcos Caceres">w3c</who>
    <bug_when>2012-12-24 08:17:43 +0000</bug_when>
    <thetext>I&apos;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 &quot;onmessage&quot; and on &quot;send()&quot; by each interface respectively. Additionally, the &quot;type&quot; attribute of MIDIPort is already restricted to &quot;input&quot; or &quot;output&quot;, 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&apos;m missing that is not already covered?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80583</commentid>
    <comment_count>1</comment_count>
    <who name="Marcos Caceres">w3c</who>
    <bug_when>2012-12-26 00:46:31 +0000</bug_when>
    <thetext>Just thought of something... maybe MIDIPort does not need to extend EventTarget, but rather MIDIInput needs to implement it instead. You will note that &quot;window.EventTarget&quot; is not actually an object in any browser (well, in Opera, Chrome, and Safari at least). That would solve the issue of having MIDIOutput expose .addEventListener() and friends.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80584</commentid>
    <comment_count>2</comment_count>
    <who name="Marcos Caceres">w3c</who>
    <bug_when>2012-12-26 00:49:03 +0000</bug_when>
    <thetext>To be clear, what I mean is:

interface MIDIInput : MIDIPort {
             attribute EventHandler onmessage;
};
MIDIInput implements EventTarget; 


And MIDIPort becomes just:

interface MIDIPort{
 ... 
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80616</commentid>
    <comment_count>3</comment_count>
    <who name="Chris Wilson">cwilso</who>
    <bug_when>2012-12-26 19:02:13 +0000</bug_when>
    <thetext>That&apos;s essentially how it used to be, so sure.  :)

https://github.com/WebAudio/web-midi-api/commit/6f0ca73534d69f9f902bcffeda908f4d26834635</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81578</commentid>
    <comment_count>4</comment_count>
    <who name="Olivier Thereaux">olivier.thereaux</who>
    <bug_when>2013-01-18 15:51:02 +0000</bug_when>
    <thetext>Batch-closing RESOLVED MIDI issues. Reminder: midi issues now tracked at https://github.com/WebAudio/web-midi-api/issues</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>