MethodChannelMidiNativeAudioBackend class

Native backend implementation backed by MethodChannel.

This class allows the package to interact with a platform-native low-latency sequencer/synth engine while keeping Dart-side MIDI mapping independent.

Implemented types

Constructors

MethodChannelMidiNativeAudioBackend({MethodChannel channel = const MethodChannel('flutter_notemus/native_audio'), MidiNativeMethodNames methods = const MidiNativeMethodNames()})
const

Properties

channel MethodChannel
final
hashCode int
The hash code for this object.
no setterinherited
methods MidiNativeMethodNames
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearScheduledEvents() Future<void>
Clears currently scheduled sequence events on native side.
override
dispose() Future<void>
Releases all native resources.
override
initialize({required String primarySoundFontPath, String? metronomeSoundFontPath, int sampleRate = 48000}) Future<bool>
Initializes native audio resources.
override
isReady() Future<bool>
Indicates whether native backend is initialized and ready.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processTies() Future<void>
Triggers tie processing in the native sequencer.
override
scheduleMetronome({required int totalTicks, int countInBeats = 0}) Future<void>
Schedules metronome events for the current sequence.
override
scheduleNote({required int midiNote, required int startTick, required int durationTicks, required int velocity, int channel = 0, bool isTied = false}) Future<void>
Schedules a note event in PPQ ticks.
override
setTempo(int bpm) Future<void>
Sets current sequencer tempo.
override
setTicksPerQuarter(int ticksPerQuarter) Future<void>
Sets ticks-per-quarter resolution used by scheduled PPQ events.
override
setTimeSignature({required int numerator, required int denominator}) Future<void>
Sets current sequencer time signature.
override
start() Future<void>
Starts native playback.
override
stop() Future<void>
Stops playback and keeps resources allocated.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited