[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Segno Repeat Structure
From: |
mskala |
Subject: |
Re: Segno Repeat Structure |
Date: |
Thu, 19 Sep 2024 17:56:12 -0400 (EDT) |
User-agent: |
Alpine 2.20 (LNX 67 2015-01-07) |
On Thu, 19 Sep 2024, Lucas Cavalcanti wrote:
> Hello, fellow lilypond users!
>
> Is it possible to use the segno and volta commands in lilypond to generate a
> file like this screenshot below?
I think this works:
\new Staff {
c''1 | d''1 | e''1 | f''1 | \break
\repeat volta 3 {
\mark \markup { \larger \segno }
c''4 d''8 e''8 c''4 d''8 e''8 |
c''4 d''8 e''8 c''4 d''8 e''8 |
c''4 d''8 e''8 c''4 d''8 e''8 |
\mark \markup { \larger \coda }
\alternative {
\volta 1 { f''1 }
\volta 2 {
g''1
}
}
}
\jump \markup { \right-column {
\concat { "D.S. al " \coda }
"e poi la Coda"
} }
\bar "|" \break
\mark "Coda"
e''1 |
}
Really cross-nesting Lilypond's segno and volta repeats as your screenshot
implies, doesn't work. But the logic of the notes to play is actually
equivalent to a volta repeat with three alternatives; and that in turn is
equivalent to a volta repeat with three alternatives of which the third
one is empty, followed by other stuff outside the repeat. So it's
possible to write the equivalent structure with only a volta repeat, to
get the correct unfolding logic, and then just decorate it visually to
make it look like there's a segno repeat involved. It will still unfold
correctly with \unfoldRepeats.
You can, of course, tweak the appearance of the marks by using something
other than \mark; perhaps by attaching them as markups to notes if you
don't want them to appear right above barlines.
--
Matthew Skala
mskala@ansuz.sooke.bc.ca People before tribes.
https://ansuz.sooke.bc.ca/