Class MIDI

This class is for using Web MIDI API.

Constructors

Properties

Methods

Constructors

Properties

inputs: MIDIInput[] = []
midiAccess: null | MIDIAccess = null
outputs: MIDIOutput[] = []

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): void;
          successCallback?(midiAccess, midiInputs, midiOutputs): void;
      }
      • Optional options?: 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.

Generated using TypeDoc