spessasynth_lib documentation
    Preparing search index...

    Class MIDIDeviceHandler

    Provides an easy way to connect physical MIDI devices to the synthesizer and sequencer using the Web MIDI API.

    Index
    inputs: Map<string, LibMIDIInput> = ...

    The available MIDI inputs. ID maps to the input.

    onDeviceChange?: () => unknown

    Called after a device was connected or disconnected, once MIDIDeviceHandler.inputs and MIDIDeviceHandler.outputs are updated.

    outputs: Map<string, LibMIDIOutput> = ...

    The available MIDI outputs. ID maps to the output.

    • Initializes the connection to physical MIDI devices.

      Parameters

      • requestSysEx: boolean = true

        If the System Exclusive access should be requested. If it is denied, the access without System Exclusive messages is requested instead.

      Returns Promise<MIDIDeviceHandler>

      The MIDI device handler.

      Error If the MIDI devices fail to initialize or the Web MIDI API is not supported.