Akkordliste/titel

Zur Navigation springen Zur Suche springen
#(define (pitch-alteration-semitones pitch)
   (inexact->exact (round (* (ly:pitch-alteration pitch) 2))))

#(define (conditional-string-downcase str condition)
   (if condition
       (string-downcase str)
       str))

%% Notenname als Markup mit deutschen Notennamen
#(define (note-name->my-markup pitch lowercase?)
   (let* ((name (ly:pitch-notename pitch))
          (alt-semitones (pitch-alteration-semitones pitch))
          (n-a (if (member (cons name alt-semitones) `((6 . -1) (6 . -2)))
                   (cons 7 (+ 1 alt-semitones))
                   (cons name alt-semitones))))
     (make-line-markup
      ;(make-simple-markup
      (list
       (string-append
        (conditional-string-downcase
         (list-ref '("C" "D" "E" "F" "G" "A" "H" "B") (car n-a))
         lowercase?)
        (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)))))))))

#(define-markup-command (my-titel layout props p)
   (ly:pitch?)
   (interpret-markup layout props
     #{
       \markup
       \fill-line {
         \null
         \center-column {
           \abs-fontsize #144
           \with-color #(x11-color 'LavenderBlush)
           {  \musicglyph "clefs.GG"  }
           \vspace #-25
           \with-color #(x11-color 'goldenrod)
           \abs-fontsize #100 \bold \caps
           {
             "Akkorde"
             " " " "
             "auf" " " " " " "
           }
           \with-color #(x11-color 'firebrick)
           \abs-fontsize #330
           \override #'(font-name . "ArnoldBoeD") #(note-name->my-markup p #f)
         }
         \null
       }
     #}))