% Akkorde können auch geklammert sein #(define (parenthesis-ignatzek-chord-names in-pitches bass inversion context) (markup #:line ( "(" (ignatzek-chord-names in-pitches bass inversion context) ")" ))) klamm = #(define-music-function (parser location chords) (ly:music?) #{ \set chordNameFunction = #parenthesis-ignatzek-chord-names $chords \set chordNameFunction = #ignatzek-chord-names #}) repeats-around-chords = #(define-music-function (parser location chords) (ly:music?) #{ \once \set noChordSymbol = \markup { \normal-text \repStart } r4 $chords \once \set noChordSymbol = \markup { \normal-text \repStop } r4 #}) bchord = #(define-music-function (parser location chords) (ly:music?) #{ \override ChordName.font-series = #'bold $chords \revert ChordName.font-series #}) shiftChord = #(define-music-function (parser location xshift chord) (number? ly:music?) #{ \once \override ChordName.extra-offset = #`(,xshift . 0) $chord #}) shiftChords = #(define-music-function (parser location xshift chords) (number? ly:music?) #{ \override ChordName.extra-offset = #`(,xshift . 0) $chords #}) % kleine Mollakkorde und Alteration ausgeschrieben #(define (note-name->german-markup-nosym pitch lowercase?) (define (pitch-alteration-semitones pitch) (inexact->exact (round (* (ly:pitch-alteration pitch) 2)))) (define (accidental->markup alteration name) (if (= alteration 0) (make-line-markup (list empty-markup)) (if (= alteration FLAT) (if (equal? name "B") "" ; (make-line-markup (list (make-hspace-markup 0.2) ; (make-tiny-markup (make-raise-markup 1.2 ; (make-musicglyph-markup (assoc-get alteration standard-alteration-glyph-name-alist "")))) ; )) (if (or (equal? name "E") (equal? name "A")) "s" "es")) "is") )) (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 . -2))) (cons 7 (+ 0 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?)) (accidental->markup (/ (cdr n-a) 2) (vector-ref #("C" "D" "E" "F" "G" "A" "H" "B") (car n-a)) )))) ) % additional bass notes should get uppercased #(define (bassnote-name->german-markup-nosym pitch lowercase?)(note-name->german-markup-nosym pitch #f)) #(define chordNameExceptions (if (defined? 'customChordPrintings) (sequential-music-to-chord-exceptions customChordPrintings #t) '())) generalLayout = \layout { \generalLayout \context { \ChordNames \semiGermanChords \override ChordName.font-size = \songScoreChordFontSize \override ChordName.font-series = \songChordFontSeries \override ChordName.font-family = #'serif chordNameLowercaseMinor = ##t chordChanges = ##t % eigenen chordRootNamer damit F# = Fis und Gb = Ges (also alteration ausgeschrieben) chordRootNamer = #note-name->german-markup-nosym chordNoteNamer = #bassnote-name->german-markup-nosym majorSevenSymbol = "maj7" chordNameExceptions = \chordNameExceptions % der baseline-skip der Akkorde beeinflusst, wie hoch die Hochstellung ist \override ChordName.baseline-skip = #1.0 } } lyricsWithChordsLayout = \layout { \generalLayout \context { \ChordNames \override ChordName.font-size = \songTextChordFontSize } \context { \Lyrics \override VerticalAxisGroup.nonstaff-relatedstaff-spacing.basic-distance = 0 \override LyricText.parent-alignment-X = #LEFT \override LyricText.self-alignment-X = #LEFT \override LyricText.word-space = 0.8 \override LyricSpace.minimum-distance = 0.8 } \context { \Score \override SpacingSpanner.uniform-stretching = ##t \override SpacingSpanner.spacing-increment = 0 \remove Bar_number_engraver \remove Mark_engraver \remove Volta_engraver \remove Parenthesis_engraver } \context { \Staff \remove Staff_symbol_engraver \remove Clef_engraver \remove Time_signature_engraver \omit KeySignature } \context { \Voice \remove Stem_engraver \remove Rest_engraver \remove Phrasing_slur_engraver \remove Slur_engraver \remove Tie_engraver \remove Dynamic_engraver \remove Note_heads_engraver } } % Akkord mit Bunddiagramm anzeigen #(define-markup-command (fret-chord layout props fret chord) (string? string?) (interpret-markup layout props #{ \markup { \override #'(baseline-skip . 2) \center-column { \score { \new ChordNames { #(ly:parser-include-string (string-append "\\chordmode { s4 " chord " }")) } \layout { \generalLayout } } \override #'(fret-diagram-details . ((barre-type . straight))) { \fret-diagram-terse #fret } } } #}))