7.0.0 • Published 8 months ago

@midiative/capacitor-midi-device v7.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

@midiative/capacitor-midi-device

Connect midi devices to your app

Install

npm install @midiative/capacitor-midi-device
npx cap sync

API

listMIDIDevices()

listMIDIDevices() => Promise<{ value: string[]; }>

Returns: Promise<{ value: string[]; }>


openDevice(...)

openDevice(options: DeviceOptions) => Promise<void>
ParamType
optionsDeviceOptions

initConnectionListener()

initConnectionListener() => Promise<void>

addListener('MIDI_MSG_EVENT', ...)

addListener(eventName: 'MIDI_MSG_EVENT', listenerFunc: (message: MidiMessage) => void) => Promise<PluginListenerHandle>
ParamType
eventName'MIDI_MSG_EVENT'
listenerFunc(message: MidiMessage) => void

Returns: Promise<PluginListenerHandle>


addListener('MIDI_CON_EVENT', ...)

addListener(eventName: 'MIDI_CON_EVENT', listenerFunc: (devices: { value: string[]; }) => void) => Promise<PluginListenerHandle>
ParamType
eventName'MIDI_CON_EVENT'
listenerFunc(devices: { value: string[]; }) => void

Returns: Promise<PluginListenerHandle>


Interfaces

DeviceOptions

PropType
deviceNumbernumber

PluginListenerHandle

PropType
remove() => Promise<void>

MidiMessage

PropType
typestring
notenumber
velocitynumber
7.0.0

8 months ago

0.0.6

8 months ago

0.0.5

9 months ago

0.0.4

9 months ago

0.0.3

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago