7.0.0 • Published 10 months ago

@midiative/capacitor-midi-device v7.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 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

10 months ago

0.0.6

10 months ago

0.0.5

11 months ago

0.0.4

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago