new Output( midiOutput )

Description

The Output class represents a MIDI output port. This object is derived from the host's MIDI subsystem and cannot be instantiated directly.

You can find a list of all available Output objects in the WebMidi.outputs array.

The Output class extends the EventEmitter class from the djipevents module. This means it also includes methods such as addListener(), removeListener(), hasListener() and several others.

Parameters
Name Type Description
midiOutput MIDIOutput

MIDIOutput object as provided by the MIDI subsystem

Details

Classes


new Output( midiOutput )

Members


channels :Array.<OutputChannel>

Description

Array containing the 16 OutputChannel objects available for this Output. The channels are numbered 1 through 16.

Details

<readonly> connection :string

Description

Output port's connection state: "pending", "open" or "closed".

Details
string

<readonly> id :string

Description

ID string of the MIDI output. The ID is host-specific. Do not expect the same ID on different platforms. For example, Google Chrome and the Jazz-Plugin report completely different IDs for the same port.

Details
string

<readonly> manufacturer :string

Description

Name of the manufacturer of the device that makes this output port available.

Details
string

<readonly> name :string

Description

Name of the MIDI output

Details
string

<readonly> state :string

Description

State of the output port: "connected" or "disconnected".

Details
string

<readonly> type :string

Description

Type of the output port ("output")

Details
string

Methods


clear() → {Output}

Description

Clears all messages that have been queued but not yet delivered.

Warning: this method has been defined in the specification but has not been implemented yet. As soon as browsers implement it, it will work.

You can check out the current status of this feature for Chromium (Chrome) here: https://bugs.chromium.org/p/chromium/issues/detail?id=471798

Returns

Returns the Output object so methods can be chained.

Details

<async> close() → {Promise.<void>}

Description

Closes the output connection. When an output is closed, it cannot be used to send MIDI messages until the output is opened again by calling Output.open(). You can check the connection status by looking at the connection property.

Returns
Details

decrementRegisteredParameter( parameter [, options ] ) → {Output}

Description

Decrements the specified MIDI registered parameter by 1. Here is the full list of parameter names that can be used with this method:

  • Pitchbend Range (0x00, 0x00): "pitchbendrange"
  • Channel Fine Tuning (0x00, 0x01): "channelfinetuning"
  • Channel Coarse Tuning (0x00, 0x02): "channelcoarsetuning"
  • Tuning Program (0x00, 0x03): "tuningprogram"
  • Tuning Bank (0x00, 0x04): "tuningbank"
  • Modulation Range (0x00, 0x05): "modulationrange"
  • Azimuth Angle (0x3D, 0x00): "azimuthangle"
  • Elevation Angle (0x3D, 0x01): "elevationangle"
  • Gain (0x3D, 0x02): "gain"
  • Distance Ratio (0x3D, 0x03): "distanceratio"
  • Maximum Distance (0x3D, 0x04): "maximumdistance"
  • Maximum Distance Gain (0x3D, 0x05): "maximumdistancegain"
  • Reference Distance Ratio (0x3D, 0x06): "referencedistanceratio"
  • Pan Spread Angle (0x3D, 0x07): "panspreadangle"
  • Roll Angle (0x3D, 0x08): "rollangle"
Parameters
Name Type Attributes Default Description
parameter String | Array.<number>

A string identifying the parameter"s name (see above) or a two-position array specifying the two control bytes (0x65, 0x64) that identify the registered parameter.

options Object <optional>
{}
Name Type Attributes Default Description
channels number | Array.<number> | "all" <optional>
"all"

The MIDI channel number (between 1 and 16) or an array of channel numbers to use. The special value "all" can also be used to use all channels (default).

time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Throws

TypeError The specified parameter is not available.

Details

<async> destroy() → {Promise.<void>}

Description

Destroys the Output. All listeners are removed, all channels are destroyed and the MIDI subsystem is unlinked.

Returns
Details

incrementRegisteredParameter( parameter [, options ] ) → {Output}

Description

Increments the specified MIDI registered parameter by 1. Here is the full list of parameter names that can be used with this method:

  • Pitchbend Range (0x00, 0x00): "pitchbendrange"
  • Channel Fine Tuning (0x00, 0x01): "channelfinetuning"
  • Channel Coarse Tuning (0x00, 0x02): "channelcoarsetuning"
  • Tuning Program (0x00, 0x03): "tuningprogram"
  • Tuning Bank (0x00, 0x04): "tuningbank"
  • Modulation Range (0x00, 0x05): "modulationrange"
  • Azimuth Angle (0x3D, 0x00): "azimuthangle"
  • Elevation Angle (0x3D, 0x01): "elevationangle"
  • Gain (0x3D, 0x02): "gain"
  • Distance Ratio (0x3D, 0x03): "distanceratio"
  • Maximum Distance (0x3D, 0x04): "maximumdistance"
  • Maximum Distance Gain (0x3D, 0x05): "maximumdistancegain"
  • Reference Distance Ratio (0x3D, 0x06): "referencedistanceratio"
  • Pan Spread Angle (0x3D, 0x07): "panspreadangle"
  • Roll Angle (0x3D, 0x08): "rollangle"
Parameters
Name Type Attributes Default Description
parameter String | Array.<number>

A string identifying the parameter's name (see above) or a two-position array specifying the two control bytes (0x65, 0x64) that identify the registered parameter.

options Object <optional>
{}
Name Type Attributes Default Description
channels number | Array.<number> | "all" <optional>
"all"

The MIDI channel number (between 1 and 16) or an array of channel numbers to use. The special value "all" can also be used to use all channels (default).

time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Details

<async> open() → {Promise.<Output>}

Description

Opens the output for usage.

Returns

The promise is fulfilled with the Output

Details

playNote( note [, options ] ) → {Output}

Description

Plays a note or an array of notes on one or more channels of this output. The first parameter is the note to play. It can be a single value or an array of the following valid values:

  • A MIDI note number (integer between 0 and 127)
  • A note name, followed by the octave (e.g. "C3", "G#4", "F-1", "Db7")
  • A Note object

The playNote() method sends a note on MIDI message for all specified notes on all specified channels. If no channels are specified, it will send to all channels. If a duration is set in the options parameter or in the Note object's duration property, it will also schedule a note off message to end the note after said duration. If no duration is set, the note will simply play until a matching note off message is sent with stopNote() or sendNoteOff().

The execution of the note on command can be delayed by using the time property of the options parameter.

When using Note objects, the durations and velocities defined in the Note objects have precedence over the ones specified via the method's options parameter.

Note: As per the MIDI standard, a note on message with an attack velocity of 0 is functionally equivalent to a note off message.

Parameters
Name Type Attributes Default Description
note number | string | Note | Array.<number> | Array.<string> | Array.<Note>

The note(s) to play. The notes can be specified by using a MIDI note number (0-127), a note name (e.g. C3, G#4, F-1, Db7), a Note object or an array of the previous types. When using a note name, octave range must be between -1 and 9. The lowest note is C-1 (MIDI note number 0) and the highest note is G9 (MIDI note number 127).

options Object <optional>
{}
Name Type Attributes Default Description
channels number | Array.<number> | "all" <optional>
"all"

The MIDI channel number (between 1 and 16) or an array of channel numbers to play the note on. The special value "all" can also be used to use all channels (default).

duration number <optional>

The number of milliseconds (integer) after which a note off message will be scheduled. If left undefined, only a note on message is sent.

rawValue boolean <optional>
false

Controls whether the attack and release velocities are set using integers between 0 and 127 (true) or a decimal number between 0 and 1 (false, default).

release number <optional>
0.5

The velocity at which to release the note (between 0 and 1). If the rawValue option is true, the value should be specified as an integer between 0 and 127. An invalid velocity value will silently trigger the default of 0.5. This is only used with the note off event triggered when options.duration is set.

time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

attack number <optional>
0.5

The attack velocity to use when playing the note (between 0 and 1). If the rawValue option is true, the value should be specified as an integer between 0 and 127. An invalid velocity value will silently trigger the default of 0.5.

Returns

Returns the Output object so methods can be chained.

Details

resetAllControllers( [ options ] ) → {Output}

Description

Sends a reset all controllers channel mode message. This resets all controllers, such as the pitch bend, to their default value.

Parameters
Name Type Attributes Default Description
options Object <optional>
{}
Name Type Attributes Default Description
channels number | Array.<number> | "all" <optional>
"all"

The MIDI channel number (between 1 and 16) or an array of channel numbers to use. The special value "all" can also be used to use all channels (default).

time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns
Details

send( status [, data [, options ] ] ) → {Output}

Description

Sends a MIDI message on the MIDI output port, at the scheduled timestamp. It is usually not necessary to use this method directly since it is often simpler to use one of the helper methods such as playNote(), stopNote(), sendControlChange(), etc.

Details on the format of MIDI messages are available in the summary of MIDI messages from the MIDI Manufacturers Association.

Parameters
Name Type Attributes Default Description
status Number

The MIDI status byte of the message (integer between 128-255).

data Array.<number> <optional>
[]

An array of unsigned integers for the message. The number of data bytes varies depending on the status byte. It is perfectly legal to send no data for some message types (use undefined or an empty array in this case). Each byte must be between 0 and 255.

options Object <optional>
{}
Name Type Attributes Description
time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Throws

Failed to execute 'send' on 'MIDIOutput': The value at index 0 is greater than 0xFF.

Failed to execute 'send' on 'MIDIOutput': The value at index 2 is greater than 0xFF.

Failed to execute 'send' on 'MIDIOutput': Running status is not allowed at index 2.

Failed to execute 'send' on 'MIDIOutput': Message is incomplete.

Failed to execute 'send' on 'MIDIOutput': Reserved status is not allowed at index 0.

Failed to execute 'send' on 'MIDIOutput': System exclusive message is not allowed at index 0.

Failed to execute 'send' on 'MIDIOutput': Unexpected end of system exclusive message at index 0.

Failed to execute 'send' on 'MIDIOutput': Unexpected status byte at index 1.

Failed to execute 'send' on 'MIDIOutput': Unexpected status byte at index 2.

Details

sendActiveSensing( [ options ] ) → {Output}

Description

Sends an active sensing real-time message. This tells the device connected to this port that the connection is still good. Active sensing messages should be sent every 300 ms if there was no other activity on the MIDI port.

Parameters
Name Type Attributes Default Description
options Object <optional>
{}
Name Type Attributes Description
time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Details

sendChannelMode( command [, value [, options ] ] ) → {Output}

Description

Sends a MIDI channel mode message to the specified channel(s). The channel mode message to send can be specified numerically or by using one of the following common names:

  • "allsoundoff" (#120)
  • "resetallcontrollers" (#121)
  • "localcontrol" (#122)
  • "allnotesoff" (#123)
  • "omnimodeoff" (#124)
  • "omnimodeon" (#125)
  • "monomodeon" (#126)
  • "polymodeon" (#127)

It should be noted that, per the MIDI specification, only localcontrol and monomodeon may require a value that's not zero. For that reason, the value parameter is optional and defaults to 0.

To make it easier, all channel mode messages have a matching helper method:

Parameters
Name Type Attributes Default Description
command number | string

The numerical identifier of the channel mode message (integer between 120-127) or its name as a string.

value number <optional>

The value to send (integer between 0-127).

options Object <optional>
{}
Name Type Attributes Default Description
channels number | Array.<number> | "all" <optional>
"all"

The MIDI channel number (between 1 and 16) or an array of channel numbers to use. The special value "all" can also be used to use all channels (default).

time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Throws

Invalid channel mode message name.

Channel mode controller numbers must be between 120 and 127.

Value must be an integer between 0 and 127.

Details

sendClock( [ options ] ) → {Output}

Description

Sends a MIDI *clock real-time message. According to the standard, there are 24 MIDI Clocks for every quarter note.

Parameters
Name Type Attributes Default Description
options Object <optional>
{}
Name Type Attributes Description
time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Details

sendContinue( [ options ] ) → {WebMidi}

Description

Sends a continue real-time message. This resumes song playback where it was previously stopped or where it was last cued with a song position message. To start playback from the start, use the sendStart()` method.

Parameters
Name Type Attributes Default Description
options Object <optional>
{}
Name Type Attributes Description
time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the WebMidi object so methods can be chained.

Details

sendControlChange( controller [, value [, options ] ] ) → {Output}

Description

Sends a MIDI control change message to the specified channel(s) at the scheduled time. The control change message to send can be specified numerically or by using one of the following common names:

  • bankselectcoarse (#0)
  • modulationwheelcoarse (#1)
  • breathcontrollercoarse (#2)
  • footcontrollercoarse (#4)
  • portamentotimecoarse (#5)
  • dataentrycoarse (#6)
  • volumecoarse (#7)
  • balancecoarse (#8)
  • pancoarse (#10)
  • expressioncoarse (#11)
  • effectcontrol1coarse (#12)
  • effectcontrol2coarse (#13)
  • generalpurposeslider1 (#16)
  • generalpurposeslider2 (#17)
  • generalpurposeslider3 (#18)
  • generalpurposeslider4 (#19)
  • bankselectfine (#32)
  • modulationwheelfine (#33)
  • breathcontrollerfine (#34)
  • footcontrollerfine (#36)
  • portamentotimefine (#37)
  • dataentryfine (#38)
  • volumefine (#39)
  • balancefine (#40)
  • panfine (#42)
  • expressionfine (#43)
  • effectcontrol1fine (#44)
  • effectcontrol2fine (#45)
  • holdpedal (#64)
  • portamento (#65)
  • sustenutopedal (#66)
  • softpedal (#67)
  • legatopedal (#68)
  • hold2pedal (#69)
  • soundvariation (#70)
  • resonance (#71)
  • soundreleasetime (#72)
  • soundattacktime (#73)
  • brightness (#74)
  • soundcontrol6 (#75)
  • soundcontrol7 (#76)
  • soundcontrol8 (#77)
  • soundcontrol9 (#78)
  • soundcontrol10 (#79)
  • generalpurposebutton1 (#80)
  • generalpurposebutton2 (#81)
  • generalpurposebutton3 (#82)
  • generalpurposebutton4 (#83)
  • reverblevel (#91)
  • tremololevel (#92)
  • choruslevel (#93)
  • celestelevel (#94)
  • phaserlevel (#95)
  • databuttonincrement (#96)
  • databuttondecrement (#97)
  • nonregisteredparametercoarse (#98)
  • nonregisteredparameterfine (#99)
  • registeredparametercoarse (#100)
  • registeredparameterfine (#101)

Note: as you can see above, not all control change message have a matching common name. This does not mean you cannot use the others. It simply means you will need to use their number instead of their name.

To view a list of all available control change messages, please consult "Table 3 - Control Change Messages" from the MIDI Messages specification.

Parameters
Name Type Attributes Default Description
controller number | string

The MIDI controller name or number (0-119).

value number <optional>
0

The value to send (0-127).

options Object <optional>
{}
Name Type Attributes Default Description
channels number | Array.<number> | "all" <optional>
"all"

The MIDI channel number (between 1 and 16) or an array of channel numbers to use. The special value "all" can also be used to use all channels (default).

time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Throws

Controller numbers must be between 0 and 119.

Invalid controller name.

Details

sendNoteOff( note [, options ] ) → {Output}

Description

Sends a note off message for the specified notes on the specified channel(s). The first parameter is the note. It can be a single value or an array of the following valid values:

  • A MIDI note number (integer between 0 and 127)
  • A note name, followed by the octave (e.g. "C3", "G#4", "F-1", "Db7")
  • A Note object

The execution of the note off command can be delayed by using the time property of the options parameter.

When using Note objects, the release velocity defined in the Note objects has precedence over the one specified via the method's options parameter.

Parameters
Name Type Attributes Default Description
note number | string | Note | Array.<number> | Array.<string> | Array.<Note>

The note(s) to stop. The notes can be specified by using a MIDI note number (0-127), a note name (e.g. C3, G#4, F-1, Db7), a Note object or an array of the previous types. When using a note name, octave range must be between -1 and 9. The lowest note is C-1 (MIDI note number 0) and the highest note is G9 (MIDI note number 127).

options Object <optional>
{}
Name Type Attributes Default Description
channels number | Array.<number> | "all" <optional>
"all"

The MIDI channel number (between 1 and 16) or an array of channel numbers to use. The special value "all" can also be used to use all channels (default).

rawValue boolean <optional>
false

Controls whether the release velocity is set using integers between 0 and 127 (true) or a decimal number between 0 and 1 (false, default).

time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

release number <optional>
0.5

The velocity at which to release the note (between 0 and 1). If the rawValue option is true, the value should be specified as an integer between 0 and 127. An invalid velocity value will silently trigger the default of 0.5.

Returns

Returns the Output object so methods can be chained.

Details

sendNoteOn( note [, options ] ) → {Output}

Description

Sends a note on message for the specified notes on the specified channel(s). The first parameter is the note. It can be a single value or an array of the following valid values:

  • A MIDI note number (integer between 0 and 127)
  • A note name, followed by the octave (e.g. "C3", "G#4", "F-1", "Db7")
  • A Note object

The execution of the note on command can be delayed by using the time property of the options parameter.

When using Note objects, the attack velocity defined in the Note objects has precedence over the one specified via the method's options parameter. Also, the duration is ignored. If you want to also send a note off message, use the playNote() method instead.

Note: As per the MIDI standard, a note on message with an attack velocity of 0 is functionally equivalent to a note off message.

Parameters
Name Type Attributes Default Description
note number | string | Note | Array.<number> | Array.<string> | Array.<Note>

The note(s) to play. The notes can be specified by using a MIDI note number (0-127), a note name (e.g. C3, G#4, F-1, Db7), a Note object or an array of the previous types. When using a note name, octave range must be between -1 and 9. The lowest note is C-1 (MIDI note number 0) and the highest note is G9 (MIDI note number 127).

options Object <optional>
{}
Name Type Attributes Default Description
channels number | Array.<number> | "all" <optional>
"all"

The MIDI channel number (between 1 and 16) or an array of channel numbers to use. The special value "all" can also be used to use all channels (default).

rawValue boolean <optional>
false

Controls whether the attack velocity is set using integers between 0 and 127 (true) or a decimal number between 0 and 1 (false, default).

time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

attack number <optional>
0.5

The velocity at which to play the note (between 0 and 1). If the rawValue option is true, the value should be specified as an integer between 0 and 127. An invalid velocity value will silently trigger the default of 0.5.

Returns

Returns the Output object so methods can be chained.

Details

sendReset( [ options ] ) → {Output}

Description

Sends a reset real-time message. This tells the device connected to this output that it should reset itself to a default state.

Parameters
Name Type Attributes Default Description
options Object <optional>
{}
Name Type Attributes Description
time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Details

sendStart( [ options ] ) → {Output}

Description

Sends a start real-time message. A MIDI Start message starts the playback of the current song at beat 0. To start playback elsewhere in the song, use the sendContinue() method.

Parameters
Name Type Attributes Default Description
options Object <optional>
{}
Name Type Attributes Description
time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Details

sendStop( [ options ] ) → {Output}

Description

Sends a stop real-time message. This tells the device connected to this output to stop playback immediately (or at the scheduled time).

Parameters
Name Type Attributes Default Description
options Object <optional>
{}
Name Type Attributes Description
time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Details

sendSysex( manufacturer [, data [, options ] ] ) → {Output}

Description

Sends a MIDI system exclusive (sysex) message. The generated message will automatically be prepended with the sysex byte (0xF0) and terminated with the end of sysex byte (0xF7).

To use the sendSysex() method, system exclusive message support must have been enabled. To do so, you must set the sysex option to true when calling WebMidi.enable():

WebMidi.enable({sysex: true})
			  .then(() => console.log("System exclusive messages are enabled");
			

Note that, depending on browser, version and platform, it is generally necessary to serve the page over HTTPS to enable sysex support.

Examples

If you want to send a sysex message to a Korg device connected to the first output, you would use the following code:

WebMidi.outputs[0].sendSysex(0x42, [0x1, 0x2, 0x3, 0x4, 0x5]);
			

The parameters can be specified using any number notation (decimal, hex, binary, etc.). Therefore, the code below is equivalent to the code above:

WebMidi.outputs[0].sendSysex(66, [1, 2, 3, 4, 5]);
			

The above code sends the byte values 1, 2, 3, 4 and 5 to Korg devices (hex 42 is the same as decimal 66).

Some manufacturers are identified using 3 bytes. In this case, you would use a 3-position array as the first parameter. For example, to send the same sysex message to a Native Instruments device:

WebMidi.outputs[0].sendSysex([0x00, 0x21, 0x09], [0x1, 0x2, 0x3, 0x4, 0x5]);
			

There is no limit for the length of the data array. However, it is generally suggested to keep system exclusive messages to 64Kb or less.

Parameters
Name Type Attributes Default Description
manufacturer number | Array.<number>

An unsigned integer or an array of three unsigned integers between 0 and 127 that identify the targeted manufacturer. The MIDI Manufacturers Association maintains a full list of Manufacturer ID Numbers .

data Array <optional>
number[]

An array of unsigned integers between 0 and 127. This is the data you wish to transfer.

options Object <optional>
{}
Name Type Attributes Description
time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Throws

Failed to execute 'send' on 'MIDIOutput': System exclusive message is not allowed.

Failed to execute 'send' on 'MIDIOutput': The value at index x is greater than 0xFF.

Details

sendTimecodeQuarterFrame( value [, options ] ) → {Output}

Description

Sends a MIDI timecode quarter frame message. Please note that no processing is being done on the data. It is up to the developer to format the data according to the MIDI Timecode format.

Parameters
Name Type Attributes Default Description
value number

The quarter frame message content (integer between 0 and 127).

options Object <optional>
{}
Name Type Attributes Description
time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Details

sendTuneRequest( [ options ] ) → {Output}

Description

Sends a MIDI tune request real-time message.

Parameters
Name Type Attributes Default Description
options Object <optional>
{}
Name Type Attributes Description
time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Details

3.0.0


setChannelAftertouch( [ pressure [, options ] ] ) → {Output}

Description

Sends a MIDI channel aftertouch message to the specified channel(s). For key-specific aftertouch, you should instead use setKeyAftertouch().

Parameters
Name Type Attributes Default Description
pressure number <optional>
0.5

The pressure level (between 0 and 1). An invalid pressure value will silently trigger the default behaviour. If the rawValue option is set to true, the pressure can be defined by using an integer between 0 and 127.

options Object <optional>
{}
Name Type Attributes Default Description
channels number | Array.<number> | "all" <optional>
"all"

The MIDI channel number (between 1 and 16) or an array of channel numbers to use. The special value "all" can also be used to use all channels (default).

rawValue boolean <optional>
false

A boolean indicating whether the value should be considered a float between 0 and 1.0 (default) or a raw integer between 0 and 127.

time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Details

3.0.0


setKeyAftertouch( note [, pressure [, options ] ] ) → {Output}

Description

Sends a MIDI key aftertouch message to the specified channel(s) at the scheduled time. This is a key-specific aftertouch. For a channel-wide aftertouch message, use setChannelAftertouch().

Parameters
Name Type Attributes Default Description
note number | string | Array

The note for which you are sending an aftertouch value. The notes can be specified in one of two ways. The first way is by using the MIDI note number (an integer between 0 and 127). The second way is by using the note name followed by the octave (C3, G#4, F-1, Db7). The octave range should be between -1 and 9. The lowest note is C-1 (MIDI note number 0) and the highest note is G9 (MIDI note number 127). It is also possible to use an array of note names and/or numbers.

pressure number <optional>
0.5

The pressure level (between 0 and 1). An invalid pressure value will silently trigger the default behaviour. If the rawValue option is set to true, the pressure can be defined by using an integer between 0 and 127.

options Object <optional>
{}
Name Type Attributes Default Description
channels number | Array.<number> | "all" <optional>
"all"

The MIDI channel number (between 1 and 16) or an array of channel numbers to use. The special value "all" can also be used to use all channels (default).

rawValue boolean <optional>
false

A boolean indicating whether the value should be considered a float between 0 and 1.0 (default) or a raw integer between 0 and 127.

time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Details

3.0.0


setLocalControl( [ state [, options ] ] ) → {Output}

Description

Turns local control on or off. Local control is usually enabled by default. If you disable it, the instrument will no longer trigger its own sounds. It will only send the MIDI messages to its out port.

Parameters
Name Type Attributes Default Description
state boolean <optional>
false

Whether to activate local control (true) or disable it (false).

options Object <optional>
{}
Name Type Attributes Default Description
channels number | Array.<number> | "all" <optional>
"all"

The MIDI channel number (between 1 and 16) or an array of channel numbers to use. The special value "all" can also be used to use all channels (default).

time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Details

3.0.0


setMasterTuning( [ value [, options ] ] ) → {Output}

Description

Sends a master tuning message to the specified channel(s). The value is decimal and must be larger than -65 semitones and smaller than 64 semitones.

Because of the way the MIDI specification works, the decimal portion of the value will be encoded with a resolution of 14bit. The integer portion must be between -64 and 63 inclusively. This function actually generates two MIDI messages: a Master Coarse Tuning and a Master Fine Tuning RPN messages.

Parameters
Name Type Attributes Default Description
value number <optional>
0.0

The desired decimal adjustment value in semitones (-65 < x < 64)

options Object <optional>
{}
Name Type Attributes Default Description
channels number | Array.<number> | "all" <optional>
"all"

The MIDI channel number (between 1 and 16) or an array of channel numbers to use. The special value "all" can also be used to use all channels (default).

time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Throws

The value must be a decimal number between larger than -65 and smaller than 64.

Details

3.0.0


setModulationRange( [ semitones [, cents [, options ] ] ] ) → {Output}

Description

Sends a modulation depth range message to the specified channel(s) so that they adjust the depth of their modulation wheel's range. The range can be specified with the semitones parameter, the cents parameter or by specifying both parameters at the same time.

Parameters
Name Type Attributes Default Description
semitones number <optional>
0

The desired adjustment value in semitones (integer between 0 and 127).

cents number <optional>
0

The desired adjustment value in cents (integer between 0 and 127).

options Object <optional>
{}
Name Type Attributes Default Description
channels number | Array.<number> | "all" <optional>
"all"

The MIDI channel number (between 1 and 16) or an array of channel numbers to use. The special value "all" can also be used to use all channels (default).

time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Throws

The msb value must be between 0 and 127

The lsb value must be between 0 and 127

Details

3.0.0


setNonRegisteredParameter( parameter [, data [, options ] ] ) → {Output}

Description

Sets a non-registered parameter to the specified value. The NRPN is selected by passing in a two-position array specifying the values of the two control bytes. The value is specified by passing in a single integer (most cases) or an array of two integers.

NRPNs are not standardized in any way. Each manufacturer is free to implement them any way they see fit. For example, according to the Roland GS specification, you can control the vibrato rate using NRPN (1, 8). Therefore, to set the vibrato rate value to 123 you would use:

WebMidi.outputs[0].setNonRegisteredParameter([1, 8], 123);
			

Obviously, you should select a channel so the message is not sent to all channels. For instance, to send to channel 1 of the first output port, you would use:

WebMidi.outputs[0].setNonRegisteredParameter([1, 8], 123, 1);
			

In some rarer cases, you need to send two values with your NRPN messages. In such cases, you would use a 2-position array. For example, for its ClockBPM parameter (2, 63), Novation uses a 14-bit value that combines an MSB and an LSB (7-bit values). So, for example, if the value to send was 10, you could use:

WebMidi.outputs[0].setNonRegisteredParameter([2, 63], [0, 10], [1]);
			

For further implementation details, refer to the manufacturer"s documentation.

Parameters
Name Type Attributes Default Description
parameter Array.<number>

A two-position array specifying the two control bytes (0x63, 0x62) that identify the non-registered parameter.

data number | Array.<number> <optional>
[]

An integer or an array of integers with a length of 1 or 2 specifying the desired data.

options Object <optional>
{}
Name Type Attributes Default Description
channels number | Array.<number> | "all" <optional>
"all"

The MIDI channel number (between 1 and 16) or an array of channel numbers to use. The special value "all" can also be used to use all channels (default).

time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Throws

The control value must be between 0 and 127.

The msb value must be between 0 and 127

Details

setOmniMode( [ state [, options ] ] ) → {Output}

Description

Sets OMNI mode to "on" or "off" for the specified channel(s). MIDI's OMNI mode causes the instrument to respond to messages from all channels.

It should be noted that support for OMNI mode is not as common as it used to be.

Parameters
Name Type Attributes Default Description
state boolean <optional>

Whether to activate OMNI mode (true) or not (false).

options Object <optional>
{}
Name Type Attributes Default Description
channels number | Array.<number> | "all" <optional>
"all"

The MIDI channel number (between 1 and 16) or an array of channel numbers to use. The special value "all" can also be used to use all channels (default).

time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Throws

Invalid channel mode message name.

Channel mode controller numbers must be between 120 and 127.

Value must be an integer between 0 and 127.

Details

3.0.0


setPitchBend( value [, options ] ) → {Output}

Description

Sends a MIDI pitch bend message to the specified channel(s) at the scheduled time.

Parameters
Name Type Attributes Default Description
value number | Array.<number>

The intensity of the bend (between -1.0 and 1.0). A value of zero means no bend. The resulting bend is relative to the pitch bend range that has been defined. The range can be set with setPitchBendRange() . So, for example, if the pitch bend range has been set to 12 semitones, using a bend value of -1 will bend the note 1 octave below its nominal value.

If an invalid value is specified, the nearest valid value will be used instead.

If the rawValue option is set to true, the intensity of the bend can be defined by either using a single integer between 0 and 127 (MSB) or an array of two integers between 0 and 127 representing, respectively, the MSB (most significant byte) and the LSB (least significant byte). The MSB is expressed in semitones with 64 meaning no bend. A value lower than 64 bends downwards while a value higher than 64 bends upwards. The LSB is expressed in cents (1/100 of a semitone). An LSB of 64 also means no bend.

options Object <optional>
{}
Name Type Attributes Default Description
channels number | Array.<number> | "all" <optional>
"all"

The MIDI channel number (between 1 and 16) or an array of channel numbers to use. The special value "all" can also be used to use all channels (default).

rawValue boolean <optional>
false

A boolean indicating whether the value should be considered as a float between -1.0 and 1.0 (default) or as raw integer between 0 and 127 (or an array of 2 integers if using both MSB and LSB).

time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Details

3.0.0


setPitchBendRange( semitones [, cents [, options ] ] ) → {Output}

Description

Sends a pitch bend range message to the specified channel(s) at the scheduled time so that they adjust the range used by their pitch bend lever. The range is specified by using the semitones and cents parameters. For example, setting the semitones parameter to 12 means that the pitch bend range will be 12 semitones above and below the nominal pitch.

Parameters
Name Type Attributes Default Description
semitones number

The desired adjustment value in semitones (between 0 and 127). While nothing imposes that in the specification, it is very common for manufacturers to limit the range to 2 octaves (-12 semitones to 12 semitones).

cents number <optional>
0

The desired adjustment value in cents (integer between 0-127).

options Object <optional>
{}
Name Type Attributes Default Description
channels number | Array.<number> | "all" <optional>
"all"

The MIDI channel number (between 1 and 16) or an array of channel numbers to use. The special value "all" can also be used to use all channels (default).

time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Throws

The msb value must be between 0 and 127.

The lsb value must be between 0 and 127.

Details

3.0.0


setPolyphonicMode( mode [, options ] ) → {Output}

Description

Sets the polyphonic mode. In "poly" mode (usually the default), multiple notes can be played and heard at the same time. In "mono" mode, only one note will be heard at once even if multiple notes are being played.

Parameters
Name Type Attributes Default Description
mode string

The mode to use: "mono" or "poly".

options Object <optional>
{}
Name Type Attributes Default Description
channels number | Array.<number> | "all" <optional>
"all"

The MIDI channel number (between 1 and 16) or an array of channel numbers to use. The special value "all" can also be used to use all channels (default).

time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Details

3.0.0


setProgram( [ program [, options ] ] ) → {Output}

Description

Sends a MIDI program change message to the specified channel(s) at the scheduled time.

Note: since version 3.0, the program number is an integer between 1 and 128. In versions 1.0 and 2.0, the number was between 0 and 127. This change aligns WebMidi.js with most devices that use a numbering scheme starting at 1.

Parameters
Name Type Attributes Default Description
program number <optional>
1

The MIDI patch (program) number (1-128)

options Object <optional>
{}
Name Type Attributes Default Description
channels number | Array.<number> | "all" <optional>
"all"

The MIDI channel number (between 1 and 16) or an array of channel numbers to use. The special value "all" can also be used to use all channels (default).

time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Throws

Failed to execute 'send' on 'MIDIOutput': The value at index 1 is greater than 0xFF.

Details

3.0.0


setRegisteredParameter( parameter [, data [, options ] ] ) → {Output}

Description

Sets the specified MIDI registered parameter to the desired value. The value is defined with up to two bytes of data (msb, lsb) that each can go from 0 to 127.

MIDI [registered parameters] (https://www.midi.org/specifications-old/item/table-3-control-change-messages-data-bytes-2) extend the original list of control change messages. The MIDI 1.0 specification lists only a limited number of them. Here are the original registered parameters with the identifier that can be used as the first parameter of this function:

  • Pitchbend Range (0x00, 0x00): "pitchbendrange"
  • Channel Fine Tuning (0x00, 0x01): "channelfinetuning"
  • Channel Coarse Tuning (0x00, 0x02): "channelcoarsetuning"
  • Tuning Program (0x00, 0x03): "tuningprogram"
  • Tuning Bank (0x00, 0x04): "tuningbank"
  • Modulation Range (0x00, 0x05): "modulationrange"

Note that the Tuning Program and Tuning Bank parameters are part of the MIDI Tuning Standard, which is not widely implemented.

Another set of extra parameters have been later added for 3D sound controllers. They are:

  • Azimuth Angle (0x3D, 0x00): "azimuthangle"
  • Elevation Angle (0x3D, 0x01): "elevationangle"
  • Gain (0x3D, 0x02): "gain"
  • Distance Ratio (0x3D, 0x03): "distanceratio"
  • Maximum Distance (0x3D, 0x04): "maximumdistance"
  • Maximum Distance Gain (0x3D, 0x05): "maximumdistancegain"
  • Reference Distance Ratio (0x3D, 0x06): "referencedistanceratio"
  • Pan Spread Angle (0x3D, 0x07): "panspreadangle"
  • Roll Angle (0x3D, 0x08): "rollangle"
Parameters
Name Type Attributes Default Description
parameter string | Array.<number>

A string identifying the parameter's name (see above) or a two-position array specifying the two control bytes (e.g. [0x65, 0x64]) that identify the registered parameter.

data number | Array.<number> <optional>
[]

A single integer or an array of integers with a maximum length of 2 specifying the desired data.

options Object <optional>
{}
Name Type Attributes Default Description
channels number | Array.<number> | "all" <optional>
"all"

The MIDI channel number (between 1 and 16) or an array of channel numbers to use. The special value "all" can also be used to use all channels (default).

time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Details

setSong( value [, options ] ) → {Output}

Description

Sends a song select MIDI message.

Note: since version 3.0, the song number is an integer between 1 and 128. In versions 1.0 and 2.0, the number was between 0 and 127. This change aligns WebMidi.js with most devices that use a numbering scheme starting at 1.

Parameters
Name Type Attributes Default Description
value number

The number of the song to select (integer between 1 and 128).

options Object <optional>
{}
Name Type Attributes Description
time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Throws

The song number must be between 1 and 128.

Details

3.0.0


setSongPosition( [ value [, options ] ] ) → {Output}

Description

Sends a ong position MIDI message. The value is expressed in MIDI beats (between 0 and 16383) which are 16th note. Position 0 is always the start of the song.

Parameters
Name Type Attributes Default Description
value number <optional>
0

The MIDI beat to cue to (integer between 0 and 16383).

options Object <optional>
{}
Name Type Attributes Description
time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Details

3.0.0


setTuningBank( value [, options ] ) → {Output}

Description

Sets the MIDI tuning bank to use. Note that the Tuning Bank parameter is part of the MIDI Tuning Standard, which is not widely implemented.

Note: since version 3.0, the bank number is an integer between 1 and 128. In versions 1.0 and 2.0, the number was between 0 and 127. This change aligns WebMidi.js with most devices that use a numbering scheme starting at 1.

Parameters
Name Type Attributes Default Description
value number

The desired tuning bank (1-128).

options Object <optional>
{}
Name Type Attributes Default Description
channels number | Array.<number> | "all" <optional>
"all"

The MIDI channel number (between 1 and 16) or an array of channel numbers to use. The special value "all" can also be used to use all channels (default).

time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Throws

The bank value must be between 1 and 128.

Details

3.0.0


setTuningProgram( value [, options ] ) → {Output}

Description

Sets the MIDI tuning program to use. Note that the Tuning Program parameter is part of the MIDI Tuning Standard, which is not widely implemented.

Note: since version 3.0, the program number is an integer between 1 and 128. In versions 1.0 and 2.0, the number was between 0 and 127. This change aligns WebMidi.js with most devices that use a numbering scheme starting at 1.

Parameters
Name Type Attributes Default Description
value number

The desired tuning program (1-128).

options Object <optional>
{}
Name Type Attributes Default Description
channels number | Array.<number> | "all" <optional>
"all"

The MIDI channel number (between 1 and 16) or an array of channel numbers to use. The special value "all" can also be used to use all channels (default).

time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns

Returns the Output object so methods can be chained.

Throws

The program value must be between 1 and 128.

Details

3.0.0


stopNote( note, options ) → {Output}

Description

This is an alias to the sendNoteOff() method.

Parameters
Name Type Description
note
options
Returns

turnNotesOff( [ options ] ) → {Output}

Description

Sends an all note soff channel mode message. This will turn all currently playing notes off. However, this does not prevent new notes from being played.

Parameters
Name Type Attributes Default Description
options Object <optional>
{}
Name Type Attributes Default Description
channels number | Array.<number> | "all" <optional>
"all"

The MIDI channel number (between 1 and 16) or an array of channel numbers to use. The special value "all" can also be used to use all channels (default).

time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns
Details

3.0.0


turnSoundOff( [ options ] ) → {Output}

Description

Sends an all sound off channel mode message. This will silence all sounds playing on that channel but will not prevent new sounds from being triggered.

Parameters
Name Type Attributes Default Description
options Object <optional>
{}
Name Type Attributes Default Description
channels number | Array.<number> | "all" <optional>
"all"

The MIDI channel number (between 1 and 16) or an array of channel numbers to use. The special value "all" can also be used to use all channels (default).

time number | string <optional>

If time is a string prefixed with "+" and followed by a number, the message will be delayed by that many milliseconds. If the value is a number (DOMHighResTimeStamp), the operation will be scheduled for that time. If time is omitted, or in the past, the operation will be carried out as soon as possible.

Returns
Details

3.0.0

Events


closed

Description

Event emitted when the Output has been closed by calling the close() method.

Properties
Name Type Description
timestamp number

The moment (DOMHighResTimeStamp) when the event occurred (in milliseconds since the navigation start of the document).

type string

"closed"

target Output

The object that triggered the event

Details
Object

disconnected

Description

Event emitted when the Output becomes unavailable. This event is typically fired when the MIDI device is unplugged.

Properties
Name Type Description
timestamp number

The moment (DOMHighResTimeStamp0 when the event occurred (in milliseconds since the navigation start of the document).

type string

"disconnected"

target Object

Object with properties describing the Output that triggered the event. This is not the actual Output as it is no longer available.

Name Type Description
connection string

"closed"

id string

ID of the input

manufacturer string

Manufacturer of the device that provided the input

name string

Name of the device that provided the input

state string

"disconnected"

type string

"output"

Details
Object

opened

Description

Event emitted when the Output has been opened by calling the open() method.

Properties
Name Type Description
timestamp number

The moment (DOMHighResTimeStamp) when the event occurred (in milliseconds since the navigation start of the document).

type string

"opened"

target Output

The object that triggered the event

Details
Object