]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/chord-entry.scm (construct-chord): move chord construction
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 16 Feb 2003 02:08:52 +0000 (02:08 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 16 Feb 2003 02:08:52 +0000 (02:08 +0000)
Scheme.

* lily/parser.yy (new_chord): new setup for chord entry.

lily/parser.yy
scm/chord-entry.scm

index 617e3bdb60f78e37d03faf7c6ad398e871c8e687..001370dab40bb7b66cc957741355f7b772f2473d 100644 (file)
@@ -2002,8 +2002,8 @@ new_chord:
        ;
 
 chord_items:
-       chord_item {
-               $$ = gh_cons ($1, SCM_EOL);             
+       /**/ {
+               $$ = SCM_EOL;           
        }
        | chord_items chord_item {
                $$ = gh_cons ($2, $$);
@@ -2017,11 +2017,11 @@ chord_separator:
        | CHORD_CARET {
                $$ = ly_symbol2scm ("chord-caret"); 
        }
-       | CHORD_SLASH {
-               $$ = ly_symbol2scm ("chord-slash"); 
+       | CHORD_SLASH steno_tonic_pitch {
+               $$ = scm_list_n (ly_symbol2scm ("chord-slash"), $2, SCM_UNDEFINED); 
        }
-       | CHORD_BASS {
-               $$ = ly_symbol2scm ("chord-bass"); 
+       | CHORD_BASS steno_tonic_pitch {
+               $$ = scm_list_n (ly_symbol2scm ("chord-bass"), $2, SCM_UNDEFINED); 
        }
        ;
 
index 792fd1a49d59b34251fcc37455c1798d209d2c67..d68c31db1917967cd547d473b64006604ca186bd 100644 (file)
@@ -166,7 +166,7 @@ Side-effect: set BASS and INVERSION in containing body
                               (gobble-pitches tail)))
 
             ;; ugh. Simply add isolated pitches. This will give
-            ;; unexpected results. 
+            ;; unexpected results....
             ((ly:pitch? tag)
              (interpret-chord root
                               (add-pitches root chord tail)
@@ -177,9 +177,13 @@ Side-effect: set BASS and INVERSION in containing body
          ))
 
     (write-me "*******\n" flat-mods)
-    (set! complete-chord (interpret-chord root base-chord flat-mods))
     (write-me "pitches: " complete-chord)
     (write-me "bass: " bass)
+
+    (set! complete-chord (interpret-chord root base-chord flat-mods))
+    (set! complete-chord (sort complete-chord ly:pitch<?))
+    
+    ;; TODO: lower bass to be below chord.
     (process-inversion (make-chord complete-chord bass duration) inversion)
     
   ))