Constructors

Methods

  • Allows to reconfigure access object to use project in different environment as the default one (browser): See @midival/node, @midival/react-native for more details.

    Parameters

    • newAccess: IMIDIAccess

      Implementation of IMIDIAccess to be used to provide MIDI objects.

    Returns void

  • Calls callback on every input device that gets connected.

    Parameters

    • callback: Callback<[IMIDIInput]>

      Callback to be registered

    • callOnAlreadyConnected: boolean = false

      If set to true, the function will instantly trigger for all already connected devices. Default to false

    Returns Promise<UnregisterCallback>

    Promise resolving to unregister callback when finishes.

  • Listens to all input devices with a certain config (like name or manufacturer). Configuration can be provided as a string or regex. The callback unlike onInputDeviceConnected accepts MIDIValInput. onInputDeviceConnected is suitable when you want to filter devices yourself, beyond this configuration object so it does not instantiate objects.

    Parameters

    • config: ConfigScheme

      Configuration object used to match with device connected

    • fn: ((input) => void)

      Callback on connection. Connection is already wrapped in MIDIValInput object

    • callOnAlreadyConnected: boolean = false

    Returns Promise<UnregisterCallback>

    Promise for Unregister Callback

  • Calls callback on every output device that gets connected.

    Parameters

    • callback: Callback<[IMIDIOutput]>

      Callback to be registered

    • callOnAlreadyConnected: boolean = false

      If set to true, the function will instantly trigger for all already connected devices. Default to false

    Returns Promise<UnregisterCallback>

    Promise resolving to unregister callback when finishes.

  • Listens to all output devices with a certain config (like name or manufacturer). Configuration can be provided as a string or regex. The callback unlike onOutputDeviceConnected accepts MIDIValOutput. onOutputDeviceConnected is suitable when you want to filter devices yourself, beyond this configuration object so it does not instantiate objects.

    Parameters

    • config: ConfigScheme

      Configuration object used to match with device connected

    • fn: ((output) => void)

      Callback on connection. Connection is already wrapped in MIDIValOutput object

    • callOnAlreadyConnected: boolean = false

    Returns Promise<UnregisterCallback>

    Promise for Unregister Callback

Generated using TypeDoc