sightRoundOrnaments function
- SightExercise ex,
- SightStep step
O que a rodada de ex passa ao teclado (T10, ScoreRound.ornaments e
freeNotes; T11, groups): cada nota com ornamento, pelo id, com as notas
dele em frações da nota (sightOrnamentNotes, como OrnamentPart), as
apojaturas breves, que não se cobram, e as notas de cada fioritura
(sightFioritureGroups). O Verovio só toca a nota escrita do trilo, do
mordente e do grupeto; com isto, a rodada e a prévia os tocam por extenso.
Implementation
({
Map<String, List<OrnamentPart>> ornaments,
Set<String> free,
Map<String, int> groups,
})
sightRoundOrnaments(SightExercise ex, SightStep step) {
final ornaments = <String, List<OrnamentPart>>{};
final free = <String>{};
for (final e in sightEvents(ex)) {
if (e.grace) free.add(e.ids.first);
if (e.ornament == null || e.ticks <= 0) continue;
ornaments[e.ids.first] = [
for (final (midi, start, ticks) in sightOrnamentNotes(
e,
ex.tonicAt(e.measure),
upperFirst: sightTrillFromAbove(step),
))
(pitch: midi, start: start / e.ticks, end: (start + ticks) / e.ticks),
];
}
return (ornaments: ornaments, free: free, groups: sightFioritureGroups(ex));
}