[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Trying and failing to engrave a segno repeat with coda: More alterna
From: |
Valentin Petzel |
Subject: |
Re: Trying and failing to engrave a segno repeat with coda: More alternatives than repeats. |
Date: |
Fri, 09 Jun 2023 11:00:41 +0200 |
Hello Ken,
please try to give a MWE and to describe what you actually want to achieve. It
is hard to get what you want from just a handful of screenshots of jump marks.
I suppose this is supposed to be something like
A [SEGNO] B [Fine→Coda] C [Dal segno al Fine e poi la coda] [Coda] D
So essentially A → B → C → B → D
What you are doing is something like
{
c'1 c'
\repeat segno 2 {
d' d'
}
\alternative {
\volta 1 { }
\volta 2 { e' e' }
{ f' f' }
}
}
instead you should be doing something like this
{
c'1 c'
\repeat segno 2 {
d' d'
}
\alternative {
{ e' e' }
{ f' f' }
}
}
Or as given in the documentation
{
c'1 c'
\repeat segno 2 {
d' d'
}
\alternative {
{ e' e' }
{ \section \sectionLabel "Coda" }
}
f' f'
}
Now, Lilypond will then produce marks that are more inspired by classical use
of codas, while this is more a pop-style use of coda marks (where you will find
interesting instructions like this "D.S. al coda" (lit. from the sign to the
Coda, so start playing repeat from the segno and stop once you reach the
Coda).
Now, if you want you can simply tell Lilypond to do this thing by simple
styling directives:
{
c'1 c'
\repeat segno 2 {
d' d'
}
\alternative {
{ e' e' }
{ f' f' }
}
}
\layout {
\context {
\Score
dalSegnoTextFormatter =
#(lambda (context return-count marks)
(let* ((start-markup (car marks))
(end-markup (cadr marks))
(next-markup (caddr marks))
(result (if start-markup "D.S." "D.C.")))
(if next-markup
(markup result "al Coda")
(if end-markup
(markup result "al" end-markup)
result))))
\override CodaMark.self-alignment-X = ##f
\override CodaMark.font-size = #0
codaMarkFormatter =
#(lambda (count context)
(let* ((coda-markup (format-coda-mark (ceiling (/ count 2)) context)))
(if (= (remainder count 2) 1)
(markup #:put-adjacent X LEFT #:center-align coda-markup
#:fontsize -1 "To Coda ")
(markup #:put-adjacent X RIGHT #:center-align coda-markup
#:fontsize -1 " Coda"))))
}
}
Cheers,
Valentin
signature.asc
Description: This is a digitally signed message part.