A Native Module to play MIDI files in a React Native application. This module wraps AVMIDIPlayer on iOS and MediaPlayer on Android.
On iOS, by default the player will just generate sine waves. You can specify a sound bank with the .sf2 extension.
On Android, the player will use a nice piano soundfont. There is no way to specify a soundfont on Android with MediaPlayer unfortunately :(
npm install react-native-midi-playback
import MidiPlayback from "react-native-midi-playback";
// ...
MidiPlayback.setPlaybackFile(path);
// -------------- Only on iOS
MidiPlayback.setSoundBank(soundBankPath);
// --------------
MidiPlayback.play();
See the contributing guide to learn how to contribute to the repository and the development workflow.
Thank you to MIDIPlayer
MIT