From: Carl Worth Date: Fri, 27 Sep 2013 04:48:47 +0000 (-0700) Subject: Don't print root pitch for octaves and intervals X-Git-Url: https://git.cworth.org/git?p=scherzo;a=commitdiff_plain;h=de9c620550c07839b3cf24b814013630a478fb54 Don't print root pitch for octaves and intervals The bare pitch name looked too much like a major triad. --- diff --git a/scherzo.c b/scherzo.c index cffb25e..38f0c3d 100644 --- a/scherzo.c +++ b/scherzo.c @@ -932,9 +932,15 @@ scherzo_analyze_chord (scherzo_t *scherzo) _pitch_str (root), chord_name, inversion_str); } else { - chord_name = talloc_asprintf (local, "%s%s", - _pitch_str (root), - chord_name); + /* Don't print root pitch for octaves and inversions, + * (since a pitch name alone looks like a major triad) */ + if (num_notes < 3) { + chord_name = talloc_strdup (local, chord_name); + } else { + chord_name = talloc_asprintf (local, "%s%s", + _pitch_str (root), + chord_name); + } } } else { chord_name = talloc_strdup (local, "Unknown chord");