prefersFlats function

bool prefersFlats(
  1. Pitch tonic, {
  2. bool minor = false,
})

Se o tom se escreve com bemóis (a armadura dele é de bemóis). Um menor conta pela relativa maior.

Implementation

bool prefersFlats(Pitch tonic, {bool minor = false}) {
  final major = minor ? spellAbove(tonic, 2, 3) : tonic;
  return majorFifths(major) < 0;
}