React Native Pitch Tracker implemented with Tensorflow Lite Model
npm install react-native-pitch-tracker-extended
React Native Pitch Tracker implemented with Tensorflow Lite Model
- [x] iOS/iPadOS Implementation
- [x] Android Implementation
- update kotlin plugin
``sh`
npm install --save react-native-pitch-tracker react-native-permissions
- Open your project's Info.plist in XCode, and add NSMicrophoneUsageDescription row.
- Or in other editor, add this row in the plist.
`plist
NSMicrophoneUsageDescription
YOUR TEXT
`
- Open your project's Podfile and update with these lines.
`ruby
target 'YourAwesomeProject' do # …
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Microphone', :path => "#{permissions_path}/Microphone.podspec"
end
`$3
- Copy the downloaded file(tflite model) to {ProjDirectory}/android/app/src/main/assets.
- After that, update the build.gradle
`gradle
android { // …
aaptOptions {
noCompress "tflite"
}
}
`
$3
`js
import PitchTracker from "react-native-pitch-tracker";// ...
// Must do before start()
PitchTracker.prepare()
// Event Subscription (Add function to parameter)
PitchTracker.noteOn((res) => {
console.log('Note On: ' + res['midiNum']);
}); // Note On: 60
PitchTracker.noteOff((res) => {
console.log('Note Off: ' + res['midiNum']);
}); // Note Off: 60
// Start PitchTracker Engine
PitchTracker.start()
// Stop PitchTracker Engine
PitchTracker.stop()
``See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT