[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: HaraKiri in PianoStaff
From: |
Mats Bengtsson |
Subject: |
Re: HaraKiri in PianoStaff |
Date: |
Mon, 11 Jun 2001 22:57:11 +0200 |
> Is there a way to make the bass staff of a PianoStaff disappear when
> there is nothing in it? This seems like what I want, but it doesn't work:
>
> \context PianoStaff \notes <
> \context Staff = "up" <
> \property Score.skipBars = ##t
> \clef treble
> \global
> \organ
> >
> \context HaraKiriStaff = "down" <
> \property Score.skipBars = ##t
> \clef bass
> \global
> \organbass
> >
> >
>
> I get a message
> "warning: can't find or create `HaraKiriStaff' called `down'"
> in the interpretation phase. Then I get three staves in the output, and
> the order is all out of whack.
The HaraKiriStaff doesn't exist as a separate \context type.
When you say \translator { \HaraKiriStaffContext } you simply
redefine the ordinary Staff contexts. If you want to get a
clearer idea of how the different contexts are defined, you
could take a look at ly/engraver.ly.
> I also tried adding
> \translator { \HaraKiriStaffContext }
> to my paper definition, but this wipes out both staves when both staves
> are empty, which doesn't look good for orchestral parts.
Unfortunately, the only way to get what you want is to add
a new separate \context type for hara kiri staffs. This is
a bit hairy since you have to add the new context to the
context hierarchy using \accept ...
There are some examples available in input/test/improv.ly and
input/test/part-combine-moments.ly.
/Mats