lilypond-user
[Top][All Lists]
Advanced

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

shortcut for creating new Staff "subclass" context?


From: Kieren MacMillan
Subject: shortcut for creating new Staff "subclass" context?
Date: Tue, 8 Sep 2009 15:25:20 -0400

Hi all,

Let's say I want to create a new subclass of the Staff context called "MyStaff", and the only thing it does is override the InstrumentName settings. Do I really have to include all the \consists from engraver- init.ly? i.e., do I really have to use

  \context {
    \type "Engraver_group"
    \name "MyStaff"
    \consists "Output_property_engraver"      
    \consists "Bar_engraver"
    \consists "Font_size_engraver"
    \consists "Separating_line_group_engraver"        
    \consists "Dot_column_engraver"
    \consists "Staff_collecting_engraver"
    \consists "Ottava_spanner_engraver"
    \consists "Clef_engraver"
    \consists "Key_engraver"
    \consists "Time_signature_engraver"
    \consists "Ledger_line_engraver"
    \consists "Staff_symbol_engraver"
    \consists "Collision_engraver"
    \consists "Grob_pq_engraver"
    \consists "Rest_collision_engraver"
    \consists "Accidental_engraver"
    \consists "Piano_pedal_engraver"
    \consists "Piano_pedal_align_engraver"
    \consists "Instrument_name_engraver"
    \consists "String_number_engraver"
    \consists "Axis_group_engraver"
    \consists "Figured_bass_engraver"
    \consists "Figured_bass_position_engraver"
    \consists "Script_row_engraver"
    instrumentName = #"MyStaff"
    shortInstrumentName = #"My"
    \defaultchild "Voice"
    \accepts "Voice"
    \accepts "CueVoice"
  }

It would be so much easier to be able to force "inheritance" of everything, e.g.

  \context {
    \name "MyStaff"
    \from "Staff"
    instrumentName = #"MyStaff"
    shortInstrumentName = #"My"
  }

Is there anything like this? (From what I've read and experienced, \alias does *NOT* do this.) If not, what would be involved in programming this feature? It would certainly remove a *huge* obstacle from the intermediate Lilyponder's learning curve...

Thanks,
Kieren.




reply via email to

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