Index: scm/chord-generic-names.scm |
diff --git a/scm/chord-generic-names.scm b/scm/chord-generic-names.scm |
index d1c8005c4a6dd583b45ddbc1a3d1646098eb34b0..7455108fe6c3a518448b5f4e96e8dae8a9b564b7 100644 |
--- a/scm/chord-generic-names.scm |
+++ b/scm/chord-generic-names.scm |
@@ -23,7 +23,15 @@ |
(define (default-note-namer pitch) |
- (note-name->markup pitch #f)) |
+ "Return a markup for @var{pitch}, with name of @var{pitch} and a (possible) |
+accidental." |
+ (let* ((note-namer (note-name->list pitch #f)) |
+ (name (assoc-get 'note-name note-namer)) |
+ (alteration (assoc-get 'alteration note-namer 0))) |
+ (make-line-markup |
+ (list |
+ name |
+ (format-accidental alteration))))) |
(define (markup-or-empty-markup markup) |
"Return MARKUP if markup, else empty-markup" |
@@ -92,16 +100,16 @@ See @file{double-plus-new-chord-name.scm} for the signature of @var{style}. |
(list |
(make-simple-markup (number->string (step-nr pitch))) |
(make-simple-markup |
- (case (step-alteration pitch) |
- ((DOUBLE-FLAT) "--") |
- ((FLAT) "-") |
- ((NATURAL) "") |
- ((SHARP) "+") |
- ((DOUBLE-SHARP) "++")))))) |
+ (let ((step-alt (step-alteration pitch))) |
+ (cond ((= -1 step-alt) "--") |
+ ((= -1/2 step-alt) "-") |
+ ((= 0 step-alt) "") |
+ ((= 1/2 step-alt) "+") |
+ ((= 1 step-alt) "++"))))))) |
(define (step->markup-accidental pitch) |
(make-line-markup |
- (list (accidental->markup (step-alteration pitch)) |
+ (list (format-accidental (step-alteration pitch)) |
(make-simple-markup (number->string (step-nr pitch)))))) |
(define (step->markup-ignatzek pitch) |
@@ -109,7 +117,7 @@ See @file{double-plus-new-chord-name.scm} for the signature of @var{style}. |
(if (and (= (step-nr pitch) 7) |
(= (step-alteration pitch) 1)) |
(list (ly:context-property context 'majorSevenSymbol)) |
- (list (accidental->markup (step-alteration pitch)) |
+ (list (format-accidental (step-alteration pitch)) |
(make-simple-markup (number->string (step-nr pitch))))))) |
;; tja, kennok |