]> git.cworth.org Git - scherzo/commitdiff
Don't print the inversion names
authorCarl Worth <cworth@cworth.org>
Fri, 27 Sep 2013 05:12:14 +0000 (22:12 -0700)
committerCarl Worth <cworth@cworth.org>
Fri, 27 Sep 2013 05:12:14 +0000 (22:12 -0700)
These were just too long for a very little bit of information,
(perhaps in the future I'll decide to bring back the inversion
information but with a style such as C/G for a C major triad in 2nd
inversion).

scherzo.c

index 1da182faec1647099decd654e4b5b408fe0f36bd..671d354a49ed56b5d628dae154e4f71d36fb7223 100644 (file)
--- a/scherzo.c
+++ b/scherzo.c
@@ -911,36 +911,14 @@ scherzo_analyze_chord (scherzo_t *scherzo)
     CHORD_NAME_KNOWN:
 
     if (chord_name) {
-       if (inversion) {
-           const char *inversion_str;
-           switch (inversion) {
-           case 1:
-               inversion_str = "1st inversion";
-               break;
-           case 2:
-               inversion_str = "2nd inversion";
-               break;
-           case 3:
-               inversion_str = "3rd inversion";
-               break;
-           default:
-               fprintf (stderr, "Internal error: Unexpected inversion: %d\n",
-                        inversion);
-               exit(1);
-           }
-           chord_name = talloc_asprintf (local, "%s%s %s",
-                                         _pitch_str (root),
-                                         chord_name, inversion_str);
+       /* 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 {
-           /* 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);
-           }
+           chord_name = talloc_asprintf (local, "%s%s",
+                                         _pitch_str (root),
+                                         chord_name);
        }
     } else {
        chord_name = talloc_strdup (local, "Unknown chord");