Auf und nieder/score

Zur Navigation springen Zur Suche springen

Lilypond-Code

\version "2.20.0"
\language "deutsch"

myTitel = "Auf und Nieder"
mycomp= \markup "Carl Czerny, 1791-1857"

AkkI = {
  \set Staff.shortInstrumentName = \markup \caps "Dskt"
  \set Staff.instrumentName = \markup \caps "Dskt"
}

AkkII = {
  \set Staff.shortInstrumentName = \markup \caps "Akk II"
  \set Staff.instrumentName = \markup \caps "Akk II"
}

BassI = {
  \set Staff.shortInstrumentName = \markup \caps "Bass"
  \set Staff.instrumentName = \markup \caps "Bass"
}

#(define (MM->Script-text evt)
   (if (eq? 'MultiMeasureTextEvent (ly:music-property evt 'name))
       (let ((res (make-music 'TextScriptEvent)))
         (newline) (display (ly:music-mutable-properties evt)) ; if you are curious ...
         (for-each (lambda(props)
                     (ly:music-set-property! res (car props) (cdr props)))
           (ly:music-mutable-properties evt))
         res)
       evt))

%% nur der Zähler als Beschriftung
#(define (my-tuplet-number::calc-denominator-text grob)
   (let (;; let 'direction evaluate to use the generic tie-markup-command
          (dir (ly:grob-property grob 'direction)))
     (make-tie-markup
      (string-append  " " (tuplet-number::calc-denominator-text grob) " "))))

%% der komplette Bruch als Beschriftung
#(define (my-tuplet-number::calc-fraction-text grob)
   (let (;; let 'direction evaluate to use the generic tie-markup-command
          (dir (ly:grob-property grob 'direction)))
     (make-tie-markup
      (string-append  " " (tuplet-number::calc-fraction-text grob) " "))))

tupletFormats = {
  \override TupletNumber.font-size = #0.5
  \override TupletNumber.font-shape = #'italic
  \override TupletNumber.padding = #1
  \override TupletNumber.text = #my-tuplet-number::calc-denominator-text
}

tupletD = {
  \tupletDown
  \override TupletNumber.direction = #DOWN
}

make-midi-list =
#(define-void-function (name score tempolist)
   ((string? #f) ly:score? list?)
   (for-each
    (lambda (tempo)
      (ly:book-process
       (apply
        ly:make-book
        $defaultpaper
        $defaultheader
        (list score))
       $defaultpaper
       #{
         \midi {
           \tempo 4 = $tempo
         }
       #}
       (format #f "~a_~a"
         (or name "midi")
         tempo)))
    tempolist))

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
}

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

chExceptionMusic = {
  <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 { "v" }  %% 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)

firstNote =
#(define-music-function (music )
   (ly:music?)
   (event-chord-reduce music))

#(use-modules (scm accreg))
myBlue = #(x11-color 'sienna4)

\layout {
  \context {
    \Voice
    beamExceptions = #'()
    \override BreathingSign.text =
    \markup { \musicglyph #"scripts.lvarcomma" }
    \override Stem.neutral-direction = #down
    \override Script.outside-staff-priority = #'()
    \override Script.padding = #1
    \override Tie.thickness = #1
    \override PhrasingSlur.thickness = #3
    \override Rest.voiced-position = #0
    \override MultiMeasureRest.expand-limit = #3
  }
  \context {
    \Staff
    beamExceptions = #'()
    \override BreathingSign.text =
    \markup { \musicglyph #"scripts.lvarcomma" }
    \override InstrumentName.font-features = #'("smcp")
  }
  \context {
    \ChordNames
    chordNameLowercaseMinor = ##t
    chordNameExceptions = #chExBasses
    \remove Staff_performer
    chordRootNamer = #germanChords
    \override ChordName.font-name = #"Orator10 BT"
    chordNoteNamer = #(chord-name->german-markup #f)
    \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.font-size = #-0.5
    noChordSymbol = ##f
  }

  \context {
    \ChordNames
    \name SecondChords
    \alias ChordNames
    \override Rest.stencil = ##f
    alignAboveContext = #"oben"
  }

  \context {
    \Score
    \accepts SecondChords
    \accepts MyFingers
    \accepts BarNumberStaff
    \override VerticalAxisGroup.remove-first = ##t
    skipBars = ##f
    \override MetronomeMark.font-size = #1
    \override MetronomeMark.font-shape = #'caps
    \override BarLine.thick-thickness = 5
    barNumberVisibility = #all-bar-numbers-visible
    \override Timing.beamExceptions = #'()
    \override BarNumber.color = #(rgb-color 0.7 0.7 0.7)
    \override BarNumber.layer = #-200
    \override BarNumber.outside-staff-priority =#'()
    \override BarNumber.padding = #1
    \override BarNumber.font-size = #-1
    \override BarNumber.font-series = #'bold
    \override BarNumber.self-alignment-X = #0
    \override BarNumber.break-visibility = #end-of-line-invisible
  }
  \context {
    \Dynamics
    \override Hairpin.to-barline = ##f
    alignBelowContext = melodie
    \override TextSpanner.outside-staff-priority = ##f
    \override TextSpanner.padding = #'()
    \override DynamicText.outside-staff-priority = ##f
    \override DynamicText.padding = #4
  }
  \context {
    \RhythmicStaff
    \accepts MyFingers
    \consists Clef_engraver
    clefGlyph = #"clefs.percussion"
    clefPosition = #0
    printPartCombineTexts = ##f
    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)))
  }
  \context {
    \StaffGroup
    \accepts SecondChords
    \accepts BarNumberStaff
  }
}

gds = \chordmode { g8 g:m q q }
dss = \chordmode { d8 d:m7 q q }
cd  = \chordmode { c8[ c:m] }
cdd = \chordmode { c8 c:m q q }
gde = \chordmode { g8[ g:m] }
dse = \chordmode { d8[ d:m7] }
gd  = \chordmode { g8 g:m q q g g:m q q }
ds  = \chordmode { d8 d:m7 q q d d:m7 q q }

Bassi = \chordmode {
  \BassI
  \gd \ds
  \gd \cd \gde \dse \gde
  \dss \gde \dse \gds \gde \dse
  \gds \cdd
  \gds \dss
  \gd
  g8 r g r g r g r
  g4 r r2
}

gdsx = { g,8 < g h d > q q }
dssx = { d,8 < fis, a, c > q q }
cdx  = { c,8 < c e g > }
cddx = { c,8 < c e g > q q }
gdex = { g,8 < g h d > }
dsex = { d,8 < fis, a, c > }
gdx  = { \gdsx \gdsx }
dsx  = { \dssx \dssx }

Massi =  {
  \key c \major
  \repeat volta 2 \gdx
  \repeat volta 2 \dsx
  \repeat volta 2 \gdx
  \repeat volta 2 { \cdx \gdex \dsex \gdex }
  \repeat volta 2 { \dssx \gdex \dsex }
  \repeat volta 2 { \gdsx \gdex \dsex }
  \repeat volta 2 { \gdsx \cddx }
  \repeat volta 2 { \gdsx \dssx }
  \repeat volta 2 \gdx
  g,8 r g, r g, r g, r
  g,4 r r2
}

Akk = \chordmode {
  s1 * 9
  g8:m r q r q r q r q
}

AccordionI= \relative c' {
  \AkkI
  \key g \major
  \time 4/4
  \tupletFormats
  \tupletD
  \set tupletSpannerDuration = #(ly:make-moment 1/4)
  \repeat volta 2 {
    \tuplet 6/4 { g16 h d g h d }
    \override TupletNumber.stencil = ##f
    \tuplet 6/4 {
      g d h g d h g h d g d h g h d g d h
    }
  }
  \repeat volta 2 {
    \tuplet 6/4 {
      c fis a c fis a c a fis c a fis c fis a c a fis c fis a c a fis
    }
  }
  \repeat volta 2 {
    \tuplet 6/4 {
      g, h d g h d g d h g d h
      g' h d g d h g h d g d h
    }
  }
  \repeat volta 2 {
    \tuplet 6/4 {
      e c g e g e d' h g d g d
      c' a fis c fis c h' g d h d h
    }
    \repeat volta 2 {
      \tuplet 6/4 {
        fis' a fis d d' d, a' c a d, d' d,
        g h g d d' d, fis a fis d d' d,
      }
    }
    \repeat volta 2 {
      \tuplet 6/4 {
        h' g d h ais h ais h ais h ais h
        d' h g d cis d c'! a fis c h c
      }
    }
    \repeat volta 2 {
      \tuplet 6/4 {
        h' g d h ais h ais h ais h ais h
        e' c g e dis e dis e dis e dis e
      }
    }
    \repeat volta 2 {
      \tuplet 6/4 {
        h'' g d h ais h ais h ais h ais h
        a'! fis d a gis a gis a gis a gis a
      }
    }
    \repeat volta 2 {
      \tuplet 6/4 {
        g' d h g h d g, h d g d h
        g d h g h d g h d g d h
      }
    }

    \mark \markup \box "Coda"
    \stemNeutral
    g'8 r <h g d h> r
    < g, h d g > r < h d g h > r
    < g d h g >4 r r2
  }
}

midI =
{
  \override Script.direction = #DOWN
  \repeat unfold 216 { s16*2/3-_ }
}

fingerc = {
  s16*2/3-1 s-2 s-3 s-1 s-2 s-3 s-5 s-3 s-2 s-1 s-3 s-2
  s2
  s16*2/3-1 s-2 s-4 s-1 s-2 s-4 s s s s s-4 s s2
  s16*2/3-1 s-2 s-3 s-1 s s  s s s s s-3 s s2
  s16*2/3-5 s-4 s-2 s-1 s-2 s-1
  \repeat unfold 3 { s-5 s-4 s s s s }
  s-2 s-3 s-2 s-1 s s
  \repeat unfold 3 { s-2 s-4 s s s s }
  s-5 s-4 s-2 s-1 s-2 s-1  s-2 s-1 s s s s
  \repeat unfold 2 { s-5 s-4 s s s-2 s-1 }
  \repeat unfold 4 { s-5 s-4 s s s-2 s-1  s-2 s-1 s s s s }
  s-5 s-3 s-2 s-1 s s  s-1 s s s s s  s s-3 s s s s  s-1
}

Struktur = {
  %\override Score.NonMusicalPaperColumn.page-break-permission = ##f
  %\override Score.SpacingSpanner.common-shortest-duration = #(ly:make-moment 1/8)
  \override Score.NonMusicalPaperColumn.line-break-permission = ##f
  \repeat unfold 4 { s1 s \break }
}

kopf=\header {
  title = \markup \line
  {
    #myTitel
  }
  subtitle = ##f
  subsubtitle = ##f
  poet = ##f
  composer = \markup { #mycomp }
  piece = ##f
  subtitle =\markup { "spielbar mit 34 Diskant-Tasten (72 Bass)" }

  opus = ##f
  composer = \markup \override #'(baseline-skip . 3)
  \right-column {
    \fontsize #1.5 " "
    \line { "für Akkordeon adaptiert" }
    \line { von Manuela }
  }
  poet= \markup \override #'(baseline-skip . 3)
  \left-column  {
    \fontsize #1.5 "Die Schule des Virtousen"
    #mycomp
    \line { "op." \number "365," " №" \number "4" }
  }
}

\paper {
  top-margin = 10\mm
  ragged-right = ##f
  ragged-last = ##f
  ragged-bottom = ##f
  ragged-last-bottom = ##f
  bottom-margin = 20\mm
  indent = #0
  line-width = 185\mm
  print-all-headers = ##f
  #(include-special-characters)
  print-first-page-number = ##t
  first-page-number = #1
  oddFooterMarkup = ##f
  evenFooterMarkup = ##f
  oddHeaderMarkup = #oddFooterMarkup
  evenHeaderMarkup = #evenFooterMarkup
  top-markup-spacing.padding = #5
  top-system-spacing.padding = #10
}

%zzz =
\bookpart {
  \kopf
  \score {
    \new StaffGroup
    <<
      %\override StaffGroup.VerticalAxisGroup.staff-staff-spacing.basic-distance = #12
      \new Staff
      <<
        \new Voice \AccordionI
        \context Voice \fingerc
      >>
      \new ChordNames \Akk
      \new ChordNames="oben"
      {
        \override Rest.stencil = ##f
        \Bassi
      }
      \new RhythmicStaff
      <<
        \new Voice
        {
          \stemDown
          \override Rest.staff-position = #0
          \override Dots.staff-position = #0
          \override Beam.staff-position = #0
          \override NoteHead.staff-position = #0
          \firstNote \Bassi
        }
        \new NullVoice \Struktur
      >>
    >>
  }
}

alle=
\score {
  \new StaffGroup
  \unfoldRepeats
  <<
    \new Staff {
      <<
        \new Voice {
          \set Staff.midiInstrument = "concertina"
          s1 s \AccordionI
        }
        \context Voice {
          s1 s \midI
        }
      >>
    }
    \new Staff {
      \set Staff.midiInstrument = "acoustic bass"
      \clef bass
      \gdx \dsx \Massi
    }
  >>
}

%\make-midi-list "auf" \alle #'(30 40 50 60 70 80 90 100 108 112 120)
%\alle