What's this? Searching the LSR Browse by title Contributing Snippet database | Browsing items 190−199 out of 940 |
In an orchestral score, you may find it useful to hide multi-bar rests using \RemoveEmptyStaffContext
to produce a Frenched
score, but this can prove problematic when you want to make such bars visible.
For example, imagine you are using a PianoStaff
for a harp part. When there is music in one stave, you will want both staves to be visible. Of course, adding hidden notes to the invisible staff will make the stave visible, but this is a rather ugly kludge.
A more elegant solution is to use the property keepAliveInterfaces
. This determines which items of musical output are interesting enough to keep a bar visible when remove-empty
is set. By default, it looks like this:
keepAliveInterfaces = #'(
rhythmic-grob-interface
lyric-interface
stanza-number-interface
percent-repeat-interface)
If you insert multi-measure-rest-interface
into this list, multi-bar rests count as interesting items. You can then create macros to switch this behaviour on and off as required:
showMultiRests = { \set Staff.keepAliveInterfaces = #'(
rhythmic-grob-interface
multi-measure-rest-interface
lyric-interface
stanza-number-interface
percent-repeat-interface)
}
hideMultiRests = \unset Staff.keepAliveInterfaces
For this to work successfully, you must place these macros carefully, otherwise they tend to interfere with the visibility of other hidden staves.
Though volte are best specified using
\repeat volta
, the context property repeatCommands
must be used in cases where the volta text needs more advanced
formatting with \markup
.
Since repeatCommands
takes a list, the simplest method of
including markup is to use an identifier for the text and embed
it in the command list using the Scheme syntax
#(list (list 'volta textIdentifier))
. Start- and
end-repeat commands can be added as separate list elements: