]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/parser.yy
* lily/parser.yy (step_number): semitones for chord entry too.
[lilypond.git] / lily / parser.yy
index 88a815741b5afba58bcfe920b5070e320ddc89d0..ee022a618511671e0ee5e9b8629e10f845e4ef70 100644 (file)
@@ -163,10 +163,11 @@ SCM
 make_chord_step (int step, int alter)
 {
        if (step == 7)
-               alter--;
+               alter += FLAT;
 
-       /* ugh: fucks up above 13 */
-       Pitch m(step > 7 ? 1 : 0,(step - 1) % 7, alter);
+       while(step < 0)
+               step += 7;
+       Pitch m((step -1) / 7 , (step - 1) % 7, alter);
        return m.smobbed_copy ();
 }
 
@@ -2150,10 +2151,10 @@ step_number:
                $$ = make_chord_step ($1, 0);
         } 
        | bare_unsigned '+' {
-               $$ = make_chord_step ($1, 1);
+               $$ = make_chord_step ($1, SHARP);
        }
        | bare_unsigned CHORD_MINUS {
-               $$ = make_chord_step ($1,-1);
+               $$ = make_chord_step ($1, FLAT);
        }
         ;