[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Refer to a staff relatively, not by name
From: |
Vaughan McAlley |
Subject: |
Re: Refer to a staff relatively, not by name |
Date: |
Mon, 1 Apr 2013 19:55:05 +1100 |
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
- Re: Refer to a staff relatively, not by name, Eluze, 2013/04/01
- Re: Refer to a staff relatively, not by name, Urs Liska, 2013/04/01
- Re: Refer to a staff relatively, not by name, Eluze, 2013/04/01
- Re: Refer to a staff relatively, not by name, Urs Liska, 2013/04/01
- Re: Refer to a staff relatively, not by name, Thomas Morley, 2013/04/01
- Re: Refer to a staff relatively, not by name, Urs Liska, 2013/04/02
- Re: Refer to a staff relatively, not by name, Urs Liska, 2013/04/07
- Re: Refer to a staff relatively, not by name,
Vaughan McAlley <=