Score:Leitereigene Dreiklänge

Zur Navigation springen Zur Suche springen
#(use-modules (ice-9 regex))
#(lilypond-version)
chExceptionMusic = {
  <c>1-\markup { \super "rt" }
  <c es ges>1-\markup { \super "dim" }
  <c es g>1-\markup { \normal-size-super "m" }
  <c e g b>1-\markup { \normal-size-super "7" }
  <c es g b>1-\markup { \normal-size-super "m7" }
  <c es ges heses>1-\markup { \super "dim7" }
  <c g>1-\markup { \super "pw" }
  <c e a>1-\markup {
    \super {
      "6("
      \combine \draw-line #'(1 . 1 ) "5)"
    }
  }
  <c e h>1-\markup {
    \super {
      "7("
      \combine \draw-line #'(1 . 1 ) "5)"
    }
  }
  <c e h d'>1-\markup {
    \super {
      "9("
      \combine \draw-line #'(1 . 1 ) "5)"
    }
  }

  <c e h d' f'>1-\markup {
    \super {
      "11" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "5)"
      }
    }
  }
  <c g h d' f'>1-\markup {
    \super {
      "11"
      \super {
        "("
        \combine \draw-line #'(1 . 1 ) "3)"
      }
    }
  }
  <c h d' f'>1-\markup {
    \super {
      "11" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "3"
        \combine \draw-line #'(1 . 1 ) "5)"
      }
    }
  }
  <c e g h d' a'>1-\markup { \super "13" }
  <c e g h d' f' a'>1-\markup { \super { "13" \super "add11" } }
  <c e h d' a'>1-\markup {
    \super {
      "13" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "5)"
      }
    }
  }
  <c e g h a'>1-\markup {
    \super {
      "13" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "9)"
      }
    }
  }
  <c e h a'>1-\markup {
    \super {
      "13" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "5"
        \combine \draw-line #'(1 . 1 ) "9)"
      }
    }
  }
  <c e h d' f' a'>1-\markup {
    \super {
      "13" \super {
        "add11("
        \combine \draw-line #'(1 . 1 ) "5)"
      }
    }
  }
  <c e g h f' a'>1-\markup {
    \super {
      "13" \super {
        "add11("
        \combine \draw-line #'(1 . 1 ) "9)"
      }
    }
  }
  <c e h f' a'>1-\markup {
    \super {
      "13" \super {
        "add11("
        \combine \draw-line #'(1 . 1 ) "5"
        \combine \draw-line #'(1 . 1 ) "9)"
      }
    }
  }
  <c e f' a'>1-\markup {
    \super {
      "13" \super {
        "add11("
        \combine \draw-line #'(1 . 1 ) "5"
        \combine \draw-line #'(1 . 1 ) "7"
        \combine \draw-line #'(1 . 1 ) "9)"
      }
    }
  }
  <c es a>1-\markup {
    "m"
    \super {
      "6" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "5)"
      }
    }
  }
  <c es h>1-\markup {
    "m"
    \super {
      "7" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "5)"
      }
    }
  }
  <c es h d'>1-\markup {
    "m"
    \super {
      "9" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "5)"
      }
    }
  }
  <c es h d' f'>1-\markup {
    "m"
    \super {
      "11" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "5)"
      }
    }
  }
  <c es g h f'>1-\markup {
    "m"
    \super {
      "11" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "9)"
      }
    }
  }
  <c es h f'>1-\markup {
    "m"
    \super {
      "11" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "5"
        \combine \draw-line #'(1 . 1 ) "9)"
      }
    }
  }
  <c es g h d' f' a'>1-\markup {
    m
    \super {
      "13"
    }
  }
  <c es g h d' a'>1-\markup {
    m
    \super
    "13" \super {
      "("
      \combine \draw-line #'(1 . 1 ) "11)"
    }
  }
  <c es h d' a'>1-\markup {
    m
    \super {
      "13" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "5"
        \combine \draw-line #'(1 . 1 ) "11)"
      }
    }
  }
  <c es g h a'>1-\markup {
    m
    \super {
      "13" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "9"
        \combine \draw-line #'(1 . 1 ) "11)"
      }
    }
  }
  <c es h a'>1-\markup {
    m
    \super {
      "13" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "5"
        \combine \draw-line #'(1 . 1 ) "9"
        \combine \draw-line #'(1 . 1 ) "11)"
      }
    }
  }
  <c es a'>1-\markup {
    m \super {
      "13" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "5"
        \combine \draw-line #'(1 . 1 ) "7"
        \combine \draw-line #'(1 . 1 ) "9"
        \combine \draw-line #'(1 . 1 ) "11)"
      }
    }
  }
  <c es h d' f' a'>1-\markup {
    m \super {
      "13" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "5)"
      }
    }
  }
  <c es g h f' a'>1-\markup {
    m \super {
      "13" \super {
        "("
        \combine \draw-line #'(1 . 1 )
        "9)"
      }
    }
  }
  <c es h f' a'>1-\markup {
    m \super {
      "13" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "5"
        \combine \draw-line #'(1 . 1 ) "9)"
      }
    }
  }
  <c es f' a'>1-\markup {
    m \super {
      "13" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "5"
        \combine \draw-line #'(1 . 1 ) "7"
        \combine \draw-line #'(1 . 1 ) "9)"
      }
    }
  }
  <c e h>1-\markup {
    \super {
      "j7" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "5)"
      }
    }
  }
  <c e g h d'>1-\markup {
    \super { "j9" }
  }
  <c e g h >1-\markup {
    \normal-size-super { "j7" }
  }
  <c e gis >1-\markup {
    \normal-size-super { "aug" }
  }
  <c es ges h >1-\markup {
    \normal-size-super { "dim7+" }
  }
  <c e h d'>1-\markup {
    \super {
      "j9" \super {
        "("
        % \override #'(offset . -6 ) \underline 5
        \combine \draw-line #'(1 . 1 )
        "5)"
      }
    }
  }
  <c e g h d' f'>1-\markup {
    \normal-size-super { "j11" }
  }
  <c g h d' f'>1-\markup {
    \super {
      "j11" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "3)"
      }
    }
  }
  <c e h d' f'>1-\markup {
    \super {
      "j11" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "5)"
      }
    }
  }
  <c h d' f'>1-\markup {
    \super {
      "j11" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "3"
        \combine \draw-line #'(1 . 1 ) "5)"
      }
    }
  }
  <c e g h d' a'>1-\markup {
    \super {
      "j13"
    }
  }
  <c e h d' a'>1-\markup {
    \super {
      "j13" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "5)"
      }
    }
  }
  <c e g h a'>1-\markup {
    \super {
      "j13" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "9)"
      }
    }
  }
  <c e h a'>1-\markup {
    \super {
      "j13" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "5"
        \combine \draw-line #'(1 . 1 ) "9)"
      }
    }
  }
  <c e h d' f' a'>1-\markup {
    \super {
      "j13" \super {
        "add11("
        \combine \draw-line #'(1 . 1 ) "5)"
      }
    }
  }
  <c e g h f' a'>1-\markup {
    \super {
      "13" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "9)"
      }
    }
  }
  <c e h f' a'>1-\markup {
    \super {
      "j13" \super {
        "add11("
        \combine \draw-line #'(1 . 1 ) "5"
        \combine \draw-line #'(1 . 1 ) "9)"
      }
    }
  }
  <c e g h d' f' a'>1-\markup {
    \super { "j13" \super "add11" }
  }
  <c f g h d' f' a'>1-\markup {
    \super {
      "13sus4" \super "add11"
    }
  }
  <c f g h d'  a'>1-\markup {
    \super {
      "13sus4"
    }
  }
  <c f g h a'>1-\markup {
    \super {
      "13sus4" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "9)"
      }
    }
  }
  <c f g h f' a'>1-\markup {
    \super {
      "13sus4" \super {
        "add11("
        \combine \draw-line #'(1 . 1 ) "9)"
      }
    }
  }
  <c es h>1-\markup {
    m \super {
      "j7" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "5)"
      }
    }
  }

  <c es g h d'>1-\markup {
    m
    \super {
      "j9"
    }
  }
  <c es g h d' f'>1-\markup {
    m
    \super {
      "j11"
    }
  }
  <c es h d'>1-\markup {
    m \super {
      "j9" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "5)"
      }
    }
  }
  <c es g h f'>1-\markup {
    m
    \super {
      "j11"
      \super {
        "("
        \combine \draw-line #'(1 . 1 ) "9)"
      }
    }
  }
  <c es h d' f'>1-\markup {
    m \super {
      "j11" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "5)"
      }
    }
  }
  <c es h f'>1-\markup {
    m
    \super {
      "j11"
      \super {
        "("
        \combine \draw-line #'(1 . 1 ) "5"
        \combine \draw-line #'(1 . 1 ) "9)"
      }
    }
  }
  <c es g h d' f' a'>1-\markup {
    m \super { "j13" }
  }
  <c es h d' f' a'>1-\markup {
    m \super {
      "j13" \super {
        "("
        \combine \draw-line #'(1 . 1 ) "5)"
      }
    }
  }
  <c es g h f' a'>1-\markup {
    m
    \super {
      "j13"
      \super {
        "("
        \combine \draw-line #'(1 . 1 )
        "9)"
      }
    }
  }
  <c es h f' a'>1-\markup {
    m
    \super {
      "j13"
      \super {
        "("
        \combine \draw-line #'(1 . 1 )
        "5"
        \combine \draw-line #'(1 . 1 )
        "9)"
      }
    }
  }
  <c es h a'>1-\markup {
    m
    \super {
      "j13"
      \super {
        "("
        \combine \draw-line #'(1 . 1 )
        "5"
        \combine \draw-line #'(1 . 1 )
        "9"
        \combine \draw-line #'(1 . 1 )
        "11)"
      }
    }
  }
  <c es g h d' a'>1-\markup {
    m
    \super {
      "j13"
      \super {
        "("
        \combine \draw-line #'(1 . 1 )
        "11)"
      }
    }
  }
  <c es h d' a'>1-\markup {
    m
    \super {
      "j13"
      \super {
        "("
        \combine \draw-line #'(1 . 1 )
        "5"
        \combine \draw-line #'(1 . 1 )
        "11)"
      }
    }
  }
  <c es h a'>1-\markup {
    m
    \super {
      "j13"
      \super {
        "("
        \combine \draw-line #'(1 . 1 ) "5"
        \combine \draw-line #'(1 . 1 ) "9"
        \combine \draw-line #'(1 . 1 )
        "11)"
      }
    }
  }
  <c es g h a'>1-\markup {
    m
    \super {
      "j13"
      \super {
        "("
        \combine \draw-line #'(1 . 1 ) "9"
        \combine \draw-line #'(1 . 1 )
        "11)"
      }
    }
  }
  <c e g a d' >1-\markup %\scale #'(0.5 . 0.5)
  \fontsize #-4  {
    \translate #'(0 . 1) "6"
    \hspace #-0.5 \draw-line #'(1 . 2 ) \hspace #-0.5 "9"
  }
  %% Roemer-Brandt:
  <c e g d'>1-\markup {
    \super {
      "(add9)"
    }
  }
}
}}
<div style="clear:both;"></div>
<div><div  style="display: inline-block; margin: 0; width: auto">'"`UNIQ--syntaxhighlight-00000000-QINU`"'</div></div>
<div style="clear:both;"></div>
<div><div  style="display: inline-block; margin: 0; width: auto">'"`UNIQ--syntaxhighlight-00000002-QINU`"'</div></div>{{Hili|lang=scheme|mus=chExBasses = #(append
               (sequential-music-to-chord-exceptions chExBass #t)
               (sequential-music-to-chord-exceptions chUpperBass #t)
               ignatzekExceptions)
%% create diatonic chords from a scale
%% enter the steps of the scale as lily music
%% and chose the number of notes the chords should have

%% convert pitchlist to a music chord
#(define (pitches->chord plist)
   (make-music 'EventChord 'elements
     (if (list? plist)
         (map (lambda (p)
                (make-music
                 'NoteEvent 'duration (ly:make-duration 0)
                 'pitch p))
           plist)
         (make-music
          'NoteEvent 'duration (ly:make-duration 0)
          'pitch plist)
         )))

%% create all n-th chords from scale
%% actually we staple every other pitch from the-scale
%% until we reach n

%% create chords with arbitraty intervals from the scale
%% input: scale
%% list: the distances of the notes, 3=terz, 4=quart ...

#(define (stacked-intervals the-scale list-or-number-or-pair)
   ;; the-scale: music from which the pitchlist is constructed
   ;; usually a scale, but could be any music
   ;; duplicate pitches are removed and sorting according to pitch height is done
   ;; list-or-number-or-pair: tells the programm which intervals to produce
   ;; list: a list of chords, 3=third, 4=forth etc. '(2 4) creates a quart-sext chord
   ;; pair: '(a . b)  a: how many notes the chord contains, b: the interval, 3=third, 4=forth
   ;; number: terzes are stapled, 3=triad, 4=tetrads, 5=pentachord etc
   ;; actually the program does not much counting
   ;; a list of intervals is created by picking notes in the order they appear
   ;; in the scale leaving gaps defined by the list
   (let* ((scpi (music-pitches the-scale))
          (pili (sort
                 (delete-duplicates scpi) ly:pitch<?))
          (m (length pili))
          (elist (cond
                  ((list? list-or-number-or-pair)
                   ;; we need to add an element to the list
                   ;; otherwise the last element of the list would not appear
                   ;; in the result
                   (append list-or-number-or-pair '(1)))
                  ((pair? list-or-number-or-pair)
                   ;; car: number of notes
                   ;; cdr: distance, 3=third, 4=forth etc.
                   (make-list  (car list-or-number-or-pair) (cdr list-or-number-or-pair)))
                  ((number? list-or-number-or-pair)
                   ;; standard definition: chord consists of thirds
                   (make-list list-or-number-or-pair 3))))
          (n (length elist)))
     (map
      (lambda (w)
        (let ((u 0))
          (map
           (lambda (x)
             (let* ((y (modulo (+ u w) m))
                    (q (quotient (+ u w) m))
                    (z (list-ref pili y))
                    (a (ly:pitch-alteration z))
                    (o (ly:pitch-octave z))
                    (n (ly:pitch-notename z))
                    (p (ly:make-pitch (+ o q) n a)))
               (set! u (+ u (list-ref elist x) -1))
               p))
           (iota n))))
      (iota m))))

CreateIntervals=
#(define-music-function (the-scale pair-list-number)(ly:music? scheme?)
   ;; creates the pure music without chordnames and other staff
   (make-sequential-music
    (map (lambda(x) (pitches->chord x))
      (stacked-intervals the-scale pair-list-number))))
Stufen = { s1-"I" s1-"ii" s1-"iii" s-"IV" s-"V" s-"vi" s-"vii" }

Dreiklang =
#(define-music-function (leiter leiter1 leiter2 p)
   (ly:music? ly:music? ly:music? ly:pitch?)
   #{
     <<
       \new PianoStaff
       \with {
         instrumentName = \markup \fontsize #2 \override #'(font-features . ("smcp")) "Tonleiter "
       }
       \new Voice \transpose c $p { \key c \major $leiter }
       \new Dynamics \DurStufen
       \new PianoStaff
       \with {
         instrumentName = \markup \fontsize #2 \override #'(font-features . ("smcp")) "Grundstellung "
       }
       <<
         \new Staff  \new Voice \transpose c $p { \key c \major \CreateIntervals $leiter #3 }
         \new ChordNames \transpose c $p { \key c \major \CreateIntervals $leiter #3 }
         \new Staff \new Voice { \clef bass \transpose c $p { \key c \major \CreateIntervals $leiter #3 } }
         \new Dynamics \DurStufen
       >>
       \new PianoStaff
       \with {
         instrumentName = \markup \fontsize #2 \override #'(font-features . ("smcp")) "1. Umkehrung "
       }
       <<
         \new Staff \transpose c $p { \key c \major \CreateIntervals $leiter1 #'(3 4) }
         \new ChordNames \transpose c $p \CreateIntervals $leiter #3
         \new Staff \new Voice { \clef bass \transpose c $p { \key c \major \CreateIntervals $leiter1 #'(3 4) } }
         \new Dynamics \DurStufen
       >>
       \new PianoStaff
       \with {
         instrumentName = \markup \fontsize #2 \override #'(font-features . ("smcp")) "2. Umkehrung "
       }
       <<
         \new Staff \transpose c $p { \key c \major \CreateIntervals $leiter2 #'(4 3) }
         \new ChordNames \transpose c $p \CreateIntervals $leiter #3
         \new Staff \new Voice { \clef bass \transpose c $p { \key c \major \CreateIntervals $leiter2 #'(4 3) } }
         \new Dynamics \DurStufen
       >>
     >>
   #}
   )