lilypond-user
[Top][All Lists]
Advanced

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

contribute some context defs


From: 胡Hu Haipeng
Subject: contribute some context defs
Date: Wed, 5 Nov 2008 06:50:22 +0800 (CST)

Hello,
  During some months' work, and getting your kind help, I have made up many defs in a large file which  I always include. It contains many defs grm mailinglist and LSR. Now, I'd like to share some context defs with you. I don't know whether they are correct, but I hope these will be of use, and ease your further work. It is better to even make them as patches and come with the next version (of course, the duplicated code must be reduced):
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Layout to produce piano dynamics context
\layout {
  \context {
    \type "Engraver_group"
    \name Dynamics
    \alias Voice
    \consists "Output_property_engraver"
    \override VerticalAxisGroup #'minimum-Y-extent = #'(-1 . 1)
    \override DynamicLineSpanner #'Y-offset = #0
    pedalSustainStrings = #'("Ped." "*Ped." "*")
    pedalUnaCordaStrings = #'("una corda" "" "tre corde")
    \consists "Piano_pedal_engraver"
    \consists "Script_engraver"
    \consists "New_dynamic_engraver"
    \consists "Dynamic_align_engraver"
    \consists "Text_engraver"
    \override TextScript #'font-size = #2
    \override TextScript #'font-shape = #'italic
    \consists "Skip_event_swallow_translator"
    \consists "Axis_group_engraver"
  }
  \context {
    \PianoStaff
    \accepts "Dynamics"
    \override Glissando #'breakable = ##t
    \override TextSpanner #'breakable = ##t
    \override DynamicSpanner #'breakable = ##t
  }
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% layout to create orchestra staff group
%% with non-spanned barlines amoung sub instrument groups (InnerStaffGroup)
\layout {
  \context {
    \StaffGroup
    \name Orchestra
    \remove "Span_bar_engraver"
    }
    \context {
      \Score
      \accepts Orchestra
    }
  }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Layout to produce ChordMarks context
%% for doing harmony exercises using different harmony indications
%% Chord marks are entered as text markups,
%% and you must turn text length on
\layout {
  \context {
    \type "Engraver_group"
    \name ChordMarks
    \alias Voice
    \consists "Output_property_engraver"
    \override VerticalAxisGroup #'minimum-Y-extent = #'(-1 . 1)
    \consists "Script_engraver"
    \consists "Text_engraver"
    \override TextScript #'font-size = #2
    \consists "Skip_event_swallow_translator"
    \consists "Axis_group_engraver"
  }
  \context {
    \Orchestra
    \accepts ChordMarks
  }
  \context {
    \StaffGroup
    \accepts ChordMarks
  }
  \context {
    \PianoStaff
    \accepts "ChordMarks"
  }
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Layout to produce MarkLine context
%% to place rehearsal marks and texts above full score
\layout {
  \context {
    \type "Engraver_group"
    \name "MarkLine"
    \consists "Output_property_engraver"
    \consists "Axis_group_engraver"
    \consists "Mark_engraver"
    \consists "Metronome_mark_engraver"
    \consists "Script_engraver"
    \consists "Text_engraver"
    \consists "Text_spanner_engraver"
    \consists "Font_size_engraver"
    \override VerticalAxisGroup #'minimum-Y-extent = #'(-2 . 2 )
  }
  \context {
    \Orchestra
    \accepts "MarkLine"
  }
  \context {
    \StaffGroup
    \accepts "MarkLine"
  }
  \context {
    \InnerStaffGroup
    \accepts "MarkLine"
  }
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% layout to produce a markline occupying fewer vertical space.
%% usage: put before 1st violin part
\layout {
  \context {
    \MarkLine
    \name "SmallMarkLine"
    \override MetronomeMark #'outside-staff-priority = #800
    \override RehearsalMark #'outside-staff-priority = #1200
  }
  \context {
    \Orchestra
    \accepts SmallMarkLine
  }
  \context {
    \StaffGroup
    \accepts SmallMarkLine
  }
  \context {
    \InnerStaffGroup
    \accepts SmallMarkLine
  }
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Layout to produce SquareStaff context
%% to group similar instruments in a staff group with thin square bracket
\layout {
  \context {
    \InnerStaffGroup
    \name SquareStaff
    systemStartDelimiter = #'SystemStartSquare
  }
  \context {
    \Orchestra
    \accepts SquareStaff
  }
  \context {
    \StaffGroup
    \accepts SquareStaff
  }
  \context {
    \InnerStaffGroup
    \accepts SquareStaff
  }
}
Sincerely
Haipeng
 
 
 
 



[广告] 金秋最关注楼盘-房不胜房
reply via email to

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