|
79 | 79 | <h2>Introduction</h2>
|
80 | 80 | <p>
|
81 | 81 | The Web MIDI API specification defines a means for web developers to
|
82 |
| - enumerate, manipulate and access MIDI devices - for example interfaces that may provide hardware MIDI ports with other devices plugged in to them and USB devices that support the USB-MIDI specification. Having a Web API for MIDI enables web applications that use existing software and |
| 82 | + enumerate, manipulate and access MIDI devices - for example, interfaces that may provide hardware MIDI ports with other devices plugged in to them and USB devices that support the USB-MIDI specification. Having a Web API for MIDI enables web applications that use existing software and |
83 | 83 | hardware synthesizers, hardware music controllers and light systems and other mechanical
|
84 | 84 | apparatus controlled by MIDI. This API has been defined with this wide variety of use cases in mind.
|
85 | 85 | </p>
|
@@ -169,7 +169,7 @@ <h2>Extensions to the <dfn>Navigator</dfn> interface</h2>
|
169 | 169 | and choose interfaces on an individual basis), although
|
170 | 170 | this is not required. The system may also choose to prompt
|
171 | 171 | (or not) based on whether system exclusive support is
|
172 |
| - requested, as system exclusive has greater privacy and |
| 172 | + requested, as system exclusive access has greater privacy and |
173 | 173 | security implications.</p>
|
174 | 174 | <p>If the user declines or the call is denied for any other reason, the Promise is rejected with a <a>DOMException</a> parameter.
|
175 | 175 | </p>
|
@@ -289,20 +289,20 @@ <h3 id="MIDIOutputMap"><dfn>MIDIOutputMap</dfn> Interface</h3>
|
289 | 289 | readonly maplike <DOMString, MIDIOutput>;
|
290 | 290 | };
|
291 | 291 | </pre>
|
292 |
| - <p><a>MIDIOutputMap</a> is a maplike interface whose value is a MIDIOutput instance and key is its ID.</p> |
| 292 | + <p>The <a>MIDIOutputMap</a> is a maplike interface whose value is a <a>MIDIOutput</a> instance and key is its ID.</p> |
293 | 293 | <p>This type is used to represent all the currently available MIDI output ports. This enables:
|
294 | 294 | <pre class="example"> // to tell how many entries there are:
|
295 | 295 | var numberOfMIDIOutputs = outputs.size;
|
296 | 296 |
|
297 | 297 | // add each of the ports to a <select> box
|
298 |
| - outputs.forEach( function( key, port ) { |
| 298 | + outputs.forEach( function( port, key ) { |
299 | 299 | var opt = document.createElement("option");
|
300 | 300 | opt.text = port.name;
|
301 | 301 | document.getElementById("outputportselector").add(opt);
|
302 | 302 | });
|
303 | 303 |
|
304 | 304 | // or you could express in ECMAScript 6 as:
|
305 |
| - for (output of outputs.values()) { |
| 305 | + for (let output of outputs.values()) { |
306 | 306 | var opt = document.createElement("option");
|
307 | 307 | opt.text = output.name;
|
308 | 308 | document.getElementById("outputportselector").add(opt);
|
@@ -566,7 +566,7 @@ <h2 id="MIDIPort"><dfn>MIDIPort</dfn> Interface</h2>
|
566 | 566 | <li><p>If the port is already closed (its <a
|
567 | 567 | data-lt="MIDIPort.connection">.connection</a> is <a
|
568 | 568 | data-lt="MIDIPortConnectionState.closed">"closed"</a>
|
569 |
| - - e.g. the port has not yet been implicitly or explictly opened, |
| 569 | + - e.g. the port has not yet been implicitly or explicitly opened, |
570 | 570 | or <a data-lt="MIDIPort.close">close()</a>
|
571 | 571 | has already been called on this <a
|
572 | 572 | >MIDIPort</a>), jump to the step
|
@@ -644,7 +644,7 @@ <h3 id="MIDIInput"><dfn>MIDIInput</dfn> Interface</h3>
|
644 | 644 | MUST be supported by all objects implementing
|
645 | 645 | <a>MIDIInput</a> interface.
|
646 | 646 | </p>
|
647 |
| - <p>If the handler is set and the state attribute is not <code>"opened"</code>, underlying implementation tries to make the port available, and change the state attribute to <code>"opened"</code>. If succeeded, <a>MIDIConnectionEvent</a> is delived to the corresponding <code>MIDIPort</code> and <code>MIDIAccess</code>. |
| 647 | + <p>If the handler is set and the state attribute is not <code>"opened"</code>, underlying implementation tries to make the port available, and change the state attribute to <code>"opened"</code>. If succeeded, <a>MIDIConnectionEvent</a> is delivered to the corresponding <code>MIDIPort</code> and <code>MIDIAccess</code>. |
648 | 648 | </dd>
|
649 | 649 | </dl>
|
650 | 650 |
|
|
0 commit comments