Hello Kevin, Am Montag, 1. Jänner 2024, 21:24:16 CET schrieb Kevin Cole: > Or vice versa? > > What I mean is, I often have a situation where there's only a wee bit > o' text occasionally, above the staff. But I frequently have > ChordNames. It seems to me that the ChordNames would be better placed > below the occasional text, and I was hoping that, rather than manually > adjusting and specifying how far to adjust the occasional text, there > would be some other property that would set the order, keeping > ChordNames more intimately tied to the Staff that appears below it.
A TextScript is engraved at voice level. It does not really know that there
are ChordNames above. Rather use the right tool: Use Marks:
melody = \relative c'' {
\global
\clef treble
\sectionLabel \markup \bold "CHORUS"
a2 f2 | % 9
g4 g4 g8[ f8] e4 | % 10
d4. e8 f4 e4 | % 11
d4 b4 g2 | % 12
}
If you want a behaviour more like a TextScript use
\override Score.SectionLabel.non-musical = ##f
Also check out the other types of marks there are for different things like
text marks, metronome marks. rehearsal marks.
> Another solution that would suit me would be for \chordmode to allow
> associating text with a chord name -- e.g. something like
>
> d2:m^\markup "put me above the chordname"
This is in fact possible. The problem is that \chordmode does its own thing,
so syntax like ^\markup won’t work:
\new ChordNames \with {
\consists Text_engraver
} << \chordmode { d2:m } <>^\markup "put me above the chordname" >>
But you can use music functions for this:
putAbove =
#(define-music-function (what where) (scheme? ly:music?)
#{ << #where <>^#what >> #})
putBelow =
#(define-music-function (what where) (scheme? ly:music?)
#{ << #where <>_#what >> #})
putNeutral =
#(define-music-function (what where) (scheme? ly:music?)
#{ << #where <>-#what >> #})
\new ChordNames \with {
\consists Text_engraver
} \chordmode {
\putAbove "put me above the chordname" d2:m
\putBelow "put me below the chordname" d2:m
}
Cheers,
Valentin
signature.asc
Description: This is a digitally signed message part.
