More MIDI API specificity.
Specified MIDIAccess::createMessage() properly,
including the steps the UA must take.
--- a/midi/specification.html Wed May 23 15:17:48 2012 +0300
+++ b/midi/specification.html Wed May 23 15:42:00 2012 +0300
@@ -237,13 +237,61 @@
</ol>
</dd>
<dt><a>MIDIMessage</a> createMIDIMessage(short status, Uint8Array
- data, long? timestamp)</dt>
+ data, long? timestamp, short? channel)</dt>
<dd>
<p>
Creates and returns a new <code><a>MIDIMessage</a></code> according
to the specified parameters.
</p>
-<!-- TODO: Specify the steps the UA is required to take. -->
+
+ <p>
+ When the
+ <dfn id="midiaccess-create-midi-message"><code>createMIDIMessage()</code></dfn>
+ is invoked, the user agent MUST run the following steps:
+ </p>
+
+ <ol>
+ <li>
+ <p>
+ Let <var>status</var> be the <code>short</code> argument.
+ </p>
+ </li>
+
+ <li>
+ <p>
+ Let <var>data</var> be the <code>Uint8Array</code> argument.
+ </p>
+ </li>
+
+ <li>
+ <p>
+ Let <var>timestamp</var> be the
+ <code>long</code> argument, if not null. Else let
+ <var>timestamp</var> be the current time as the amount of
+ milliseconds from the UNIX Epoch.
+ </p>
+ </li>
+
+ <li>
+ <p>
+ Let <var>channel</var> be the <code>short</code> argument,
+ if not null. Else let <var>channel</var> be zero.
+ </p>
+ </li>
+
+ <li>
+ <p>
+ Let <var>message</var> be a new <code><a>MIDIMessage</a></code>
+ with <var>status</var>, <var>data</var>, <var>timestamp</var>
+ and <var>channel</var> assigned to their corresponding
+ properties of the <var>message</var>.
+ </p>
+ </li>
+
+ <li>
+ <p>Return <var>message</var></p>
+ </li>
+ </ol>
</dd>
</dl>
</section>