Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MIDIVal

Hierarchy

  • MIDIVal

Index

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

  • Connects to MIDI interface and returns implementation of IMIDIAccess

    Returns Promise<IMIDIAccess>

    Promise resolving to IMIDIAccess

  • Creates MIDIValInput instance from implementation of IMIDIInput interface.

    Parameters

    • input: IMIDIInput

      Implementation of IMIDIInput interface

    Returns MIDIValInput

    MIDIValInput object

  • Creates MIDIValOutput instance from implementation of IMIDIOut interface

    Parameters

    • output: IMIDIOutput

      Implementation of IMIDIOutput interface

    Returns MIDIValOutput

    MIDIValOutput object

  • 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.

  • onInputDeviceWithConfigConnected(config: ConfigScheme, fn: ((input: MIDIValInput) => void), callOnAlreadyConnected?: boolean): Promise<UnregisterCallback>
  • 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: MIDIValInput) => 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.

  • onOutputDeviceWithConfigConnected(config: ConfigScheme, fn: ((output: MIDIValOutput) => void), callOnAlreadyConnected?: boolean): Promise<UnregisterCallback>
  • 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: MIDIValOutput) => void)

      Callback on connection. Connection is already wrapped in MIDIValOutput object

    • callOnAlreadyConnected: boolean = false

    Returns Promise<UnregisterCallback>

    Promise for Unregister Callback

Generated using TypeDoc