generateHanonSustained function
Monta o nº 58, como o livro: os 18 compassos tocados duas vezes (a barra de repetição no fim) e o acorde final.
Implementation
HanonPiece generateHanonSustained(HanonSustainedExercise ex) {
final beats = hanonSustainedBeats();
final body = <PatternNote>[];
// O índice do tempo conta os compassos de 4 tempos; a mínima ocupa dois.
var slot = 0;
for (final beat in beats) {
body.addAll(
hanonByBeat(
_notes(beat, slot, right: true),
_notes(beat, slot, right: false),
),
);
slot += beat.half ? 2 : 1;
}
return HanonPiece(
sections: [HanonSection(body, times: 2), HanonSection(_closing())],
time: ex.time,
octaveShifts: hanonSustainedShifts(),
);
}