ofNoteOff static method

MidiEvent ofNoteOff({
  1. required double beat,
  2. required int noteNumber,
})

Implementation

static MidiEvent ofNoteOff({
  required double beat,
  required int noteNumber,
}) {
  if (noteNumber > 127 || noteNumber < 0)
    throw 'noteNumber must be in range 0-127';

  return MidiEvent(
    beat: beat,
    midiStatus: 128,
    midiData1: noteNumber,
    midiData2: 0,
  );
}