PackageTrack
Sign in Get early access

flutter_midi_pro

The `flutter_midi_pro` plugin provides functions for loading SoundFont (.sf2) files, changing instruments and playing notes with midi commands.

4.0.4 2.5K downloads/mo #4981 most downloaded on pub.dev MelihHakanPektas/flutter_midi_pro

What this package is like to depend on

Last release 1 months ago

10 Jul 2026

Release timing varies

gaps range from 4 weeks to 1.1 years

Nearly every release is documented

notes for 21 of 23 stable releases

Nothing withdrawn

no release was ever pulled

3 years old

23 releases · first in 2023

7 releases in the last 12 months

see the full history below

Release timeline

23 releases · May 2023 to Jul 2026
2024 2025 2026
Release Pre-release

Releases

latest 23
  1. 4.0.4 10 Jul 2026
    Release notes
    Open source →
  2. 4.0.3 08 Jul 2026
    Release notes
    • Readme updated to point to the new example directory.
    Open source →
  3. 4.0.2 08 Jul 2026
    Release notes
    • No longer applies the Kotlin Gradle Plugin on Flutter versions with built-in Kotlin support (AGP 9+); on older versions it is applied conditionally, so the minimum supported Flutter version is unchanged (#54). The kotlinOptions block was replaced with the kotlin.compilerOptions DSL accordingly.
    Open source →
  4. 4.0.1 08 Jul 2026
    Release notes
    • The audio session is re-activated before restarting the engine, and playNote self-heals a stopped engine as a last resort (thanks @avour, #55).
    Open source →
  5. 4.0.0 08 Jul 2026
    Release notes
    • BREAKING: Added an explicit lifecycle. The package no longer starts working just by being added: init() must be called before any other method. Calling any method before init() throws a StateError.
    • BREAKING: dispose() now fully shuts the synthesizer down and requires the package to be initialized; calling it while not initialized throws a StateError. After dispose() you can call init() again — the init/dispose cycle can be repeated any number of times.
    • Calling init() while already initialized throws a StateError instead of silently re-initializing.
    • Added the isInitialized getter to query the current lifecycle state.
    • MidiPro is now a true singleton: every MidiPro() call returns the same instance.
    • init() is hot-restart safe: a native engine surviving a Flutter hot restart is reset and re-created cleanly.
    • Fixed the audible pop on the speaker when loading a soundfont on Android. The audio driver is now created once in init() and kept alive, instead of opening/closing an audio stream on every load/unload.
    • Android now uses a single FluidSynth engine for all soundfonts. Each soundfont gets its own block of 16 MIDI channels, so the Dart API is unchanged. Up to 16 soundfonts can be loaded at once.
    • The audio driver now prefers Oboe (AAudio) and falls back to OpenSLES.
    • Removed the system-wide mute/unmute workaround on Android. Loading a soundfont no longer touches the device media volume and is ~250 ms faster.
    • Polyphony on Android is now 64 voices shared across all soundfonts (was 32 per soundfont).
    • Fixed a native memory leak when unloading soundfonts on Android.
    • Upgraded FluidSynth from 2.4.8 to 2.5.6 (official Android binaries), which includes fixes for six security vulnerabilities in SF2/MIDI/DLS file parsing. The plugin now builds with ANDROID_STL=c++_shared (the official binaries require the NDK's libc++_shared.so), and the unused OpenMP runtime is no longer packaged.
    • The FluidSynth binaries (~106 MB unpacked) are no longer shipped inside the package. They are downloaded once at build time from the official FluidSynth GitHub release (checksum-verified) and cached in the Gradle user home; a vendored copy at android/src/main/cpp/fluidsynth is supported for offline builds. This shrinks the pub.dev package and the repository dramatically.
    • Removed the CMake 3.22.1 requirement. The Android Gradle Plugin now auto-installs its bundled CMake; any CMake from 3.18 up to and including 4.x works (fixes "CMake '3.22.1' was not found" build errors, also with cmake.dir on Linux).
    • Fixed a temp-file leak: loadSoundfontData wrote a new timestamped file on every call and never deleted it. Temporary soundfont copies are now tracked and deleted when the soundfont is unloaded or dispose() is called, and leftovers from crashed sessions are cleaned up on init().
    • Fixed wrong soundfont data being loaded when two soundfonts from different folders share the same file name (the temp copy is now keyed by the full source path), and stale copies being served after the source asset/file changed (the copy is rewritten on every load).
    • Android now releases the audio engine and all loaded soundfonts when the Flutter engine detaches, even if the app never called dispose().
    • Fixed crashes on iOS/macOS when playNote/stopNote/selectInstrument/controlChange were called with an unknown soundfont ID or an out-of-range channel; these calls are now silently ignored, matching the Android behavior. stopAllNotes/unloadSoundfont with an unknown ID no longer return an error either.
    • iOS/macOS now stop any already-started audio engines when a soundfont load fails halfway through.
    • Added pitchBend(value, channel, sfId): 14-bit pitch wheel messages (0-16383, center 8192) on all platforms.
    • Added setPitchBendRange(semitones, channel, sfId): pitch bend sensitivity per channel (RPN 0 on iOS/macOS).
    • Added channelPressure(pressure, channel, sfId) and keyPressure(key, pressure, channel, sfId): channel and polyphonic aftertouch.
    • Added setMasterGain(gain): global output volume as a linear multiplier (1.0 default; boost supported).
    • Added panic(): instantly silences every channel of every loaded soundfont and recenters pitch bend, without touching selected instruments.
    • Added sendMidiEvent(status, data1, data2, sfId): raw MIDI channel message passthrough for bridging hardware MIDI input.
    • init() now accepts configuration options: sampleRate (match the device's native rate to lower latency), bufferSize (audio period size in frames) and polyphony (maximum simultaneous voices). On iOS these map to the audio session's preferred sample rate / IO buffer duration.
    • Added SF2 preset listing: getPresets(sfId) returns the (bank, program, name) list of a loaded soundfont, and the static MidiPro.parseSoundfontPresets(bytes) parses raw sf2 data. Pure Dart, works on all platforms.
    • Added built-in reverb and chorus control: setReverb(enabled, roomSize, damping, width, level) and setChorus(enabled, voiceCount, level, speed, depth). Currently Android-only (FluidSynth); no-op on iOS/macOS for now.
    • BREAKING (sound): FluidSynth's reverb and chorus modules used to be active by default on Android (with default parameters), while iOS was always dry. Both now start disabled on every platform, so all platforms sound identical until setReverb/setChorus are called. If you relied on the old default Android reverb, call setReverb(enabled: true) after init.
    • Added a MIDI file player (Android-only for now): loadMidiFile/loadMidiAsset/loadMidiData, playMidi/pauseMidi/stopMidi, seekMidi(tick), setMidiTempo(factor) (pitch-preserving speed for practice), setMidiLoop(count) and getMidiPlayerState() (status, position, BPM, PPQ). Player events are routed into the target soundfont's channels, so instrument selection and expression controls apply to file playback.
    • iOS/macOS: rebuilt on a single shared AVAudioEngine. All samplers now feed one engine through a global mixer and a fixed effect chain (EQ → delay → distortion → reverb), instead of 16 engines per soundfont — much lower CPU/memory, one interruption-recovery point and a real effects insertion point.
    • Added configureAudioSession(category, mixWithOthers, duckOthers) (iOS only): control how the synth coexists with other audio — keep background music playing, survive video/ad session takeovers, ignore the ring/mute switch with the playback category. Callable at any time.
    • iOS/macOS now recover automatically from route changes (headphone unplug, Bluetooth) and, on iOS, from media services resets: the whole engine, samplers and loaded banks are rebuilt from tracked state.
    • setReverb now works on iOS/macOS too: roomSize maps to the closest reverb preset, level to the wet/dry mix (damping/width remain Android-only).
    • Added setEqualizer(enabled, bassGain, midGain, trebleGain), setDelay(enabled, time, feedback, lowPassCutoff, wetDryMix) and setDistortion(enabled, preset, preGain, wetDryMix) — iOS/macOS only, no-op on Android.
    • Fixed instrument switching on iOS/macOS (issue #34): selectInstrument no longer sends a redundant program change that used the wrong (melodic) bank for percussion and could undo the selection. macOS also gained the percussion bank (128) mapping that iOS already had.
    • Fixed occasional pops on Android dispose()/init() cycles. Stream open/close transitions pop on some devices even in silence, so init/dispose cycles now reuse the running audio stream instead of closing and reopening it: dispose() fades the output, silences and resets the engine but keeps the stream warm; the stream is actually closed ~30 s after dispose or when the plugin detaches, and any real close is preceded by a fade + silence drain.
    Open source →
  6. 3.1.6 24 Oct 2025
    Release notes
    • Sustain added.
    • stopAllNotes method updated to turn off sustain before stopping notes.
    Open source →
  7. 3.1.5 22 Oct 2025
    Release notes
    • Support for 16kb page size
    • Version bump for android side
    Open source →
  8. 3.1.4 28 Aug 2024
    Release notes
    • Cmake minsdkversion fix
    Open source →
  9. 3.1.3 06 Jun 2024
    Release notes
    • Sound level fix.
    Open source →
  10. 3.1.2 06 Jun 2024
    Release notes
    • 1 second delay added when loading sf2 file.
    Open source →
  11. 3.1.1 30 May 2024
    Release notes
    • Low sound level on Android was fixed.
    Open source →
  12. 3.1.0 30 May 2024
    Release notes
    • Click sound when loading sf2 file was fixed.
    Open source →
  13. 3.0.1 27 Apr 2024
    Release notes
    • Readme updated.
    Open source →
  14. 3.0.0 22 Apr 2024
    Release notes
    • Stop all notes deleted.
    • Init method deleted.
    • Android sythesizer method changed to fluidsynth for better performance, stability and sound quality.
    • iOS method equalizated with Android methods.
    Open source →
  15. 2.0.1 02 Mar 2024
    Release notes
    • Stop all notes added.
    Open source →
  16. 2.0.0 02 Mar 2024
    Release notes
    • Instrument change added.
    • Faster and more stable especially for Android.
    Open source →
  17. 1.0.6 10 Jun 2023
    Release notes
    • Instance error fixed.
    Open source →
  18. 1.0.5 15 May 2023

    Nothing published for this version

  19. 1.0.4 15 May 2023
    Release notes
    • Class name FlutterMidiPro to MidiPro
    Open source →
  20. 1.0.3 15 May 2023
    Release notes
    • Minor fix.
    Open source →
  21. 1.0.2 15 May 2023

    Nothing published for this version

  22. 1.0.1 12 May 2023
    Release notes
    • Readme added.
    Open source →
  23. 1.0.0 12 May 2023
    Release notes
    • Initial release.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive