lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: clef change in 1st ending


From: Lukas-Fabian Moser
Subject: Re: clef change in 1st ending
Date: Tue, 26 Oct 2021 09:46:57 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0


\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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]