generateHanonThumb function
Monta o exercício ex como o livro: o modelo (tocado modelTimes vezes),
os compassos entre barras de repetição e a nota final.
Implementation
HanonPiece generateHanonThumb(HanonThumbExercise ex) {
return HanonPiece(
sections: [
if (ex.model != null)
HanonSection(
hanonBarNotes(ex.model!),
times: ex.modelTimes,
text: ex.modelText,
),
HanonSection([
for (final bar in ex.bars) ...hanonBarNotes(bar),
], times: ex.bodyTimes),
HanonSection(
hanonByBeat(
_final(
ex.finalRight,
right: true,
time: ex.time,
finger: ex.finalFingerRight,
),
_final(
ex.finalLeft,
right: false,
time: ex.time,
finger: ex.finalFingerLeft,
),
),
),
],
time: ex.time,
octaveShifts: [
for (final s in ex.octaveShifts)
PatternOctaveShift(from: s.from, to: s.to),
],
);
}