@@ -218,17 +218,18 @@ <h2>
218
218
</ p >
219
219
< p >
220
220
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.
232
233
</ p >
233
234
< p >
234
235
If the user declines or the call is denied for any other reason,
@@ -358,15 +359,15 @@ <h2 id="MIDIOptions">
358
359
< dd >
359
360
< p >
360
361
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
363
364
{{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.
370
371
</ p >
371
372
</ dd >
372
373
< dt >
@@ -528,8 +529,8 @@ <h2 id="MIDIAccess">
528
529
< dfn > sysexEnabled</ dfn >
529
530
</ dt >
530
531
< 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.
533
534
</ dd >
534
535
</ dl >
535
536
</ section >
@@ -962,9 +963,9 @@ <h3 id="MIDIInput">
962
963
</ li >
963
964
< li >
964
965
< 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.
968
969
</ p >
969
970
</ li >
970
971
< li >
@@ -1022,8 +1023,8 @@ <h3 id="MIDIOutput">
1022
1023
</ p >
1023
1024
< p >
1024
1025
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.
1027
1028
</ p >
1028
1029
< p >
1029
1030
If the port is < a data-lt =
@@ -1327,7 +1328,8 @@ <h3>
1327
1328
</ section >
1328
1329
< section >
1329
1330
< 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
1331
1333
</ h3 >
1332
1334
< p >
1333
1335
This example shows how to request access to the MIDI system,
@@ -1414,8 +1416,8 @@ <h3>
1414
1416
A Simple Loopback
1415
1417
</ h3 >
1416
1418
< 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.
1419
1421
</ p >
1420
1422
< pre class ="example "> var midi = null; // global MIDIAccess object
1421
1423
var output = null;
@@ -1627,24 +1629,24 @@ <h2>
1627
1629
< li > Sending and Receiving SysEx. This is the biggest concern, because
1628
1630
it would be possible to write code that looked for system-specific
1629
1631
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
1639
1641
intervention. (You could not stream audio from the device, and most
1640
1642
samplers have fairly limited memory, and MIDI Sample Dump sysex is a
1641
1643
slow way to transfer data - it has to transcode into 7-bit - so it’s
1642
1644
unlikely you could listen in for long periods.) More explicit
1643
1645
fingerprinting is a concern, as the patch information/stored
1644
1646
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
1648
1650
category of their own.
1649
1651
</ li >
1650
1652
</ ol >
@@ -1677,12 +1679,12 @@ <h2>
1677
1679
communication with high-end hardware devices, SysEx is required.
1678
1680
Unfortunately, some common MIDI commands are also sent as < a > System
1679
1681
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
1686
1688
less-expensive computer storage. Several of the major music hardware
1687
1689
producers have expressed strong interest in using Web MIDI to provide
1688
1690
web-based configuration and programming interfaces to their hardware.
@@ -1718,9 +1720,9 @@ <h2>
1718
1720
separately in the API is a good idea, in order to more carefully
1719
1721
provide user security hooks. The < a data-lt =
1720
1722
"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
1724
1726
Exclusive</ a > support must be requested as part of that request.
1725
1727
</ p >
1726
1728
</ section >
0 commit comments