expectedLabel method

String expectedLabel(
  1. NoteNaming naming, {
  2. required bool withOctave,
})

O nome da nota esperada, na nomenclatura naming: o de spelled quando há; senão o do MIDI (expectedPitch, o dó central se faltar).

Implementation

String expectedLabel(NoteNaming naming, {required bool withOctave}) {
  final written = spelled;
  if (written != null) {
    return noteLabel(written, naming, withOctave: withOctave);
  }
  return midiLabel(expectedPitch ?? 60, naming, withOctave: withOctave);
}