Hi Jean,
I've tried the minimal example and it works! Let me find out what is wrong
with my real use case.
\version "2.24.8"
\relative {
\clef treble
\key c \major
\time 4/4
\repeat segno 2 {
a'1 1 1 1
\alternative {
\volta 1 { b1 1 1 1 }
\volta 2 { \section \sectionLabel "Coda" }
}
}
c1 1 1 1
}
[image: image.png]
Thank you for the snippet!
Vlad
On Sun, Feb 26, 2023 at 9:09 PM Volodymyr Prokopyuk <
[email protected]> wrote:
> Good evening, Jean,
>
> I've used the suggested repeat structure (see the attached code), but it
> does not produce the desired result (see the attached PDF). Sorry for not
> being compliant with the minimal example requirement.
>
> By imperative instructions I mean not using the proposed code structure
> for repeats, but instead using explicit \codaMark and a literal text *D.C.
> ... al Coda* in the appropriate places in the code.
>
> I'm using Lilypond 2.24.0.
>
> Thank you,
> Vlad
>
> On Sun, Feb 26, 2023 at 8:51 PM Jean Abou Samra <[email protected]>
> wrote:
>
>> Le dimanche 26 février 2023 à 20:39 +0100, Volodymyr Prokopyuk a écrit :
>>
>> Hi,
>>
>> I'd like to find out the right way to define repeats using segno and coda.
>>
>> **Desired output written in scores
>> **
>>
>> Section A { ^*codaMark* } Section B { _*D.C. al codaMark a poi la Coda*
>> } { *^Coda* } Section C
>>
>> *Order of sections to play*
>> Section A => Section B => Section A => Section C
>>
>> *Questions*
>>
>> - What is the minimal code structure to declaratively implement the
>> above repeat order? I guess the \repeat segno and \alternatives will be
>> used
>>
>> This works for me:
>>
>> \version "2.24.1"
>>
>> mus = {
>> \repeat segno 2 {
>> a'1 1 1
>> \alternative {
>> \volta 1 {
>> b'1 1 1
>> }
>> \volta 2 {
>> \section
>> \sectionLabel "Coda"
>> }
>> }
>> }
>> c''1 1 1
>> }
>>
>>
>> { \mus }
>>
>>
>> - Is there a way to imperatively instruct the { _*D.C. al codaMark a
>> poi la Coda* } repeat instruction?
>>
>> What do you mean by “imperatively instruct”?
>>
>> Regards,
>>
>> Jean
>>
>