这是indexloc提供的服务,不要输入任何密码
Skip to content

Commit bfbbfac

Browse files
author
Michael Wilson
committed
Wrap at 80 columns
1 parent d717e08 commit bfbbfac

File tree

1 file changed

+52
-50
lines changed

1 file changed

+52
-50
lines changed

index.html

Lines changed: 52 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -218,17 +218,18 @@ <h2>
218218
</p>
219219
<p>
220220
Requesting MIDI access SHOULD prompt the user for access to MIDI
221-
devices, particularly if <a>System Exclusive</a> access is requested. In
222-
some scenarios, this permission may have already been implicitly
223-
or explicitly granted, in which case this prompt may not appear.
224-
If the user gives express permission or the call is otherwise
225-
approved, the vended Promise is resolved. The underlying system
226-
may choose to allow the user to select specific MIDI interfaces
227-
to expose to this API (i.e. pick and choose interfaces on an
228-
individual basis), although this is not required. The system may
229-
also choose to prompt (or not) based on whether <a>System Exclusive</a>
230-
support is requested, as <a>System Exclusive</a> access has greater
231-
privacy and security implications.
221+
devices, particularly if <a>System Exclusive</a> access is
222+
requested. In some scenarios, this permission may have already
223+
been implicitly or explicitly granted, in which case this prompt
224+
may not appear. If the user gives express permission or the call
225+
is otherwise approved, the vended Promise is resolved. The
226+
underlying system may choose to allow the user to select specific
227+
MIDI interfaces to expose to this API (i.e. pick and choose
228+
interfaces on an individual basis), although this is not
229+
required. The system may also choose to prompt (or not) based on
230+
whether <a>System Exclusive</a> support is requested, as <a>System
231+
Exclusive</a> access has greater privacy and security
232+
implications.
232233
</p>
233234
<p>
234235
If the user declines or the call is denied for any other reason,
@@ -358,15 +359,15 @@ <h2 id="MIDIOptions">
358359
<dd>
359360
<p>
360361
This member informs the system whether the ability to send and
361-
receive <a>System Exclusive</a> messages is requested or allowed on a
362-
given {{MIDIAccess}} object. On the option passed to
362+
receive <a>System Exclusive</a> messages is requested or allowed
363+
on a given {{MIDIAccess}} object. On the option passed to
363364
{{requestMIDIAccess()}}, if this member is set to true, but
364-
<a>System Exclusive</a> support is denied (either by policy or by user
365-
action), the access request will fail with a {{"SecurityError"}}
366-
error. If this support is not requested (and allowed), the system
367-
will throw exceptions if the user tries to send <a>System Exclusive</a>
368-
messages, and will silently mask out any <a>System Exclusive</a>
369-
messages received on the port.
365+
<a>System Exclusive</a> support is denied (either by policy or by
366+
user action), the access request will fail with a
367+
{{"SecurityError"}} error. If this support is not requested (and
368+
allowed), the system will throw exceptions if the user tries to
369+
send <a>System Exclusive</a> messages, and will silently mask out
370+
any <a>System Exclusive</a> messages received on the port.
370371
</p>
371372
</dd>
372373
<dt>
@@ -528,8 +529,8 @@ <h2 id="MIDIAccess">
528529
<dfn>sysexEnabled</dfn>
529530
</dt>
530531
<dd>
531-
This attribute informs the user whether <a>System Exclusive</a> support is
532-
enabled on this MIDIAccess.
532+
This attribute informs the user whether <a>System Exclusive</a>
533+
support is enabled on this MIDIAccess.
533534
</dd>
534535
</dl>
535536
</section>
@@ -962,9 +963,9 @@ <h3 id="MIDIInput">
962963
</li>
963964
<li>
964965
<p>
965-
If the {{MIDIAccess}} did not enable <a>System Exclusive</a> access,
966-
and the message is a <a>System Exclusive</a> message, abort this
967-
process.
966+
If the {{MIDIAccess}} did not enable <a>System Exclusive</a>
967+
access, and the message is a <a>System Exclusive</a> message,
968+
abort this process.
968969
</p>
969970
</li>
970971
<li>
@@ -1022,8 +1023,8 @@ <h3 id="MIDIOutput">
10221023
</p>
10231024
<p>
10241025
If <var>data</var> is a <a>System Exclusive</a> message, and the
1025-
{{MIDIAccess}} did not enable <a>System Exclusive</a> access, throw an
1026-
<code>InvalidAccessError</code> exception.
1026+
{{MIDIAccess}} did not enable <a>System Exclusive</a> access,
1027+
throw an <code>InvalidAccessError</code> exception.
10271028
</p>
10281029
<p>
10291030
If the port is <a data-lt=
@@ -1327,7 +1328,8 @@ <h3>
13271328
</section>
13281329
<section>
13291330
<h3>
1330-
Requesting Access to the MIDI System with <a>System Exclusive</a> Support
1331+
Requesting Access to the MIDI System with <a>System Exclusive</a>
1332+
Support
13311333
</h3>
13321334
<p>
13331335
This example shows how to request access to the MIDI system,
@@ -1414,8 +1416,8 @@ <h3>
14141416
A Simple Loopback
14151417
</h3>
14161418
<p>
1417-
This example loops all input messages on the first input port to
1418-
the first output port - including <a>System Exclusive</a> messages.
1419+
This example loops all input messages on the first input port to the
1420+
first output port - including <a>System Exclusive</a> messages.
14191421
</p>
14201422
<pre class="example">var midi = null; // global MIDIAccess object
14211423
var output = null;
@@ -1627,24 +1629,24 @@ <h2>
16271629
<li>Sending and Receiving SysEx. This is the biggest concern, because
16281630
it would be possible to write code that looked for system-specific
16291631
responses to sysex messages, which could identify the hardware
1630-
available, and then use it to download data - e.g. samples stored in
1631-
a sampler - or replace that data (erasing sample data or patches in
1632-
the device), although both these scenarios would have to be coded for
1633-
a particular device. It is also possible that some samplers might
1634-
enable a <a>System Exclusive</a> message to start recording a sample - so if
1635-
the sampler happened to have a dedicated microphone attached
1636-
(uncommon in practice, but possible), it would be possible to write
1637-
code specific to a particular device that could record a short sample
1638-
of sound and then upload it to the network without further user
1632+
available, and then use it to download data - e.g. samples stored in a
1633+
sampler - or replace that data (erasing sample data or patches in the
1634+
device), although both these scenarios would have to be coded for a
1635+
particular device. It is also possible that some samplers might enable
1636+
a <a>System Exclusive</a> message to start recording a sample - so if
1637+
the sampler happened to have a dedicated microphone attached (uncommon
1638+
in practice, but possible), it would be possible to write code
1639+
specific to a particular device that could record a short sample of
1640+
sound and then upload it to the network without further user
16391641
intervention. (You could not stream audio from the device, and most
16401642
samplers have fairly limited memory, and MIDI Sample Dump sysex is a
16411643
slow way to transfer data - it has to transcode into 7-bit - so it’s
16421644
unlikely you could listen in for long periods.) More explicit
16431645
fingerprinting is a concern, as the patch information/stored
16441646
samples/user configuration could uniquely identify the system
1645-
(although again, this requires much device-specific code; there is
1646-
not standardized “grab all patches and hash it” capability.) This
1647-
does suggest that <a>System Exclusive</a> messages are in a security
1647+
(although again, this requires much device-specific code; there is not
1648+
standardized “grab all patches and hash it” capability.) This does
1649+
suggest that <a>System Exclusive</a> messages are in a security
16481650
category of their own.
16491651
</li>
16501652
</ol>
@@ -1677,12 +1679,12 @@ <h2>
16771679
communication with high-end hardware devices, SysEx is required.
16781680
Unfortunately, some common MIDI commands are also sent as <a>System
16791681
Exclusive</a> messages (MIDI Machine Control, for example - generic
1680-
start/stop/rew/ffw commands) - and many devices use <a>System Exclusive</a>
1681-
to program patches, send advanced controller messages, download
1682-
firmware, etc., which are much-demanded scenarios for Web MIDI. Some
1683-
devices use sysex as a direct control protocol, as they can pack more
1684-
data into a single “message”, and most devices use SysEx as way to
1685-
save and restore patches and configuration information on
1682+
start/stop/rew/ffw commands) - and many devices use <a>System
1683+
Exclusive</a> to program patches, send advanced controller messages,
1684+
download firmware, etc., which are much-demanded scenarios for Web
1685+
MIDI. Some devices use sysex as a direct control protocol, as they can
1686+
pack more data into a single “message”, and most devices use SysEx as
1687+
way to save and restore patches and configuration information on
16861688
less-expensive computer storage. Several of the major music hardware
16871689
producers have expressed strong interest in using Web MIDI to provide
16881690
web-based configuration and programming interfaces to their hardware.
@@ -1718,9 +1720,9 @@ <h2>
17181720
separately in the API is a good idea, in order to more carefully
17191721
provide user security hooks. The <a data-lt=
17201722
"Navigator.requestMIDIAccess">suggested security model</a> explicitly
1721-
allows user agents to require the user's approval before giving
1722-
access to MIDI devices, although it is not currently required to
1723-
prompt the user for this approval - but it also detailed that <a>System
1723+
allows user agents to require the user's approval before giving access
1724+
to MIDI devices, although it is not currently required to prompt the
1725+
user for this approval - but it also detailed that <a>System
17241726
Exclusive</a> support must be requested as part of that request.
17251727
</p>
17261728
</section>

0 commit comments

Comments
 (0)