harmonyProblems function
- List<
HarmonySegment> segments, - List<
HarmonyChord> chords
Os avisos do autor: os trechos (com nota) em que nenhum acorde de chords
cabe. Ex.: "o compasso 5 não tem acorde em chords que contenha Fá♯".
Implementation
List<String> harmonyProblems(
List<HarmonySegment> segments,
List<HarmonyChord> chords,
) {
final out = <String>[];
for (final segment in segments) {
if (fittingChords(segment, chords).isNotEmpty) continue;
final note = segment.first;
if (note == null) continue;
out.add(
'o compasso ${segment.measure + 1} não tem acorde em `chords` que '
'contenha ${pitchNameOf(note.pitch)}',
);
}
return out;
}