I like to leave this command as a function in case I need to adjust the
size of the bracket. The original snippet is set in "2." (3/4 time
signature), and sometimes I need it for a specific length. So I leave it as
a function with a number argument.

But with regards to a MWE... I agree with you 😅.

Em qui., 20 de mar. de 2025 20:40, Knute Snortum <ksnor...@gmail.com>
escreveu:

> On Thu, Mar 20, 2025 at 3:45 PM Lucas Cavalcanti <lucaspi...@gmail.com>
> wrote:
>
>> From what I understood from the learning and reference material, there is
>> no difference between the "\repeat volta" and "\repeat segno" except the
>> automatic addition of the segno and coda marks. Coming from the opposite
>> direction, I've asked a similar but contrary question with regards the
>> segno structure
>> <https://lists.gnu.org/archive/html/lilypond-user/2024-09/msg00178.html>.
>>
>> How you would actually write your MWE so that it can be exported unfolded
>> is by putting the b and c in the \volta 2 music expression and shortening
>> the bracket. Remember to use void \volta to hide repeat markings. You can
>> also use tags to create better directions for the unfolded score.
>>
>> %%CODE BEGINS
>> \version "2.25.20"
>> %%This function serves to short the volta bracket.
>> shortVoltaBracketOnce =
>> #(define-music-function
>> () () #{
>> \once \override Score.VoltaBracket.musical-length = \musicLength 1
>> #} )
>> %%Now a variable to compare two scores: one folded and another one
>> unfolded.
>> howToDoItRight = {
>> \relative c' {
>>     a1
>>     \repeat volta 2 {
>>     \volta #'() {\segnoMark \default}
>>     \volta #'() {\textMark "Print me only in the folded version!"}
>>     \tag #'unfolded {\volta #'(1) {\textMark "Now only on the unfolded
>> one!"}}
>>     d'
>>     \alternative {
>>     \volta 1 {c,}
>>     \volta 2 {
>>       \shortVoltaBracketOnce
>>       a'  b c, \volta #'() { \jump \markup { \right-column {
>>     \concat { "D.S. al " \coda }
>>     "e poi la Coda" }}} % end of right column, markup & void volta
>>     } % add the whole "post ritornello" expression.
>>     } % end of alternative
>>     } % end of ritornello
>>     \break
>>     \mark "Coda"
>>     a'
>> }} % fixed & variable
>> \score { \removeWithTag #'unfolded \howToDoItRight }
>> \score { \unfoldRepeats \howToDoItRight }
>> %%CODE ENDS
>>
>
> Very nice!  I was curious, though, why you wrote this:
>
> shortVoltaBracketOnce =
> #(define-music-function
> () () #{
> \once \override Score.VoltaBracket.musical-length = \musicLength 1
> #} )
>
> It seems that this:
>
> shortVoltaBracketOnce = \once \override Score.VoltaBracket.musical-length
> = \musicLength 1
>
> ... works just as well.  Just a thought.
>
> --
> Knute Snortum
>
>

Reply via email to