Class MIDI

This class is for using Web MIDI API.

Constructors

Methods

Constructors

Methods

  • This method gets instance of MIDIAccess.

    Returns null | MIDIAccess

  • This method invokes requestMIDIAccess and gets instance of MIDIAccess.

    Parameters

    • params: {
          options?: MIDIOptions;
          errorCallback(error: Error): void;
          successCallback(
              midiAccess: MIDIAccess,
              midiInputs: MIDIInput[],
              midiOutputs: MIDIOutput[],
          ): void;
      }

    Returns Promise<void | MIDIAccess>

    Return value is Promise that requestMIDIAccess method returns.