Skip to content
Branch: master
Find file History
ekomisarenko Latest simulators of iOS 13 are playing midi files
The conditional compilation is not required anymore as the latest version of the iOS13 simulators from Xcode 11 from Catalina 10.15 can play the midi files with no issue.
Latest commit a8f0302 Oct 9, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
.idea Upating Feb 22, 2019
.vscode Updating Versions May 6, 2019
android Updating Format May 6, 2019
example Updating Versions May 6, 2019
ios Latest simulators of iOS 13 are playing midi files Oct 9, 2019
lib Updating Versions May 6, 2019
.gitignore adding flutter_midi Sep 21, 2018
CHANGELOG.md Updating Versions May 6, 2019
LICENSE Updating License's Mar 1, 2019
README.md Adding Donation Links May 3, 2019
flutter_midi.iml Upating Feb 22, 2019
flutter_midi_android.iml Updated Flutter_Midi Jan 29, 2019
local.properties Updated Flutter_Midi Jan 29, 2019
pubspec.yaml Updating Versions May 6, 2019

README.md

Buy Me A Coffee Donate

flutter_midi

A FLutter Plugin to Play midi on iOS and Android. This uses SoundFont (.sf2) Files.

Instalation

Download a sound font file, example: sound_font.SF2 file here.

Create an /assets folder and store the .sf2 files

Update pubspec.yaml

assets:
   - assets/sf2/Piano.SF2
   - assets/sf2/SmallTimGM6mb.sf2

Load the sound font to prepare to play;

 @override
  void initState() {
    load('assets/sf2/Piano.SF2');
    super.initState();
  }
  
 void load(String asset) async {
    FlutterMidi.unmute(); // Optionally Unmute
    ByteData _byte = await rootBundle.load(asset);
    FlutterMidi.prepare(sf2: _byte);
  }

Play and Stop the Midi Notes

 FlutterMidi.playMidiNote(midi: 60);

 FlutterMidi.stopMidiNote(midi: 60);
You can’t perform that action at this time.