Jazz Dur Akkorde auf E

Zur Navigation springen Zur Suche springen
Jazz Dur Akkorde auf E.png
relevantChords = \chordmode {
  c1 c:sus2 c:sus4
  c:6 c:6^5 c:6sus4 c:6sus2
  c:7 c:7^5 c:7sus4 c:7sus2
  c:9 c:9sus4 c:9^5
  c:11 c:11^3 c:11^5 c:11^3.5
  c:13 c:13^5 c:13^9 c:13^5.9
  c:13.11 c:13.11^5 c:13.11^9 c:13.11^5.9 c:13.11^5.7.9
}

JazzChordsD =
#(define-void-function (chords p) (ly:music? ly:pitch?)
   (add-score
    (list #{  \markup \fill-line \override #'(font-features . ("smcp")) \override #'(box-padding . 1)
              \override #'(thickness . 2) \override #'(font-size . 4)
              { \null \rounded-box \concat { "Die wichtigsten Jazz Dur-Akkorde auf " #(note-name->my-markup p #f) } \null }
      #}))
   (add-score
    (scorify-music #{
      <<
        \new ChordNames \transpose c $p $chords
        \new Staff
        {
          \transpose c $p $chords
        }
      >>
      #})))

\bookpart {
  \JazzChordsD \relevantChords e
}

Scheme-Code

#(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)))))))))