android_midi 0.20.0 copy "android_midi: ^0.20.0" to clipboard
android_midi: ^0.20.0 copied to clipboard

PlatformAndroid

A Flutter plugin for advanced MIDI device control and messaging on Android, with native performance.

0.20.0 Channel Management & Performance Optimization #

This update introduces a major refactoring of the MIDI communication layer to improve code quality, enhance channel management flexibility, and optimize performance for low-latency applications.

New Features

  • Dynamic Channel Control: The MIDI API now supports sending messages to single, multiple, or all 16 MIDI channels dynamically using a new channels parameter.
  • Performance Optimization (Batching): All MIDI messages are now batched and sent in a single sendRawData platform call. This significantly reduces the overhead of crossing the Dart-to-native bridge, minimizing latency and jitter.
  • Improved Code Structure: The refactoring separates the data preparation logic from the data transmission logic.
    • MidiChannel is a new class responsible for preparing raw MIDI byte data for individual channels.
      • AndroidMidi handles the orchestration, collecting data from multiple MidiChannel objects and sending it in a single, batched operation.
  • Major API refactor: all MIDI methods now use named parameters for clarity and future-proofing.
  • UI integration for custom MIDI message sending.
  • Improved error handling and comments throughout the codebase.
  • Updated widget tests to match new UI and API signatures.

Breaking Changes

  • The send... methods (e.g., sendNoteOn, sendControlChange) no longer take a channel parameter. This has been replaced by the new optional channels parameter, which accepts a List<int>.

How to Use

  • Single Channel: To send a message to channel 5, use sendNoteOn(..., channels: [5]).
  • Multiple Channels: To send a message to channels 0 and 1, use sendNoteOn(..., channels: [0, 1]).
  • All Channels: To broadcast a message to all channels, simply omit the channels parameter: sendNoteOn(...).

0.1.0 #

  • Initial public release.
  • Core MIDI device and event models (note on/off, control change, program change, pitch bend, aftertouch, SysEx).
  • High-level APIs for playing notes, chords, arpeggios, sequences, and phrases with tempo control.
  • Real-time MIDI input/output streams.
  • Platform interface and method channel for Android MIDI.
  • Native JNI integration for low-latency MIDI messaging.
  • Example app and test coverage for all main features.
0
likes
160
points
17
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin for advanced MIDI device control and messaging on Android, with native performance.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on android_midi

Packages that implement android_midi