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;
      }
      • Optionaloptions?: MIDIOptions
      • errorCallback?:function
        • Parameters

          • error: Error

          Returns void

      • successCallback?:function
        • Parameters

          • midiAccess: MIDIAccess
          • midiInputs: MIDIInput[]
          • midiOutputs: MIDIOutput[]

          Returns void

    Returns Promise<void | MIDIAccess>

    Return value is Promise that requestMIDIAccess method returns.