Lilypond: How to engrave lowercase chord symbols
My goal is to engrave music for accordion and I would like to have my chords symbols as follows:
Bass tone: always uppercase: e.g. A E D
Chords: always lower case:
e.g. major chords a e d; minor chords am em dm
And together: A am E e D d7
In Lilypond you can force the lowercase only for the minors: set chordNameLowercaseMinor = ##t
But I would like to have this possibility for the majors, sevens etc. as well...The bass tone is always uppercase, which is fine.
1 Comments
Sorted by latest first Latest Oldest Best
(This was asked and answered elsewhere, but in case it helps any future visitors, I'll add their results.)
Fix #1
version "2.19.58"
layout {
context {
Score
chordNoteNamer = #note -name->markup
chordRootNamer =
#(lambda (pitch lowercase?) (note-name->markup pitch #t ))
}
}
new ChordNames chordmode { c:7 c:m7 c:7/+c c:m7/+c }
But this one has some problems with single bass pitch inputs, resulting in
Fix #2
version "2.19.58"
#(define-public (my-note-name->german-markup pitch lowercase?)
(let* ((name (ly:pitch-notename pitch))
(alt-semitones (inexact->exact (round (* (ly:pitch-alteration
pitch) 2))))
(n-a (if (member (cons name alt-semitones) `((6 . -1) (6 . -2)))
(cons 7 (+ 1 alt-semitones))
(cons name alt-semitones)))
(basic-list '("c" "d" "e" "f" "g" "a" "h" "b"))
(list-to-use
(if lowercase?
basic-list
(map string-upcase basic-list))))
(make-line-markup
(list
(string-append
(list-ref list-to-use (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)))))))))
layout {
context {
Score
chordNameFunction =
#(lambda (in-pitches bass inversion context)
(if (= (length in-pitches) 1)
(my-note-name->german-markup (car in-pitches) #f)
(ignatzek-chord-names
in-pitches bass inversion context)))
chordNoteNamer =
#(lambda (pitch lowercase?)
(my-note-name->german-markup pitch #f))
chordRootNamer =
#(lambda (pitch lowercase?)
(my-note-name->german-markup pitch #t))
}
}
new ChordNames chordmode { cis:7 cis:m7 c:7/+c c:m7/+c <ces> cis:1 }
This allows for single pitch inputs as <c> and c:1. Note that this latter example uses German notation, which one can adjust as necessary in the Scheme code.
Terms of Use Privacy policy Contact About Cancellation policy © freshhoot.com2025 All Rights reserved.