Hi Brent,
Am 15.06.21 um 06:41 schrieb Brent Annable:
I'm trying to create the effect in the picture, of a one-time Volta
bracket above the staff with the text "last time only". I would prefer
the text to be inside the bracket, but that's another matter. Right
now I'm just looking for a way to get the bracket up there - I've
tried using actual Volta repeats and deleting/removing/changing things
with tips from previous emails and snippets, but after an hour I'm
just not getting anywhere.
Does somebody know an easy way?
Volta brackets seem to insist on getting closed only at a repeat-closing
bar line.
So I had no better idea than to banish the creation of the Volta bracket
into a custom context that is independent of what's going on elsewhere:
\version "2.21"
\layout {
\context {
\name "Custom"
\type "Engraver_group"
\consists Volta_engraver
\consists Bar_engraver
}
\context {
\Score
\accepts "Custom"
}
}
lastTime = \markup \normal-text { last time only }
<<
\new Custom {
s1
\once \set repeatCommands = #`((volta ,lastTime))
% in standard contexts, \set is reset after each time steps,
% but obviously I didn't add the necessary engraver, so \once
s1
\set repeatCommands = #'((volta #f) end-repeat)
}
\new Staff
{
a1
g4 a g a
\repeat volta 2 {
g a g a
}
}
>>
This feels like a terrible hack, and I'd not be surprised if it blows up
at the first opportunity. But maybe it can become a starting point for
future experiments?
Lukas