An alternative, outlined in my reply yesterday is

\score {
        \context StaffGroup {
                \notes {
                        \context Staff = One {c4 d e f}
                        <<
                                {c d e f c d e f}
                                \context Staff = Two {
                                \property Staff.Clef=\turnOff
                                \property Staff.TimeSignature=\turnOff
                                c4 d e f c d e f}
                        >>
                        c d e f
                }
        }
        \paper {
                raggedright = ##t
                \translator {
                        \StaffGroupContext
                        \remove System_start_delimiter_engraver
                }
                \translator {
                        \ScoreContext
                        \remove System_start_delimiter_engraver
                }
        }
}


If you want to add new context types, you have to incorporate them into the context hierarchy using the \accepts declaration. In this case, you tell LilyPond that Score contexts may contain SubStaff contexts. Also, it's a good idea to make it from an existing context type instead of writing it from scratch. Finally, you could use the \alias declaration to tell LilyPond that your SubStaff context should be treated like a Staff context. The resulting declarations could look like this:

        \paper {
                raggedright = ##t
                \translator {
                        \ScoreContext
                        \consists Span_bar_engraver
                        \remove System_start_delimiter_engraver
                        \accepts "SubStaff"
                }
                \translator {
                        \StaffContext
                        \name "SubStaff"
                        \alias "Staff"
                        \remove "Clef_engraver"
                }
        }


/Mats


Ralph Little wrote:
Hi,
Further to what I posted earlier, I have tried the following which is my
best attempt at a neat "hanging" second staff for a temporary staff:

-----------8<-----------8<-----------8<-----------8<-----------8<-----------
8<--
\score {
        \notes {
                \context Staff = One { c4 d e f }
                <<
                        {c d e f c d e f}
                        \context SubStaff = Two { c4 d e f c d e f}
                >>
                c d e f
        }
        \paper {
                raggedright = ##t
                \translator {
                        \ScoreContext
                        \consists Span_bar_engraver
                        \remove System_start_delimiter_engraver
                }
                \translator {
                        \type "Engraver_group_engraver"
                        \name "SubStaff"
                        \remove "Clef_engraver"
                }
        }
}
-----------8<-----------8<-----------8<-----------8<-----------8<-----------
8<--

I'm trying to remove the clef from the second stave by creating a new
context that removes the respective engravers.
I get an error though:


Interpreting music...warning: can't find or create `SubStaff' called `Two' lilypond-bin: event-chord-iterator.cc:27: virtual Translator_group* Event_chord_iterator::get_req_translator(): Assertion `report_to ()' failed.

lilypond: error: LilyPond crashed (signal 6).

Have I misunderstood the translator syntax or is there a bug?

Cheers,
Ralph

---------- Our communications with you matter to us. 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/contact_index.asp. and clicking on the print
friendly link. If you are not the intended recipient, please notify the
sender and delete this message. Thank you. ----------




_______________________________________________
Lilypond-user mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/lilypond-user

-- ============================================= Mats Bengtsson Signal Processing Signals, Sensors and Systems Royal Institute of Technology SE-100 44 STOCKHOLM Sweden Phone: (+46) 8 790 8463 Fax: (+46) 8 790 7260 Email: [EMAIL PROTECTED] WWW: http://www.s3.kth.se/~mabe =============================================



_______________________________________________
Lilypond-user mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/lilypond-user

Reply via email to