Skip to content

MIDIAccess

Defined in: src/MIDIAccess.ts:10

The entry point object returned by requestMIDIAccess. Mirrors the Web MIDI API MIDIAccess.

  • MIDIEventTarget

readonly inputs: MIDIInputMap

Defined in: src/MIDIAccess.ts:18

The available MIDI input ports.

The returned map is stable — the same Map instance is returned on every access and is mutated in place as devices connect/disconnect, so it is safe to hold a reference to it.


onstatechange: ((e) => void) | null

Defined in: src/MIDIAccess.ts:25

Handler invoked when a port is connected/disconnected or changes state.


readonly outputs: MIDIOutputMap

Defined in: src/MIDIAccess.ts:20

The available MIDI output ports. Stable, like inputs.


readonly sysexEnabled: boolean

Defined in: src/MIDIAccess.ts:22

Whether System Exclusive support was granted.

addEventListener(type, listener, options?): void

Defined in: src/MIDIAccess.ts:27

"statechange"

(this, e) => any

boolean | AddEventListenerOptions

void

MIDIEventTarget.addEventListener

addEventListener(type, listener, options?): void

Defined in: src/MIDIAccess.ts:32

string

EventListenerOrEventListenerObject

boolean | AddEventListenerOptions

void

MIDIEventTarget.addEventListener


dispatchEvent(event): boolean

Defined in: src/MIDIEventTarget.ts:23

Event

boolean

MIDIEventTarget.dispatchEvent


removeEventListener(type, listener, options?): void

Defined in: src/MIDIEventTarget.ts:18

string

EventListenerOrEventListenerObject

boolean | EventListenerOptions

void

MIDIEventTarget.removeEventListener