capacitor-musetrainer-pitch-detection
Capacitor Pitch Detection plugin, by authors of MuseTrainer app.
Supports
- [x] iOS
- [ ] Android
- [ ] Web
Install
npm install capacitor-musetrainer-pitch-detection
npx cap sync
API
addListener('pitchReceive', ...)
addListener(eventName: 'pitchReceive', listenerFunc: (pitch: Pitch) => void) => Promise<PluginListenerHandle>
Param | Type |
---|---|
eventName |
'pitchReceive' |
listenerFunc |
(pitch: Pitch) => void |
Returns: Promise<PluginListenerHandle>
checkPermissions()
checkPermissions() => Promise<PermissionStatus>
Returns: Promise<PermissionStatus>
requestPermissions()
requestPermissions() => Promise<PermissionStatus>
Returns: Promise<PermissionStatus>
Interfaces
PluginListenerHandle
Prop | Type |
---|---|
remove |
() => Promise<void> |
PermissionStatus
Prop | Type |
---|---|
microphone |
PermissionState |
Type Aliases
Pitch
{ freq: number; amp: number; note: string; noteAlt: string; }
PermissionState
'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'