From b4690f63bc79d1d58ed5d5b4b34d0b41687597eb Mon Sep 17 00:00:00 2001 From: tux Date: Wed, 4 Sep 2024 09:39:57 +0200 Subject: [PATCH] Alternativchords mit Klammern --- chord_settings.ly | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/chord_settings.ly b/chord_settings.ly index b8feb9c..d811da4 100644 --- a/chord_settings.ly +++ b/chord_settings.ly @@ -38,6 +38,32 @@ shiftChords = #(define-music-function (parser location xshift chords) (number? l $chords #}) +altChord = #(define-music-function (parser location mainchord altchord) (ly:music? ly:music?) +(define (chord-namer in-pitches bass inversion context) +#{ + \markup { + \translate #'(-0.5 . 0) + \score { + \chords { #mainchord \klamm #altchord } + \layout { + \LAYOUT + \context { + \ChordNames + \override ChordName.extra-spacing-width = #'(0 . 0.3) + } + \context { + \Score + \override SpacingSpanner.spacing-increment = 0 + } + } + } + } +#}) +#{ + \once \set chordNameFunction = #chord-namer + #mainchord +#}) + % 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))))