]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/chord-entry.scm
(context-doc): add aliases to
[lilypond.git] / scm / chord-entry.scm
index 7c9bbfe8398faa0430e2f66dfd69aec63b2995f2..6b047797ffb851abe08bb6ad4e61f4632b0aaa90 100644 (file)
@@ -67,10 +67,11 @@ Entry point for the parser.
     
     (define (interpret-additions  chord mods)
       "Interpret additions. TODO: should restrict modifier use?"
+      
       (cond
        ((null? mods) chord)
        ((ly:pitch? (car mods))
-       (if (= (ly:pitch-steps (car mods)) 11)
+       (if (= (pitch-step (car mods)) 11)
            (set! explicit-11 #t))
        (interpret-additions
         (cons (car mods) (remove-step (pitch-step (car mods)) chord))
@@ -112,8 +113,8 @@ the bass specified.
                           (ly:pitch-alteration inversion))
                        )))
                 
-          (rest-of-chord (filter-out-list inv? complete-chord))
-          (inversion-candidates (filter-list inv? complete-chord))
+          (rest-of-chord (remove inv? complete-chord))
+          (inversion-candidates (filter inv? complete-chord))
           (down-inversion (pitch-octavated-strictly-below inversion root))
           )
 
@@ -149,6 +150,8 @@ the bass specified.
          (set! flat-mods (cdr flat-mods))
          ))
 
+    
+
     ;; extract first  number if present, and build pitch list.
     (if (and (pair? flat-mods)
             (ly:pitch?  (car flat-mods))
@@ -157,7 +160,7 @@ the bass specified.
        
        (begin
          (if (=  (pitch-step (car flat-mods)) 11)
-             (set! explicit-11  #t))
+             (set! explicit-11 #t))
          (set! base-chord
                (stack-thirds (car flat-mods) the-canonical-chord))
          (set! flat-mods (cdr flat-mods))
@@ -167,13 +170,12 @@ the bass specified.
     (if (procedure? lead-mod)
        (set! base-chord (lead-mod base-chord)))
 
-    
+
     (set! complete-chord
          (if start-additions
           (interpret-additions base-chord flat-mods)
           (interpret-removals base-chord flat-mods)
           ))
-
     
     (set! complete-chord (map (lambda (x) (ly:pitch-transpose x root))
                              (sort complete-chord ly:pitch<?)))
@@ -186,8 +188,10 @@ the bass specified.
             (= 0 (ly:pitch-alteration (get-step 11 complete-chord)))
             (= 0 (ly:pitch-alteration (get-step 3 complete-chord)))
             )
-            
-       (set! complete-chord (remove-step 11  complete-chord))
+       (begin
+         (set! complete-chord (remove-step 11  complete-chord))
+         )
+         
        )
 
     (if inversion
@@ -205,7 +209,7 @@ the bass specified.
          (write-me "bass: " bass)))
 
 
-    
+
     (if inversion
        (make-chord (cdr complete-chord) bass duration (car complete-chord)
                    inversion)