Hallo Paul,
das ganze funktioniert wie bei der Änderung in
diesem Thread.
In
chExceptionMusic müssen die Akkorde aufgeführt werden mit dem neuen Erscheinungsbild ( -\markup ... ). Allerdings nur dem Prinzip nach: mit <c ees g> ist jeder moll-Akkord gemeint, etc . Jedes Akkord-Prinzip muß einzeln benannt werden! Das können natürlich sehr viele sein. (Ich habe mich jetzt auf ein paar wenige beschränkt)
Das Ganze wird mittels
chExceptions = #( append (sequential-music-to-chord-exceptions chExceptionMusic #t) ignatzekExceptions)zugänglich gemacht.
Um die Änderung grundsätzlich, d.h. Für den gesamten score aufzurufen:
\layout {
\context {
\ChordNames
chordNameExceptions = #chExceptions
}
}
Fallweise mit: newChords = { \set chordNameExceptions = #chExceptions } in den Akkorden.
Die Änderungen des Erscheinungsbildes erfolgen mittels
\raise und
\fontsize. Ich habe noch ein neues markup-command
chChange dazu geschrieben. Dieses setzt die entsprechenden Werte auf
\raise #'1 und
\fontsize #'-0.5. (Du kannst diese Werte natürlich noch anpassen. Sie sind dann aber festgelegt.) Falls Du flexibler sein möchtest benutze
chChange-flex mit einsetzbaren Werten oder gehe zurück auf das ursprüngliche
\raise und
\fontsize. Im Code und im Bild habe ich alles mal benutzt. (Manche Setzungen habe ich aber nur des Effektes wegen benutzt, in einem realen Musikstück sollte man schon was anderes nehmen.)
Ansonsten habe ich die Änderungen des
chordRootNamer aus
diesem Thread gleich mitintegriert.
\version "2.14.1"
% chordRootNamer
#(define (myChordNames pitch computer-sind-blöd)
(define (pitch-alteration-semitones pitch)
(inexact->exact (round (* (ly:pitch-alteration pitch) 2))))
(define (conditional-kern-before markup bool amount)
(if bool
(make-line-markup
(list (make-hspace-markup amount)
markup))
markup))
(define (accidental->markup alteration)
(if (= alteration 0)
(make-line-markup (list empty-markup))
(conditional-kern-before
(alteration->text-accidental-markup alteration)
(= alteration FLAT) 0.2)))
(let* ((name (ly:pitch-notename pitch))
(alt-semitones (pitch-alteration-semitones pitch))
(n-a (cons name alt-semitones)))
(make-line-markup
(list
(make-simple-markup
(vector-ref #("C" "D" "E" "F" "G" "A" "B") (car n-a)))
(make-fontsize-markup -2.5
(make-raise-markup 1.2
(accidental->markup (/ (cdr n-a) 2))))))))
% chordNameExceptions
#(define-markup-command (chChange layout props arg)(markup?)
(interpret-markup layout props
(make-raise-markup 1
(make-fontsize-markup -0.5
arg))))
#(define-markup-command (chChange-flex layout props flex arg)(pair? markup?)
(interpret-markup layout props
(make-raise-markup (car flex)
(make-fontsize-markup (cdr flex)
arg))))
chExceptionMusic = {
<c f g>1-\markup \raise #'1 \fontsize #'-0.5 { "4" }
<c ees g>1-\markup \chChange-flex #'(0 . -2) { "m" }
<c e g a>-\markup \chChange { "6" }
<c e g bes>1-\markup \chChange-flex #'(1 . -0.5) { "7" }
<c ees g bes>1-\markup { \chChange-flex #'(0 . -2) "m" \chChange-flex #'(1 . -0.5)"7" }
<c e g d'>1-\markup { \chChange { "add" \chChange "9" } }
<c ees g d'>1-\markup { \chChange-flex #'(0 . -2) "m" \chChange "add" \chChange-flex #'(1 . 1) "9" }
}
chExceptions = #( append
(sequential-music-to-chord-exceptions chExceptionMusic #t)
ignatzekExceptions)
%------------------------- Test ------------------------------------------------
newChords = { \set chordNameExceptions = #chExceptions }
theMusic = \chordmode { %\newChords
c1:sus4 cis1:m d:6 dis:7 e:m7 f:5.9 fis:m5.9
}
\markup \column {\fontsize #'2 \bold "DEFAULT" \vspace #'2 }
\score {
<< \context ChordNames
\theMusic
%\context Voice \theMusic
>>
}
\markup \column {\fontsize #'2 \bold "NEW" \vspace #'2 }
\score {
<< \context ChordNames
\theMusic
%\context Voice \theMusic
>>
\layout {
ragged-right = ##t
\context {
\ChordNames
chordNameExceptions = #chExceptions
chordRootNamer = #myChordNames
}
}
}
Gruß,
Harm