Hello Lukas, hello Jean, hello David,

Maybe something like this could do the trick.

Cheers,
Valentin

Am Dienstag, 26. Oktober 2021, 09:46:57 CEST schrieb Lukas-Fabian Moser:
> > \version "2.22.1"
> > 
> > {
> >   \clef tenor
> >   \repeat volta 2 {
> >     c'1
> >     \clef bass
> >     c'1
> >   }
> >   \alternative {
> >     {
> >       c'1
> >       \set Staff.clefGlyph = "clefs.C"
> >     }
> >     { c'1 }
> >   }
> >   c'1
> > }
> 
> While this is technically perfect, I'd strongly advise against doing it
> this way: It's a recipe for disaster regarding the start of the 2nd
> alternative. Half of your cellists (or whatever instrument uses tenor
> and bass clef here) is going to play a g' here, because there's this
> tenor clef directly in front of the the note, separated only by the bar
> line (which is what you're used to in any clef change).
> 
> One could do something like
> 
> \version "2.22.1"
> 
> {
>    \clef tenor
>    \repeat volta 2 {
>      c'1
>      \clef bass
>      c'1
>    }
>    \alternative {
>      {
>        c'1
>        \set Staff.clefGlyph = "clefs.C"
> 
>        \once \override Score.BarLine.stencil =
>          #(lambda (grob)
>            (grob-interpret-markup
>             grob
>             #{
>               \markup {
>                 \stencil #(ly:bar-line::print grob)
>                 \hspace #0.5
>                 \fontsize #-2 \raise #1 \musicglyph "clefs.F"
>               } #}))
>      }
>      { c'1 }
>    }
>    c'1
> }
> 
> (note that this is very unpolished; a real solution would have to check
> if there's a line break at the repeat sign)
> 
> but usually it's much better to just change notation such that there is
> no clef change at the repeat sign at all.
> 
> Lukas
{
   \clef tenor
   \repeat volta 2 {
     c'4 e' c' d'
     \clef bass
     a4 b g c'
   }
   \alternative {
     {
       b8 a g f g4 b
       \once\override Staff.Clef.font-size = #-2
       \once\override Staff.Clef.stencil = #(lambda (grob) (parenthesize-stencil (ly:clef::print grob) 0.18 0.4 0.3 0))
       \set Staff.clefGlyph = "clefs.C"
     }
     { b1 }
   }
   c'1
}

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to