Skip to content

marcr-trimble/capacitor-midi-device

 
 

Repository files navigation

@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>
Param Type
options DeviceOptions

initConnectionListener()

initConnectionListener() => Promise<void>

addListener('MIDI_MSG_EVENT', ...)

addListener(eventName: 'MIDI_MSG_EVENT', listenerFunc: (message: MidiMessage) => void) => Promise<PluginListenerHandle>
Param Type
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>
Param Type
eventName 'MIDI_CON_EVENT'
listenerFunc (devices: { value: string[]; }) => void

Returns: Promise<PluginListenerHandle>


Interfaces

DeviceOptions

Prop Type
deviceNumber number

PluginListenerHandle

Prop Type
remove () => Promise<void>

MidiMessage

Prop Type
type string
note number
velocity number

About

Connect midi devices to your app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 22.9%
  • Java 22.2%
  • Swift 18.4%
  • SCSS 15.6%
  • JavaScript 10.7%
  • HTML 4.9%
  • Other 5.3%