]> git.donarmstrong.com Git - lilypond.git/blob - ly/property-init.ly
(setcolor): implement (re)setcolor with <g>
[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 = {
42   \override Tie #'dash-period = #0.75
43   \override Tie #'dash-fraction = #0.1
44 }
45 tieSolid = {
46   \revert Tie #'dash-period
47   \revert Tie #'dash-fraction
48 }
49
50 setEasyHeads = \sequential {
51   \override NoteHead #'print-function = #Note_head::brew_ez_stencil
52   \override NoteHead #'font-size = #-7
53   \override NoteHead #'font-family = #'sans
54   \override NoteHead #'font-series = #'bold
55 }
56
57 aikenHeads = \set shapeNoteStyles = ##(do re mi fa #f la ti)
58
59 sacredHarpHeads =
60   \set shapeNoteStyles = ##(#f #f mi #f fa la #f)
61
62 dynamicUp = {
63   \override DynamicText  #'direction = #1
64   \override DynamicLineSpanner  #'direction = #1
65 }
66
67 dynamicDown = {
68   \override DynamicText  #'direction = #-1
69   \override DynamicLineSpanner  #'direction = #-1
70 }
71
72 dynamicNeutral = {
73   \revert DynamicText #'direction
74   \revert DynamicLineSpanner #'direction
75 }
76
77
78 dotsUp = \override Dots  #'direction = #1
79 dotsDown = \override Dots  #'direction = #-1
80 dotsNeutral = \revert Dots #'direction 
81
82 tupletUp = \override TupletBracket  #'direction = #1
83 tupletDown = \override TupletBracket  #'direction = #-1
84 tupletNeutral = \revert TupletBracket #'direction
85
86 cadenzaOn = \set Timing.timing = ##f
87 cadenzaOff = {
88   \set Timing.timing = ##t
89   \set Timing.measurePosition = #(ly:make-moment 0 1)
90 }
91
92 % dynamic ly:dir?  text script, articulation script ly:dir?     
93 oneVoice = #(context-spec-music (make-voice-props-revert) 'Voice)
94 voiceOne = #(context-spec-music (make-voice-props-set 0) 'Voice)
95 voiceTwo = #(context-spec-music (make-voice-props-set 1) 'Voice)
96 voiceThree =#(context-spec-music (make-voice-props-set 2) 'Voice)
97 voiceFour = #(context-spec-music (make-voice-props-set 3) 'Voice)
98
99         
100 tiny = 
101 \set fontSize = #-2
102
103 small = 
104 \set fontSize = #-1
105
106 normalsize = {
107   \set fontSize = #0
108 }
109
110
111 %% End the incipit and print a ``normal line start''.
112 endincipit =  \context Staff {
113   \partial 16 s16  % Hack to handle e.g. \bar ".|" \endincipit
114   \once \override Staff.Clef  #'full-size-change = ##t
115   \once \override Staff.Clef  #'non-default = ##t
116   \bar ""
117 }
118
119 autoBeamOff = \set autoBeaming = ##f
120 autoBeamOn = \set autoBeaming = ##t
121
122 fatText = \override TextScript  #'no-spacing-rods = ##f
123 emptyText = \override TextScript  #'no-spacing-rods = ##t
124
125 showStaffSwitch = \set followVoice = ##t
126 hideStaffSwitch = \set followVoice = ##f
127
128
129
130 % For drawing vertical chord brackets with \arpeggio
131 % This is a shorthand for the value of the print-function property 
132 % of either Staff.Arpeggio or PianoStaff.Arpeggio, depending whether 
133 % cross-staff brackets are desired. 
134
135 arpeggio = #(make-music 'ArpeggioEvent)
136
137 arpeggioUp = \sequential {
138   \revert Arpeggio  #'print-function
139   \override Arpeggio  #'arpeggio-direction = #1
140 }
141 arpeggioDown = \sequential {
142   \revert Arpeggio  #'print-function
143   \override Arpeggio  #'arpeggio-direction = #-1
144 }
145 arpeggioNeutral = \sequential {
146   \revert Arpeggio  #'print-function
147   \revert Arpeggio  #'arpeggio-direction
148 }
149 arpeggioBracket = \sequential {
150   \override Arpeggio #'print-function = #Arpeggio::brew_chord_bracket
151 }
152
153 glissando = #(make-music 'GlissandoEvent)
154
155 fermataMarkup = \markup { \musicglyph #"scripts.ufermata" } 
156
157 hideNotes =\sequential {
158   % hide notes, accidentals, etc.
159   \override Dots  #'transparent = ##t
160   \override NoteHead  #'transparent = ##t
161   \override NoteHead  #'no-ledgers = ##t
162   \override Stem  #'transparent = ##t
163   \override Beam  #'transparent = ##t
164   \override Accidental  #'transparent = ##t
165 }
166
167
168 unHideNotes = \sequential {
169   \revert Accidental #'transparent
170   \revert Beam #'transparent
171   \revert Stem #'transparent
172   \revert NoteHead #'transparent
173   \revert NoteHead #'no-ledgers
174   \revert Dots #'transparent 
175 }
176
177 germanChords = {
178     \set chordRootNamer = #(chord-name->german-markup #t)
179     \set chordNoteNamer = #note-name->german-markup
180 }
181 semiGermanChords = {
182     \set chordRootNamer = #(chord-name->german-markup #f)
183     \set chordNoteNamer = #note-name->german-markup
184 }
185
186 frenchChords = {
187     \set chordRootNamer = #(chord-name->italian-markup #t)
188     \set chordPrefixSpacer = #0.4
189 }
190
191 italianChords = {
192     \set chordRootNamer = #(chord-name->italian-markup #f)
193     \set chordPrefixSpacer = #0.4
194 }
195
196 improvisationOn =  {
197     \set squashedPosition = #0
198     \override NoteHead  #'style = #'slash
199 }
200
201 improvisationOff =  {
202     \unset squashedPosition 
203     \revert NoteHead #'style
204 }
205
206 textSpannerUp = \override TextSpanner #'direction = #1
207 textSpannerDown = \override TextSpanner #'direction = #-1
208 textSpannerNeutral = \revert TextSpanner #'direction
209