hanonLegatoScaleShown function

bool hanonLegatoScaleShown(
  1. int k, {
  2. required bool right,
})

As terças em que o livro escreve os dedos: o começo de cada ciclo de três (e, só na direita, as três primeiras) e, na esquerda, o último ciclo inteiro (45 a 47).

Implementation

bool hanonLegatoScaleShown(int k, {required bool right}) {
  if (k <= hanonLegatoScalePeak) {
    return (k - 1) % 3 == 0 && k <= 22 || (right && k <= 3);
  }
  if ((k - hanonLegatoScalePeak) % 3 == 0 && k >= 27 && k <= 45) return true;
  return !right && k >= 46 && k <= 47;
}