- (cond
- ((null? mods) chord)
- ((ly:pitch? (car mods))
- (if (= (ly:pitch-steps (car mods)) 11)
- (set! explicit-11 #t))
- (interpret-additions
- (cons (car mods) (remove-step (pitch-step (car mods)) chord))
- (cdr mods)))
- ((procedure? (car mods))
- (interpret-additions
- ((car mods) chord)
- (cdr mods)))
- (else (interpret-removals chord mods))
- ))
-
+ (cond ((null? mods) chord)
+ ((ly:pitch? (car mods))
+ (if (= (pitch-step (car mods)) 11)
+ (set! explicit-11 #t))
+ (interpret-additions (cons (car mods) (remove-step (pitch-step (car mods)) chord))
+ (cdr mods)))
+ ((procedure? (car mods))
+ (interpret-additions ((car mods) chord)
+ (cdr mods)))
+ (else (interpret-removals chord mods))))
+
+ (define (pitch-octavated-strictly-below p root)
+ "return P, but octavated, so it is below ROOT"
+ (ly:make-pitch (+ (ly:pitch-octave root)
+ (if (> (ly:pitch-notename root)
+ (ly:pitch-notename p))
+ 0 -1))
+ (ly:pitch-notename p)
+ (ly:pitch-alteration p)))
+