On 31 March 2013 22:36, Urs Liska <address@hidden> wrote:
Is it possible to refer to a staff relative to the current staff and not by its name?
So, is it possible to write something like
\change Staff = "previous/next or "higher/lower"
instead of
\change Staff = "Explicit-name-of-staff"
inside a PianoStaff?
I'd be interested in creating a generic command like \staffUp or \staffDown.
Best
Urs
I have a piece for four keyboards where a motif that changes staff
note-by-note makes its way through all of the keyboards. Something
like this would be useful...
If there are normally a limited number of keyboards in any one piece,
maybe the following pseudo-code might work:
function ChangeStaff()
current = GetCurrentStaff()
if current == "PianoOneRH" then
newStaff = "PianoOneLH"
elseif current == "PianoOneLH" then
newStaff = "PianoOneRH"
elseif current == "PianoTwoRH" then
newStaff = "PianoTwoLH"
elseif current == "PianoTwoLH" then
newStaff = "PianoTwoRH"
end
SetCurrentStaff(newStaff)
end
It would depend on the name of the current staff being available to
Scheme, which I don’t imagine would be a problem.
Vaughan
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user