generateHanonBrokenOctaves function

HanonPiece generateHanonBrokenOctaves(
  1. HanonBrokenExercise ex,
  2. int tone
)

O tom tone (0 a 23) do nº 56: a escala em oitavas quebradas, duas mãos, 4 compassos (e, no mi menor, o compasso final).

Implementation

HanonPiece generateHanonBrokenOctaves(HanonBrokenExercise ex, int tone) {
  final marks = hanonBrokenOctaveMarks[tone];
  return HanonPiece(
    sections: [
      HanonSection(
        hanonByBeat(_hand(tone, right: true), _hand(tone, right: false)),
      ),
      if (tone == _emIndex) HanonSection(_closing()),
    ],
    time: ex.time,
    key: hanonOctaveScaleTones[tone].key,
    // O livro liga em um só grupo as oito semicolcheias de meio compasso.
    beamUnits: 2 * kPatternDivisions,
    octaveShifts: [
      if (marks.rightShift != null)
        hanonOctaveRunShift(marks.rightShift!, staff: 1),
    ],
  );
}