Skip to content

musetrainer/capacitor-musetrainer-midi

Repository files navigation

license version

capacitor-musetrainer-midi

Capacitor MIDI plugin by MuseTrainer. Use internally in MuseTrainer app.

Supports

  • Web
  • iOS
  • Android

Install

npm install capacitor-musetrainer-midi
npx cap sync

API

addListener('deviceChange' | 'commandReceive' | 'connectError', ...)

addListener(eventName: 'deviceChange' | 'commandReceive' | 'connectError', listenerFunc: (args: any) => void) => Promise<PluginListenerHandle>
Param Type
eventName 'deviceChange' | 'commandReceive' | 'connectError'
listenerFunc (args: any) => void

Returns: Promise<PluginListenerHandle>


sendCommand(...)

sendCommand({ command, timestamp, }: { command: number[]; timestamp: number; }) => Promise<void>
Param Type
__0 { command: number[]; timestamp: number; }

listDevices()

listDevices() => Promise<{ devices: any[]; }>

Returns: Promise<{ devices: any[]; }>


Interfaces

PluginListenerHandle

Prop Type
remove () => Promise<void>