Hi,
I used tags for this and did the pdf and midi output seperately.
Maybe this is what you want:
\version "2.24.4"
taggedVoice = {
\tag #'B { b4 b b b }
\tag #'C { c' c' c' c' }
\tag #'D { d'1 }
\tag #'E { e'1 }
\tag #'F { f'4 f' f' f' }
\tag #'G { g'1 }
}
printVoice = {
\repeat volta 2 {
\keepWithTag #'B \taggedVoice
\sectionLabel \markup { \segno }
\keepWithTag #'C \taggedVoice
\sectionLabel \markup { \coda }
}
\alternative {
\keepWithTag #'D \taggedVoice
\keepWithTag #'E \taggedVoice
}
\keepWithTag #'F \taggedVoice
\textEndMark \markup {D.S. (con rep.) T.2 al \coda - \coda}
\sectionLabel \markup { \coda }
\keepWithTag #'G \taggedVoice
}
midiVoice = \unfoldRepeats {
\repeat volta 2 {
\keepWithTag #'B \taggedVoice
\keepWithTag #'C \taggedVoice
}
\alternative {
\keepWithTag #'D \taggedVoice
\keepWithTag #'E \taggedVoice
}
\keepWithTag #'F \taggedVoice
\keepWithTag #'C \taggedVoice
\keepWithTag #'G \taggedVoice
}
{
\printVoice
\bar "||"
\break
\midiVoice
}
Am Sonntag, dem 26.01.2025 um 11:38 +0100 schrieb Thomas Morley:
> Hi,
>
> please consider this small code:
> {
> \repeat volta 2 {
> b4 b b b
> \mark \default
> c' c' c' c'
> \mark \default
> \alternative { d'1 e'1 }
> }
> f'4 f' f' f'
> \mark \default
> g'1
> }
> If \unfoldRepeats is applied (for midi) it should be:
> {
> b4 b b b
> c' c' c' c'
> d'1
> b4 b b b
> c' c' c' c'
> e'1
> f'4 f' f' f'
> c' c' c' c'
> g'1
> }
>
> How to do with \repeat volta ..., \repeat segno ..., \jump ... or
> else?
>
> Thanks,
> Harm
>