Re: Definition of repeats using segno and coda
Thank you very much, David! Your suggestion fixed both the minimal example and my real use case! I'm impressed with the reactivity and quality of Lilypond support! Minimal example that produces the desired result \version "2.24.0" \relative { \clef treble \key c \major \time 4/4 \repeat segno 2 { \repeat volta 2 { a'1 1 1 1 } { \alternative { \volta 1 { \repeat volta 2 { b1 1 1 1 } } \volta 2 { \section \sectionLabel "Coda" } } } } c1 1 1 1 } [image: image.png] Thank you very much David and Jean! Vlad On Sun, Feb 26, 2023 at 10:09 PM David Kastrup wrote: > Volodymyr Prokopyuk writes: > > > Hi Jean, > > > > I've produced the minimal example reflecting my real use case. This > example > > does not produce the desired result. The difference between the minimal > > working example and my real use case is that both section A and section B > > are \repeat volta 2 themselves. In this situation the minimal working > > example from above stops working. > > > > > > *Minimal example that does not produce the desired result* > > > > \version "2.24.0" > > > > \relative { > > \clef treble > > \key c \major > > \time 4/4 > > \repeat segno 2 { > > \repeat volta 2 { a'1 1 1 1 } > > \alternative { > > \volta 1 { > > \repeat volta 2 { b1 1 1 1 } > > } > > \volta 2 { \section \sectionLabel "Coda" } > > } > > } > > c1 1 1 1 > > } > > Well, the old syntax compatibility sets in, drawing \alternative to the > inner \repeat volta. You could put { } before \alternative to block > that. > > -- > David Kastrup >
Re: Definition of repeats using segno and coda
Volodymyr Prokopyuk writes: > Hi Jean, > > I've produced the minimal example reflecting my real use case. This example > does not produce the desired result. The difference between the minimal > working example and my real use case is that both section A and section B > are \repeat volta 2 themselves. In this situation the minimal working > example from above stops working. > > > *Minimal example that does not produce the desired result* > > \version "2.24.0" > > \relative { > \clef treble > \key c \major > \time 4/4 > \repeat segno 2 { > \repeat volta 2 { a'1 1 1 1 } > \alternative { > \volta 1 { > \repeat volta 2 { b1 1 1 1 } > } > \volta 2 { \section \sectionLabel "Coda" } > } > } > c1 1 1 1 > } Well, the old syntax compatibility sets in, drawing \alternative to the inner \repeat volta. You could put { } before \alternative to block that. -- David Kastrup
Re: Definition of repeats using segno and coda
Hi Jean, I've produced the minimal example reflecting my real use case. This example does not produce the desired result. The difference between the minimal working example and my real use case is that both section A and section B are \repeat volta 2 themselves. In this situation the minimal working example from above stops working. *Minimal example that does not produce the desired result* \version "2.24.0" \relative { \clef treble \key c \major \time 4/4 \repeat segno 2 { \repeat volta 2 { a'1 1 1 1 } \alternative { \volta 1 { \repeat volta 2 { b1 1 1 1 } } \volta 2 { \section \sectionLabel "Coda" } } } c1 1 1 1 } [image: image.png] On Sun, Feb 26, 2023 at 9:46 PM Volodymyr Prokopyuk < volodymyrprokop...@gmail.com> wrote: > 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 < > volodymyrprokop...@gmail.com> 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 >> 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 >>> >>
Re: Definition of repeats using segno and coda
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 < volodymyrprokop...@gmail.com> 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 > 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 >> >
Re: Definition of repeats using segno and coda
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 signature.asc Description: This is a digitally signed message part
Definition of repeats using segno and coda
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 - Is there a way to imperatively instruct the { _*D.C. al codaMark a poi la Coda* } repeat instruction? I've tried with no success the example at https://lilypond.org/doc/v2.25/Documentation/notation/long-repeats#segno-repeat-structure which is very close to what I need. Thank you very much, Vlad