gridPointsOf function
Os ataques da grade para a regra rule: um por trecho que tem ataque, no ataque e
no fim do trecho, e no tempo do compasso (_beatOfAttack).
Implementation
List<ChordAttackPoint> gridPointsOf({
required List<ChordSpan> spans,
required ChordRule rule,
}) => [
for (final span in spans)
if (span.attackMs case final onMs?)
(
span: span,
rule: rule,
onMs: onMs,
offMs: span.endMs,
beat: _beatOfAttack(span, onMs),
),
];