{ {0, 3, 6}, "Diminished triad" }
};
+ struct { int pitches[4]; const char *name; } sevenths[] = {
+ { {0, 4, 8, 11}, "Augmented/major 7" },
+ { {0, 4, 7, 11}, "Major 7" },
+ { {0, 4, 7, 10}, "Dominant 7" },
+ { {0, 3, 7, 11}, "Minor/major 7" },
+ { {0, 3, 7, 10}, "Minor 7" },
+ { {0, 3, 6, 10}, "Half-diminished 7" },
+ { {0, 3, 6, 9}, "Diminished 7" },
+ { {0, 4, 8, 10}, "Augmented 7" },
+ { {0, 3, 6, 11}, "Diminished/major 7" },
+ };
+
if (scherzo->chord) {
score_remove_chord (scherzo->chord);
scherzo->chord = NULL;
chord_name = triads[i].name;
}
-/*
- for (i = 0; i < num_sevenths; i++) {
- if (_chord_signature_matches (notes, num_notes, seventh[i].pitches, 4))
- chord_name = seventh[i].name;
+ for (i = 0; i < ARRAY_SIZE(sevenths); i++) {
+ if (_chord_signature_matches (notes, num_notes, sevenths[i].pitches, 4))
+ chord_name = sevenths[i].name;
}
-*/
if (chord_name)
scherzo->chord = score_add_chord (scherzo->treble, chord_name);