From 288349c4e5443390f558ccca0cdaa4b5b354dd64 Mon Sep 17 00:00:00 2001 From: "zuk (Jakob Krueger)" Date: Sun, 27 Apr 2025 16:02:57 +0400 Subject: [PATCH] add default chordName exceptions --- chord_settings.ly | 33 ++++++++++++++++++++++++++++++--- default_style.ly | 3 ++- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/chord_settings.ly b/chord_settings.ly index f8d8e37..000448a 100644 --- a/chord_settings.ly +++ b/chord_settings.ly @@ -104,11 +104,38 @@ altChord = % additional bass notes should get uppercased #(define (bassnote-name->german-markup-nosym pitch lowercase?)(note-name->german-markup-nosym pitch #f)) +defaultChordPrintings = { + -\markup { \super "5" } + %% Dur + -\markup { \super "6" } %Standardverhalten + -\markup { \super "6(no5)" } + -\markup { \super "6/9" } + -\markup { \super "9" } %Standardverhalten + -\markup { \super "11" } %Standardverhalten + -\markup { \super "13" } + %add chords + -\markup { \super "add9" } + -\markup { \super "add11" } + -\markup { \super "add13" } + %major chords + -\markup { \super "maj9" } + %% Moll + -\markup { \super "6" } %Standardverhalten + -\markup { \super "6(no5)" } + -\markup { \super "6/9" } + -\markup { \super "9" } %Standardverhalten + -\markup { \super "11" } %Standardverhalten + -\markup { \super "13" } + %add chords + -\markup { \super "add9" } + -\markup { \super "add11" } + -\markup { \super "add13" } + %major chords + -\markup { \super "maj9" } +} #(define chordNameExceptions - (if (defined? 'customChordPrintings) - (sequential-music-to-chord-exceptions customChordPrintings #t) - '())) + (sequential-music-to-chord-exceptions #{ \defaultChordPrintings \customChordPrintings #} #t)) generalLayout = \layout { \generalLayout diff --git a/default_style.ly b/default_style.ly index 0f651b6..9bf7eb7 100644 --- a/default_style.ly +++ b/default_style.ly @@ -22,12 +22,13 @@ refStringWithNumbers = "Ref. ~a:" % hübsche Wiederholungszeichen für den Liedtext repStart = "𝄆" repStop = "𝄇" +customChordPrintings = {} \paper { cueMarkup = \markup { \italic #(make-on-the-fly-markup (lambda (layout props m) - (interpret-markup layout props + (interpret-markup layout props (string-join (map (lambda (n) (format #f "~@r." n)) (chain-assoc-get 'cues props)) ", "))) (make-null-markup)) }