<?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>18762</bug_id>
          
          <creation_ts>2012-08-31 22:43:30 +0000</creation_ts>
          <short_desc>MIDIOutput.sendMessage doesn&apos;t need a timestamp</short_desc>
          <delta_ts>2012-09-20 06:59:30 +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>WORKSFORME</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="Chris Wilson">cwilso</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>jussi.kalliokoski</cc>
    
    <cc>olivier.thereaux</cc>
    
    <cc>w3c_bugz</cc>
          
          <qa_contact>public-audio</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>73121</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Wilson">cwilso</who>
    <bug_when>2012-08-31 22:43:30 +0000</bug_when>
    <thetext>After reviewing carefully the use in practice, as well as historical usage from the Windows MIDI APIs, I believe the sendMessage() &quot;short message shortcut&quot; should not have a timestamp, in order to allow a variable length short message.  (From status-byte-only to typical 3-byte messages.)

The Windows method doesn&apos;t have this, and the overhead of using sendMIDIMessage(createMIDIMessage()) is actually not very large if you DO want the timestamp.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73216</commentid>
    <comment_count>1</comment_count>
    <who name="Jussi Kalliokoski">jussi.kalliokoski</who>
    <bug_when>2012-09-05 09:58:02 +0000</bug_when>
    <thetext>Fair enough. Actually what I want to do right now with this and Bug 18764 is to shrink the MIDIMessage interface to just contain the timestamp and the data, status and channel being the first byte. Thoughts? I&apos;m also thinking of a way to make the MIDIMessage interface a dictionary instead.

In that case we&apos;d have

sendMessage(firstByte, secondByte, thirdByte, ...)

and the longer version for more complicated messages:

sendMIDIMessage({
  timestamp: performance.now() + 1234.0,
  data: new Uint8Array([firstByte, secondByte, thirdByte, ...])
})

How&apos;s that sound?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73221</commentid>
    <comment_count>2</comment_count>
    <who name="Jussi Kalliokoski">jussi.kalliokoski</who>
    <bug_when>2012-09-05 12:15:08 +0000</bug_when>
    <thetext>Proposed changeset: https://dvcs.w3.org/hg/audio/rev/bf0e920450e6</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73239</commentid>
    <comment_count>3</comment_count>
    <who name="Chris Wilson">cwilso</who>
    <bug_when>2012-09-05 17:20:43 +0000</bug_when>
    <thetext>LGTM.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73254</commentid>
    <comment_count>4</comment_count>
    <who name="Florian Bomers">w3c_bugz</who>
    <bug_when>2012-09-05 19:31:07 +0000</bug_when>
    <thetext>just asking: doesn&apos;t the syntax allow you to define:

void sendMessage(DOMHighResTimeStamp timestamp, short status, short... data)

Then we could have a timestamp for the convenience &quot;send&quot; method, and a variable length message. Set timestamp to 0 to send it immediately.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74116</commentid>
    <comment_count>5</comment_count>
    <who name="Olivier Thereaux">olivier.thereaux</who>
    <bug_when>2012-09-20 06:59:30 +0000</bug_when>
    <thetext>Hearing no objection after over a week, closing.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>