Jump to content

Force clef change in alternatives: Difference between revisions

From LilyPond wiki
Import snippet from LSR
 
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series
Line 1: Line 1:
This snippet shows how to force the appearance of a callback clef during a repeat.
This snippet shows how to force the appearance of a callback clef during a repeat.


<lilypond version="2.24.0">
<lilypond version="2.24">
%% => http://lilypond-french-users.1298960.n2.nabble.com/Changement-de-cle-avant-reprise-td7590078.html
%% => http://lilypond-french-users.1298960.n2.nabble.com/Changement-de-cle-avant-reprise-td7590078.html



Revision as of 18:55, 16 November 2025

This snippet shows how to force the appearance of a callback clef during a repeat.

\version "2.24"

%% => http://lilypond-french-users.1298960.n2.nabble.com/Changement-de-cle-avant-reprise-td7590078.html

\relative c' {
  \repeat volta 2 {
     c4 d e f g1 \clef bass g,4 a b c
  } 
  \alternative {
    { d1 \clef treble }
    { 
      \grace s4
      \once \override Staff.Clef.extra-spacing-width = #'(-1.5 . 0)
      \clef bass
      d4 c b a 
    }
  } 
  g1
}