lilypond-user
[Top][All Lists]
Advanced

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

Placing clef change *after* bar line


From: lilypond
Subject: Placing clef change *after* bar line
Date: Mon, 27 Feb 2012 18:41:23 -0800
User-agent: Mutt/1.5.21 (2010-09-15)

Most times, placing a clef change before a bar line is
appropriate.  When combined with repeated sections though,
sometimes it is clearer to place a clef change after the bar
line.  I read through the LSR for everything 'clef' but didn't
find anything on this topic.

The best workaround (that I've found), while limited, involves
forcing a line break at the point of the clef change and setting
the end-of-line-invisible property.

When that's not possible or desireable, I kludged up this, but
it's a gross hack looking at the code, and the spacing isn't very
good, looking at the output.  Is there a better way to tell
lilypond to put the new clef after the barline instead of before?

Thank you!


\version "2.14.2"

melodyA = \relative c' {
        \clef treble
        \bar "|:" e8 fis gis a b gis a fis \bar ":|"
        \clef bass
        e,8 fis gis a b gis a fis
        e1
} % melodyA

melodyB = \relative c' {
        \set Staff.explicitClefVisibility = #end-of-line-invisible
        \clef treble
        \bar "|:" e8 fis gis a b gis a fis \bar ":|"
        \override Staff.TimeSignature #'stencil = ##f
        \time 9/8
        s8
        \clef bass
        e,8[ fis gis a] b[ gis a fis]
        \time 4/4
        e1
        \unset Staff.explicitClefVisibility
        \revert Staff.TimeSignature #'stencil
} % melodyB

\score {
  \new Staff {
    \key e \major
    \time 4/4
    \melodyA
    \break
    \melodyB
    \break
  }
} % score






reply via email to

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