Simplify the Web MIDI API spec a bit.
authorJussi Kalliokoski <jussi.kalliokoski@gmail.com>
Tue, 05 Jun 2012 13:56:15 +0300
changeset 73 db8f0473c76f
parent 72 afb5ef123c50
child 74 902e92d5d069
Simplify the Web MIDI API spec a bit.

* Removed references to MediaStreams, integration with them has been decided
to be added on a later date.
* Renamed the API to Web MIDI API as discussed.
* Made the properties of MIDIMessage writable.
* Made the data argument of createMIDIMessage optional.
midi/specification.html
--- a/midi/specification.html	Mon Jun 04 17:25:08 2012 -0700
+++ b/midi/specification.html	Tue Jun 05 13:56:15 2012 +0300
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
   <head>
-    <title>MIDI API</title>
+    <title>Web MIDI API</title>
     <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
 
     <style media="all">
@@ -52,7 +52,7 @@
     <section class="informative">
       <h2>Introduction</h2>
       <p>
-        The MIDI API specification defines a means for web developers to
+        The Web MIDI API specification defines a means for web developers to
         enumerate, manipulate and access MIDI devices. Having an API for MIDI
         gives a means to make various applications using existing software and
         hardware synths, as well as light systems and other mechanical
@@ -101,11 +101,6 @@
         <a href="http://www.khronos.org/registry/typedarray/specs/latest/">Typed Array Specification</a>.
       </p>
       <p>
-        The term <dfn><a href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#mediastreamtrack">
-        MediaStreamTrack</a></dfn> is defined in the
-        <a href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html">getUserMedia Specification</a>.
-      </p>
-      <p>
         The term <dfn><a href=
         "http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/HighResolutionTime/Overview.html#sec-DOMHighResTimeStamp"
         >DOMHighResTimeStamp</a></dfn> is defined in the <a href=
@@ -243,7 +238,7 @@
             </li>
           </ol>
         </dd>
-        <dt><a>MIDIMessage</a> createMIDIMessage(short status, Uint8Array
+        <dt><a>MIDIMessage</a> createMIDIMessage(short status, Uint8Array?
                                     data, DOMHighResTimeStamp? timestamp,
                                     short? channel)</dt>
         <dd>
@@ -282,8 +277,7 @@
 
             <li>
               <p>
-                Let <var>channel</var> be the <code>short</code> argument,
-                if not null. Else let <var>channel</var> be zero.
+                Let <var>channel</var> be the <code>short</code> argument.
               </p>
             </li>
 
@@ -440,13 +434,6 @@
               this MUST be <code>"INPUT"</code>.
             </p>
           </dd>
-          <dt>readonly attribute MediaStreamTrack stream</dt>
-          <dd>
-            <p>
-              A <code>MediaStreamTrack</code> representing the corresponding
-              <code><a>MIDIInputDevice</a></code>.
-            </p>
-          </dd>
           <dt class="no-docs">[TreatNonCallableAsNull] attribute
                               Function? onmidimessage</dt>
           <dd>
@@ -480,21 +467,6 @@
               signifying whether the operation was succesful.
             </p>
           </dd>
-          <dt>void addInput(MediaStreamTrack stream)</dt>
-          <dd>
-            <p>
-              Connects a <code>MediaMediaStreamTrack</code> to the
-              <code><a>MIDIOutputDevice</a></code>, piping all the MIDI messages
-              in the track to the output device.
-            </p>
-          </dd>
-          <dt>void removeInput(MediaStreamTrack stream)</dt>
-          <dd>
-            <p>
-              Removes a connection to a <code>MediaMediaStreamTrack</code> from
-              the <code><a>MIDIOutputDevice</a></code>.
-            </p>
-          </dd>
         </dl>
       </section>
     </section>
@@ -511,19 +483,19 @@
             occured, will occur or should occur.
           </p>
         </dd>
-        <dt>readonly attribute short status</dt>
+        <dt>attribute short status</dt>
         <dd>
           <p>
             The status code of the MIDI message.
           </p>
         </dd>
-        <dt>readonly attribute Uint8Array data</dt>
+        <dt>attribute Uint8Array data</dt>
         <dd>
           <p>
             A Uint8Array signifying the data the message contains.
           </p>
         </dd>
-        <dt>readonly attribute short channel</dt>
+        <dt>attribute short channel</dt>
         <dd>
           <p>
             The MIDI channel of the message.