\version "2.10.0" \header { texidoc = "Demonstrate German chord names" } chs = \transpose c' c' { 1 % m = minor triad \break \transpose c' d' { % triangle = maj } \break \transpose c' es' { } \break % 6 = major triad with added sixth % m6 = minor triad with added sixth \break \break \break \break \break \break \break % add9 } #(define (simple-german-chord-name pitches bass inversion context) "Return simple chord markup for PITCH, using german note names. Use lower case for minor, otherwise upper case. Does not do any fancy sub or superscripts. " (let* ((pitch (car pitches)) (pitch2 (cadr pitches)) (diff (if (null? pitch2) (ly:make-pitch 0 0 0) (ly:pitch-diff pitch2 pitch))) (minor? (and (= (ly:pitch-notename diff) 2) (= (ly:pitch-alteration diff) -2))) (name (ly:pitch-notename pitch)) (short-alt? (or (= name 2) (= name 5))) (alt (ly:pitch-alteration pitch)) (n-a (if (member (cons name alt) `((6 . ,FLAT) (6 . ,DOUBLE-FLAT))) (cons 7 (+ SEMI-TONE alt)) (cons name alt)))) (markup #:line ((string-append (vector-ref (if minor? #("c" "d" "e" "f" "g" "a" "h" "b") #("C" "D" "E" "F" "G" "A" "H" "B")) (car n-a)) (list-ref (if short-alt? '("ses" "s" "" "is" "isis") '("eses" "es" "" "is" "isis")) (+ 2 (/ alt 2)))))))) germanChordProperties = \sequential { \set chordNameFunction = #simple-german-chord-name } \score{ << \new ChordNames { \set instrumentName = #"Ignatzek (default)" \set shortInstrumentName = #"Def" \chs } \new ChordNames { \germanChordProperties \set instrumentName = #"Deutsch" \set shortInstrumentName = #"dt" \chs } \new Staff \transpose c c' { \chs } >> \layout { indent = 3.\cm \context { \ChordNames \consists Instrument_name_engraver } } }