sightClicks function
- SightExercise ex,
- SightPlayback play
Os cliques do metrônomo da frase de ex, como o aluno os ouve ao tocar: a
contagem de SightPlayback.countInBeats e uma batida por semínima até o fim,
com o tempo forte no primeiro de cada compasso.
Implementation
List<PhraseClick> sightClicks(SightExercise ex, SightPlayback play) {
final beatSeconds = 60 / play.bpm;
final perMeasure = (ex.ticksPerMeasure / sightTicksPerQuarter).ceil();
final start = sightPhraseOffset(play) - play.countInBeats * beatSeconds;
final total = play.countInBeats + ex.measures * perMeasure;
return [
for (var k = 0; k < total; k++)
PhraseClick(start + k * beatSeconds, accent: k % perMeasure == 0),
];
}