Chartbreaker
    Preparing search index...

    Interface MIDIAccess

    The MIDIAccess interface of the Web MIDI API provides methods for listing MIDI input and output devices, and obtaining access to those devices. Available only in secure contexts.

    MDN Reference

    interface MIDIAccess {
        inputs: MIDIInputMap;
        onstatechange: ((this: MIDIAccess, ev: MIDIConnectionEvent) => any) | null;
        outputs: MIDIOutputMap;
        sysexEnabled: boolean;
        addEventListener<K extends "statechange">(
            type: K,
            listener: (this: MIDIAccess, ev: MIDIAccessEventMap[K]) => any,
            options?: boolean | AddEventListenerOptions,
        ): void;
        addEventListener(
            type: string,
            listener: EventListenerOrEventListenerObject,
            options?: boolean | AddEventListenerOptions,
        ): void;
        dispatchEvent(event: Event): boolean;
        removeEventListener<K extends "statechange">(
            type: K,
            listener: (this: MIDIAccess, ev: MIDIAccessEventMap[K]) => any,
            options?: boolean | EventListenerOptions,
        ): void;
        removeEventListener(
            type: string,
            listener: EventListenerOrEventListenerObject,
            options?: boolean | EventListenerOptions,
        ): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    inputs: MIDIInputMap

    The inputs read-only property of the MIDIAccess interface provides access to any available MIDI input ports.

    MDN Reference

    onstatechange: ((this: MIDIAccess, ev: MIDIConnectionEvent) => any) | null
    outputs: MIDIOutputMap

    The outputs read-only property of the MIDIAccess interface provides access to any available MIDI output ports.

    MDN Reference

    sysexEnabled: boolean

    The sysexEnabled read-only property of the MIDIAccess interface indicates whether system exclusive support is enabled on the current MIDIAccess instance.

    MDN Reference

    Methods

    • The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().

      MDN Reference

      Parameters

      Returns boolean

    • The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.

      MDN Reference

      Type Parameters

      • K extends "statechange"

      Parameters

      Returns void

    • The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.

      MDN Reference

      Parameters

      Returns void