]> git.donarmstrong.com Git - lilypond.git/blob - ly/property-init.ly
Mathieu Giraud's patch
[lilypond.git] / ly / property-init.ly
1 % property-init.ly
2
3 \version "2.4.0"
4
5 stemUp = \override Stem  #'direction = #1
6 stemDown = \override Stem  #'direction = #-1 
7 stemNeutral= \revert Stem #'direction
8
9 slurUp = \override Slur  #'direction = #1
10 slurDown = \override Slur  #'direction = #-1
11 slurNeutral = \revert Slur #'direction 
12
13 % There's also dash, but setting dash period/length should be fixed.
14 slurDashed = {
15         \override Slur #'dash-period = #0.75
16         \override Slur #'dash-fraction = #0.4
17 }
18 slurDotted = {
19         \override Slur  #'dash-period = #0.75
20         \override Slur #'dash-fraction = #0.1
21 }
22 slurSolid = {
23         \revert Slur #'dash-period
24         \revert Slur #'dash-fraction
25 }
26
27
28 phrasingSlurUp = \override PhrasingSlur  #'direction = #1
29 phrasingSlurDown = \override PhrasingSlur  #'direction = #-1
30 phrasingSlurNeutral = \revert PhrasingSlur #'direction 
31
32 shiftOn = \override NoteColumn  #'horizontal-shift = #1
33 shiftOnn = \override NoteColumn  #'horizontal-shift = #2
34 shiftOnnn = \override NoteColumn  #'horizontal-shift = #3
35 shiftOff = \revert NoteColumn #'horizontal-shift 
36
37 tieUp = \override Tie  #'direction = #1
38 tieDown = \override Tie  #'direction = #-1
39 tieNeutral = \revert Tie #'direction 
40
41 tieDotted = \override Tie  #'dashed = #1
42 tieSolid = \revert Tie #'dashed
43
44 setEasyHeads = \sequential {
45         \override NoteHead #'print-function = #Note_head::brew_ez_stencil
46         \override NoteHead #'Y-extent-callback = #'()
47         \override NoteHead #'X-extent-callback = #'()
48 }
49
50 aikenHeads = \set shapeNoteStyles = ##(do re mi fa #f la ti)
51
52 sacredHarpHeads =
53   \set shapeNoteStyles = ##(#f #f mi #f fa la #f)
54
55 dynamicUp = {
56   \override DynamicText  #'direction = #1
57   \override DynamicLineSpanner  #'direction = #1
58 }
59
60 dynamicDown = {
61   \override DynamicText  #'direction = #-1
62   \override DynamicLineSpanner  #'direction = #-1
63 }
64
65 dynamicNeutral = {
66   \revert DynamicText #'direction
67   \revert DynamicLineSpanner #'direction
68 }
69
70
71 dotsUp = \override Dots  #'direction = #1
72 dotsDown = \override Dots  #'direction = #-1
73 dotsNeutral = \revert Dots #'direction 
74
75 tupletUp = \override TupletBracket  #'direction = #1
76 tupletDown = \override TupletBracket  #'direction = #-1
77 tupletNeutral = \revert TupletBracket #'direction
78
79 cadenzaOn = \set Timing.timing = ##f
80 cadenzaOff = {
81   \set Timing.timing = ##t
82   \set Timing.measurePosition = #(ly:make-moment 0 1)
83 }
84
85 % dynamic ly:dir?  text script, articulation script ly:dir?     
86 oneVoice = #(context-spec-music (make-voice-props-revert) 'Voice)
87 voiceOne = #(context-spec-music (make-voice-props-set 0) 'Voice)
88 voiceTwo = #(context-spec-music (make-voice-props-set 1) 'Voice)
89 voiceThree =#(context-spec-music (make-voice-props-set 2) 'Voice)
90 voiceFour = #(context-spec-music (make-voice-props-set 3) 'Voice)
91
92         
93 tiny = 
94         \set fontSize = #-2
95
96 small = 
97         \set fontSize = #-1
98
99 normalsize = {
100         \set fontSize = #0
101 }
102
103
104 % End the incipit and print a ``normal line start''.
105 endincipit =  \context Staff {
106     \partial 16 s16  % Hack to handle e.g. \bar ".|" \endincipit
107     \once \override Staff.Clef  #'full-size-change = ##t
108     \once \override Staff.Clef  #'non-default = ##t
109     \bar ""
110 }
111
112 autoBeamOff = \set autoBeaming = ##f
113 autoBeamOn = \set autoBeaming = ##t
114
115 fatText = \override TextScript  #'no-spacing-rods = ##f
116 emptyText = \override TextScript  #'no-spacing-rods = ##t
117
118 showStaffSwitch = \set followVoice = ##t
119 hideStaffSwitch = \set followVoice = ##f
120
121
122
123 % For drawing vertical chord brackets with \arpeggio
124 % This is a shorthand for the value of the print-function property 
125 % of either Staff.Arpeggio or PianoStaff.Arpeggio, depending whether 
126 % cross-staff brackets are desired. 
127
128 arpeggio = #(make-music 'ArpeggioEvent)
129
130 arpeggioUp = \sequential {
131   \revert Arpeggio  #'print-function
132   \override Arpeggio  #'arpeggio-direction = #1
133 }
134 arpeggioDown = \sequential {
135   \revert Arpeggio  #'print-function
136   \override Arpeggio  #'arpeggio-direction = #-1
137 }
138 arpeggioNeutral = \sequential {
139   \revert Arpeggio  #'print-function
140   \revert Arpeggio  #'arpeggio-direction
141 }
142 arpeggioBracket = \sequential {
143   \override Arpeggio  #'print-function = #Arpeggio::brew_chord_bracket
144 }
145
146 glissando = #(make-music 'GlissandoEvent)
147
148 fermataMarkup = \markup { \musicglyph #"scripts.ufermata" } 
149
150 hideNotes =\sequential {
151   % hide notes, accidentals, etc.
152   \override Dots  #'transparent = ##t
153   \override NoteHead  #'transparent = ##t
154   \override NoteHead  #'no-ledgers = ##t
155   \override Stem  #'transparent = ##t
156   \override Beam  #'transparent = ##t
157   \override Accidental  #'transparent = ##t
158 }
159
160
161 unHideNotes = \sequential {
162   \revert Accidental #'transparent
163   \revert Beam #'transparent
164   \revert Stem #'transparent
165   \revert NoteHead #'transparent
166   \revert NoteHead #'no-ledgers
167   \revert Dots #'transparent 
168 }
169
170 germanChords = {
171     \set chordRootNamer = #(chord-name->german-markup #t)
172     \set chordNoteNamer = #note-name->german-markup
173 }
174 semiGermanChords = {
175     \set chordRootNamer = #(chord-name->german-markup #f)
176     \set chordNoteNamer = #note-name->german-markup
177 }
178
179 frenchChords = {
180     \set chordRootNamer = #(chord-name->italian-markup #t)
181     \set chordPrefixSpacer = #0.4
182 }
183
184 italianChords = {
185     \set chordRootNamer = #(chord-name->italian-markup #f)
186     \set chordPrefixSpacer = #0.4
187 }
188
189 improvisationOn =  {
190     \set squashedPosition = #0
191     \override NoteHead  #'style = #'slash
192 }
193
194 improvisationOff =  {
195     \unset squashedPosition 
196     \revert NoteHead #'style
197 }