lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Temporary parts.


From: Ralph Little
Subject: Temporary parts.
Date: Mon, 2 Feb 2004 12:59:41 -0000

Hi,
Some time back I posted a question regarding how to introduce a
temporary ossia in an instrumental part for just a few bars on a
separate staff, and was messing with all kinds of things to achieve
this.
In the end, the simplest solution was the best, and I can't for the life
of me see why I didn't think of it straight away.

The problem was how to have a staff appear and disappear for just the
duration of the ossia and align with the part that it is accompanying.
The neatest way I could find was to use the \RemoveEmptyStaffContext to
only reveal the staff when containing the ossia part:

Here's an example.
-------------------------------------------------------------------
TopNotes=\notes {
        \relative c' {
                c1 d e f g a b c b a g f e d c
                c1 d e f g a b c b a g f e d c
                c1 d e f g a b c b a g f e d c
        }
}

BottomNotes=\notes {
        \relative c' {
                R1*15 c1 d e f g R1*20
        }
}

\score {
        \notes {
                \context StaffGroup {
                        <<
                                \context Staff=Top {\TopNotes}
                                \context Staff=Bottom {\BottomNotes}
                        >>
                }
        }
        \paper {
                \translator {
                        \StaffGroupContext
                        \remove System_start_delimiter_engraver
                }
                \translator {\RemoveEmptyStaffContext}
        }
}

-------------------------------------------------------------------
Sorry if this is obvious; it was a revelation to me at the time :)

Ralph

---------
Tribal Data Solutions has moved, please visit our website for more details 
http://www.tribaldata.co.uk. 
This e-mail and any attachments are confidential and are sent on the basis of 
our copyright, e-mail and security policy which can be inspected by visiting 
http://www.tribaldata.co.uk/policies.asp.
If you are not the intended recipient, please notify the sender and delete this 
message. Thank you.
-----------





reply via email to

[Prev in Thread] Current Thread [Next in Thread]