Hi (I sent this already yesterday but forgot to Cc ot lily-user), > I try to write blank staves in a score, but I don't know how to do this ... > can you tell me the procedure? > thanks in advance.
(are you going to typeset 7min of silence by John Cage? :-) Well, now serious: I assume that you are not looking for blank music paper, because you would have found it in http://lilypond.org/wiki/?BlankMusicPaper. You also would know how to make music with empty measures since you can compose whitespace with the 's' note name (space) like in empty0.ly (attachment 1). I assume that you want completely empty staves; let's say you are a music teacher and for some exercise you want to prepare a piece of score with some of the staves already filled in with music, others completely empty: no bars, no clefs, no times signatures. The students have to fill that in. Since the other staves need to behave normally, you cannot just modify the Staff context like ... \paper { \translator { \StaffContext \remove Bar_engraver \remove Time_signature_engraver \remove Clef_engraver } } ... because that will kill the music in the other staves as well. So what you want is a your own new staff context. In principle this should be covered in the manual. I looked at: http://www.lilypond.org/development/Documentation/user/out-www/lilypond/Defining-new-contexts.html which should be the complete HOWTO for new context creation but I failed. I tried empty1.ly and empty2.ly (attachments 2 and 3) and tons of obvious variations but all of them only give me an error: "warning: can't find or create `EmptyStaffContext' called `bar'" and the result looks identical to that of empty0.ly (probably because it defaults to normal Staff context). So even though your question sounded like a FAQ I can not help you. I searched the online manual and I have been grepping in the ly/ and input/regression/ directories but that did not provide me with working ideas. So it's time for a higher ranked guru to step in. If he succeeds in explaining me what I did wrong when I tried to create this EmptyStaff context I will probably transform that into improvement suggestions for the above-mentioned manualpage. David Boersma PS: I remember that on a similar question some time ago the trick was to use \override on a \property to make the clef etc. transparent. That would probably give the desired output, but it is a hack, not a solution. Why can't I just define a context with *only* a staff symbol engraver?
\score{ < \context Staff = "foo" \notes { c'4 d' e' f' | g' f' e' d' } \context Staff = "bar" \notes { s1 | s1 } \context Staff = "baz" \notes { g'4 f' e' d' | c' d' e' f'} > \paper { } }
\score{ < \context Staff = "foo" \notes { c'4 d' e' f' | g' f' e' d' } \context EmptyStaff = "bar" \notes { s1 | s1 } \context Staff = "baz" \notes { g'4 f' e' d' | c' d' e' f'} > \paper { EmptyStaffContext = \translator { \type "Engraver_group_engraver" \name EmptyStaff \consists "Staff_symbol_engraver" } } }
\paper { EmptyStaff = \translator { \type "Engraver_group_engraver" \name "EmptyStaff" } } \score{ < \context Staff = "foo" \notes { c'4 d' e' f' | g' f' e' d' } \context EmptyStaff = "bar" \notes { s1 | s1 } \context Staff = "baz" \notes { g'4 f' e' d' | c' d' e' f' } > \paper { \translator { \EmptyStaff \consists "Staff_symbol_engraver" } } }