stopNoteNow method

void stopNoteNow({
  1. required int noteNumber,
})

Handles a Note Off event on this track immediately. The event will not be added to this track's events.

Implementation

void stopNoteNow({required int noteNumber}) {
  final nextBeat = sequence.getBeat();
  final event = MidiEvent.ofNoteOff(beat: nextBeat, noteNumber: noteNumber);

  NativeBridge.handleEventsNow(
      id, [event], Sequence.globalState.sampleRate!, sequence.tempo);
}