Bassnotation für Akkordeon/code

Zur Navigation springen Zur Suche springen

chExBass = {
  <c es g heses>1-\markup \whiteout { "m" }  %% halbverminderter Septakkord
  <c es g b d'>1-\markup \whiteout { "m" } %% c:m9
  <c es ges b d'>1-\markup \whiteout { "m)" \hspace #-3.4 "(" } %% c:m9.5- eingeklammerter Akkord für einbuchstabige AKkordnamen
  <c es g b>1-\markup { "7" }    %% c:m7
  < c es g b d' f' a' >1-\markup { \normal-size-super "o" }  %% c:m13
  <c es g b d' f'>1-\markup { \fontsize #-0.5 "(7)" }  %% c:m11, die 7 in Klammer
}

chUpperBass =
{
  <c g>1-\markup { "" }
}

chExBasses = #(append
               (sequential-music-to-chord-exceptions chExBass #t)
               (sequential-music-to-chord-exceptions chUpperBass #t)
               ignatzekExceptions)

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

#(define ((chord-name->german-markup-text-alteration B-instead-of-Bb) pitch lowercase?)

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

   (let* ((name (ly:pitch-notename pitch))
          (alt-semitones  (pitch-alteration-semitones pitch))
          (n-a (if (member (cons name alt-semitones) `((6 . -1) (6 . -1)))
                   (cons 7 (+ (if B-instead-of-Bb 1 1) alt-semitones))
                   (cons name alt-semitones))))
     (make-line-markup
      (list
       (make-simple-markup
        (conditional-string-downcase
         (vector-ref #("C" "D" "E" "F" "G" "A" "H" "B") (car n-a))
         lowercase?))
       (let ((alteration (/ (cdr n-a) 2)))
         (cond
          ((and (equal? lowercase? #f) (= alteration FLAT) (= (car n-a) 7)) (make-simple-markup ""))
          ((and (= alteration FLAT) (or (= (car n-a) 5) (= (car n-a) 2) )) (make-simple-markup "s"))
          ((= alteration FLAT) (make-simple-markup "es"))
          ((and (= alteration DOUBLE-FLAT) (or (= (car n-a) 5)(= (car n-a) 2) )) (make-simple-markup "ses"))
          ((= alteration DOUBLE-FLAT) (make-simple-markup "eses"))
          ((= alteration SHARP) (make-simple-markup "is"))
          ((= alteration DOUBLE-SHARP) (make-simple-markup "isis"))
          (else empty-markup)))))))

#(define germanChords (chord-name->german-markup-text-alteration #t))

#(define (note-name->my-german-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
      (list
       (string-append
        (list-ref '("C" "D" "E" "F" "G" "A" "H" "B") (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)))))))))

#(define (note-name->underlined-markup pitch lowercase?)
   "Return pitch markup for @var{pitch}."
   (make-underline-markup
    (make-line-markup
     (list
      (make-simple-markup
       (conditional-string-downcase
        (vector-ref #("C" "D" "E" "F" "G" "A" "B") (ly:pitch-notename pitch))
        lowercase?))
      (accidental->markup (ly:pitch-alteration pitch))))))

#(define (note-name->german-underlined-markup pitch lowercase?)
   (make-underline-markup
    (make-line-markup
     (list
      ((chord-name->german-markup-text-alteration #t) pitch lowercase?)))))

gRoot= \once \set ChordNames.chordRootNamer = #note-name->german-underlined-markup

\layout {
  \context {
    \ChordNames
    chordNameLowercaseMinor = ##t
    chordNameExceptions = #chExBasses
    \remove Staff_performer
    chordRootNamer = #germanChords
    \override ChordName.font-name = #"Orator10 BT"
    \override ChordName.X-offset =
    #ly:self-alignment-interface::aligned-on-x-parent
    \override ChordName.self-alignment-X = #CENTER
    \override ChordName.font-name = #"Arial Narrow"
    \override ChordName.layer = #2
    \override ChordName.extra-spacing-width = #'(+inf.0 . -inf.0)
    \override ChordName.font-size = #-0.5
  }

  \context {
    \RhythmicStaff
    \consists Clef_engraver
    clefGlyph = #"clefs.percussion"
    clefPosition = #0
    fontSize = #-1
    \override StaffSymbol.staff-space = #(magstep -1)
    \remove Ledger_line_engraver
    \override NoteColumn.before-line-breaking =
    #(lambda (grob)
       (let* ((pap-col (ly:grob-parent grob X))
              (pap-col-elts (ly:grob-object pap-col 'elements))
              (chord-names
               (if (ly:grob-array? pap-col-elts)
                   (filter
                    (lambda (elt)
                      (grob::has-interface elt 'chord-name-interface))
                    (ly:grob-array->list pap-col-elts))
                   '())))
         (for-each
          (lambda (chrd)
            (ly:grob-set-parent! chrd X grob))
          chord-names)))
  }
}

chExBass = {
  <c es g heses>1-\markup \whiteout { "m" }  %% halbverminderter Septakkord
  <c es g b d'>1-\markup \whiteout { "m" } %% c:m9
  <c es ges b d'>1-\markup \whiteout { "m)" \hspace #-3.4 "(" } %% c:m9.5- eingeklammerter Akkord für einbuchstabige AKkordnamen
  <c es g b>1-\markup { "7" }    %% c:m7
  < c es g b d' f' a' >1-\markup { \normal-size-super "o" }  %% c:m13
  <c es g b d' f'>1-\markup { \fontsize #-0.5 "(7)" }  %% c:m11, die 7 in Klammer
}

chUpperBass =
{
  <c g>1-\markup { "" }
}

chExBasses = #(append
               (sequential-music-to-chord-exceptions chExBass #t)
               (sequential-music-to-chord-exceptions chUpperBass #t)
               ignatzekExceptions)

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

#(define ((chord-name->german-markup-text-alteration B-instead-of-Bb) pitch lowercase?)

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

   (let* ((name (ly:pitch-notename pitch))
          (alt-semitones  (pitch-alteration-semitones pitch))
          (n-a (if (member (cons name alt-semitones) `((6 . -1) (6 . -1)))
                   (cons 7 (+ (if B-instead-of-Bb 1 1) alt-semitones))
                   (cons name alt-semitones))))
     (make-line-markup
      (list
       (make-simple-markup
        (conditional-string-downcase
         (vector-ref #("C" "D" "E" "F" "G" "A" "H" "B") (car n-a))
         lowercase?))
       (let ((alteration (/ (cdr n-a) 2)))
         (cond
          ((and (equal? lowercase? #f) (= alteration FLAT) (= (car n-a) 7)) (make-simple-markup ""))
          ((and (= alteration FLAT) (or (= (car n-a) 5) (= (car n-a) 2) )) (make-simple-markup "s"))
          ((= alteration FLAT) (make-simple-markup "es"))
          ((and (= alteration DOUBLE-FLAT) (or (= (car n-a) 5)(= (car n-a) 2) )) (make-simple-markup "ses"))
          ((= alteration DOUBLE-FLAT) (make-simple-markup "eses"))
          ((= alteration SHARP) (make-simple-markup "is"))
          ((= alteration DOUBLE-SHARP) (make-simple-markup "isis"))
          (else empty-markup)))))))

#(define germanChords (chord-name->german-markup-text-alteration #t))

#(define (note-name->my-german-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
      (list
       (string-append
        (list-ref '("C" "D" "E" "F" "G" "A" "H" "B") (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)))))))))

#(define (note-name->underlined-markup pitch lowercase?)
   "Return pitch markup for @var{pitch}."
   (make-underline-markup
    (make-line-markup
     (list
      (make-simple-markup
       (conditional-string-downcase
        (vector-ref #("C" "D" "E" "F" "G" "A" "B") (ly:pitch-notename pitch))
        lowercase?))
      (accidental->markup (ly:pitch-alteration pitch))))))

#(define (note-name->german-underlined-markup pitch lowercase?)
   (make-underline-markup
    (make-line-markup
     (list
      ((chord-name->german-markup-text-alteration #t) pitch lowercase?)))))

gRoot= \once \set ChordNames.chordRootNamer = #note-name->german-underlined-markup

\layout {
  \context {
    \ChordNames
    chordNameLowercaseMinor = ##t
    chordNameExceptions = #chExBasses
    \remove Staff_performer
    chordRootNamer = #germanChords
    \override ChordName.font-name = #"Orator10 BT"
    \override ChordName.X-offset =
    #ly:self-alignment-interface::aligned-on-x-parent
    \override ChordName.self-alignment-X = #CENTER
    \override ChordName.font-name = #"Arial Narrow"
    \override ChordName.layer = #2
    \override ChordName.extra-spacing-width = #'(+inf.0 . -inf.0)
    \override ChordName.font-size = #-0.5
  }

  \context {
    \RhythmicStaff
    \consists Clef_engraver
    clefGlyph = #"clefs.percussion"
    clefPosition = #0
    fontSize = #-1
    \override StaffSymbol.staff-space = #(magstep -1)
    \remove Ledger_line_engraver
    \override NoteColumn.before-line-breaking =
    #(lambda (grob)
       (let* ((pap-col (ly:grob-parent grob X))
              (pap-col-elts (ly:grob-object pap-col 'elements))
              (chord-names
               (if (ly:grob-array? pap-col-elts)
                   (filter
                    (lambda (elt)
                      (grob::has-interface elt 'chord-name-interface))
                    (ly:grob-array->list pap-col-elts))
                   '())))
         (for-each
          (lambda (chrd)
            (ly:grob-set-parent! chrd X grob))
          chord-names)))
  }
}