generateHanonTremolo function
Monta o nº 60: os seis trechos do livro, sem repetição.
Implementation
HanonPiece generateHanonTremolo(HanonTremoloExercise ex) {
assert(
hanonTremoloSections.fold<int>(0, (a, b) => a + b) == _bars.length,
'os trechos somam ${_bars.length} compassos',
);
final sections = <HanonSection>[];
var at = 0;
for (final length in hanonTremoloSections) {
sections.add(
HanonSection([for (var i = at; i < at + length; i++) ..._bar(i)]),
);
at += length;
}
return HanonPiece(
sections: sections,
time: ex.time,
unitsPerQuarter: hanonTremoloUnits,
octaveShifts: [
PatternOctaveShift(
from: hanonTremoloRightShift.from,
to: hanonTremoloRightShift.to,
),
],
);
}