Timing.withinNoteList constructor

Timing.withinNoteList({
  1. required int listLength,
  2. required int noteIndex,
})

Create a Timing for a Note using Timing.unspecified based on the index of the Note in a List

Implementation

factory Timing.withinNoteList(
    {required int listLength, required int noteIndex}) {
  assert(noteIndex > -1 && noteIndex < listLength);
  return Timing(notesPerMeasureToNoteType(listLength), noteIndex + 1);
}