- (inv? (lambda (y)
- (and (= (ly:pitch-notename y)
- (ly:pitch-notename inversion))
- (= (ly:pitch-alteration y)
- (ly:pitch-alteration inversion)))))
- (rest-of-chord (remove inv? complete-chord))
- (inversion-candidates (filter inv? complete-chord))
- (down-inversion (pitch-octavated-strictly-below inversion root)))
- (if (pair? inversion-candidates)
- (set! inversion (car inversion-candidates))
- (begin
- (set! bass inversion)
- (set! inversion #f)))
- (if inversion
- (cons down-inversion rest-of-chord)
- rest-of-chord)))
+ (inv? (lambda (y)
+ (and (= (ly:pitch-notename y)
+ (ly:pitch-notename inversion))
+ (= (ly:pitch-alteration y)
+ (ly:pitch-alteration inversion)))))
+ (rest-of-chord (remove inv? complete-chord))
+ (inversion-candidates (filter inv? complete-chord))
+ (down-inversion (pitch-octavated-strictly-below inversion root)))
+ (if (pair? inversion-candidates)
+ (set! inversion (car inversion-candidates))
+ (begin
+ (set! bass inversion)
+ (set! inversion #f)))
+ (if inversion
+ (cons down-inversion rest-of-chord)
+ rest-of-chord)))