From: Han-Wen Nienhuys Date: Sun, 16 Feb 2003 02:08:52 +0000 (+0000) Subject: * scm/chord-entry.scm (construct-chord): move chord construction X-Git-Tag: release/1.7.13~12 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=64a749c0b602dc8b1880122f40c2bf5f74940754;p=lilypond.git * scm/chord-entry.scm (construct-chord): move chord construction Scheme. * lily/parser.yy (new_chord): new setup for chord entry. --- diff --git a/lily/parser.yy b/lily/parser.yy index 617e3bdb60..001370dab4 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -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); } ; diff --git a/scm/chord-entry.scm b/scm/chord-entry.scm index 792fd1a49d..d68c31db19 100644 --- a/scm/chord-entry.scm +++ b/scm/chord-entry.scm @@ -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