(define (natural-chord-alteration p)
"Return the natural alteration for step P."
(if (= (ly:pitch-steps p) 6)
- -1
+ FLAT
0))
+;;
+;; TODO: make into markup.
+;;
(define-public (alteration->text-accidental-markup alteration)
(make-smaller-markup
(make-raise-markup
- (if (= alteration -1)
+ (if (= alteration FLAT)
0.3
0.6)
(make-musicglyph-markup
(make-line-markup (list empty-markup))
(conditional-kern-before
(alteration->text-accidental-markup alteration)
- (= alteration -1) 0.2
+ (= alteration FLAT) 0.2
)))
"
(let* ((name (ly:pitch-notename pitch))
(alt (ly:pitch-alteration pitch))
- (n-a (if (member (cons name alt) '((6 . -1) (6 . -2)))
+ (n-a (if (member (cons name alt) `((6 . ,FLAT) (6 . ,DOUBLE-FLAT)))
(cons 7 (+ (if B-instead-of-Bb 1 0) alt))
(cons name alt))))
(make-line-markup
(define-public (note-name->german-markup pitch)
(let* ((name (ly:pitch-notename pitch))
(alt (ly:pitch-alteration pitch))
- (n-a (if (member (cons name alt) '((6 . -1) (6 . -2)))
- (cons 7 (+ 1 alt))
+ (n-a (if (member (cons name alt) `((6 . ,FLAT) (6 . ,DOUBLE-FLAT)))
+ (cons 7 (+ SEMI-TONE alt))
(cons name alt))))
(make-line-markup
(list
(string-append
- (list-ref '("c" "d" "e" "f" "g" "a" "h" "b") (car n-a))
+ (list-ref '("c" "d" "e" "f" "g" "a" "h" "b") (car n-a) )
(if (or (equal? (car n-a) 2) (equal? (car n-a) 5))
- (list-ref '( "ses" "s" "" "is" "isis") (+ 2 (cdr n-a)))
- (list-ref '("eses" "es" "" "is" "isis") (+ 2 (cdr n-a)))))))))
+ (list-ref '( "ses" "s" "" "is" "isis") (+ 2 (/ (cdr n-a) 2) ))
+ (list-ref '("eses" "es" "" "is" "isis") (+ 2 (/ (cdr n-a) 2) ))
+ ))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
(define (is-req-chord? m)
(and
(memq 'event-chord (ly:get-mus-property m 'types))
- (not (equal? (ly:make-moment 0 1) (ly:get-music-length m)))))
+ (not (equal? ZERO-MOMENT (ly:music-length m)))))
(let* ((elts (filter is-req-chord? (ly:get-mus-property seq 'elements)))
(alist (map chord-to-exception-entry elts)))