generateHanonScale function

HanonPiece generateHanonScale(
  1. HanonScaleExercise ex,
  2. int tone
)

O bloco tone (0 a 35) do nº 39: a escala duas vezes e a cadência.

Implementation

HanonPiece generateHanonScale(HanonScaleExercise ex, int tone) {
  final block = hanonScaleBlocks[tone];
  return HanonPiece(
    sections: [
      HanonSection(
        hanonByBeat(_hand(block, right: true), _hand(block, right: false)),
        times: 2,
      ),
      HanonSection(_cadence(block)),
    ],
    time: ex.time,
    key: block.key,
    // 8va: do 4.º compasso (índice 3) às quatro primeiras notas do 5.º.
    octaveShifts: const [
      PatternOctaveShift(from: 3, to: 4, endAfter: 4 * _sixteenth),
    ],
  );
}