The string quartet I have been working on has a few passages where one
or more of the instruments are playing the same pattern for several bars
in succession.
In the score I want these to be written out in full, but in the parts I
would like to use numbered "percent" repeat marks.
The obvious way for me to do this was to use tags, and provide 2
versions.
Unfortunately, because I am using the \parallelMusic structure, it seems
to me that this won't work.
As an alternative, I thought I could provide the alternatives on a
bar-by-bar basis, just for the instrument concerned, so I have
experimented to see how I can construct the required output.
With just the repeat marks, this works:
\version "2.19.24"
makePercent =
#(define-music-function (note) (ly:music?)
"Make a percent repeat the same length as NOTE."
(make-music 'PercentEvent
'length (ly:music-length note)))
\relative c'' {
%Normal version
\repeat percent 3 { c1 }
%Constructed version
c1
\makePercent s1
\makePercent s1
}
But the best I have managed so far to include numbers over the repeats
is:
\version "2.19.24"
makePercent =
#(define-music-function (note) (ly:music?)
"Make a percent repeat the same length as NOTE."
(make-music 'PercentEvent
'length (ly:music-length note)))
\relative c'' {
%Normal
\set countPercentRepeats = ##t
\repeat percent 3 { c1 }
%Constructed version
c1
<< {\makePercent s1} {s1^\markup \override #'(font-encoding . fetaText) \tiny
"2"} >>
<< {\makePercent s1} {s1^\markup \override #'(font-encoding . fetaText) \tiny
"3"} >>
}
This works (apart from the fact that the numbers are not correctly
centred over the bar), but it is clearly rather ungainly.
Can anyone suggest a better way of achieving what I want?
David
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user