]> git.donarmstrong.com Git - lilypond.git/blob - ly/property-init.ly
d3a8767fca4f9317587e90f2b6f1c3d03fb7e810
[lilypond.git] / ly / property-init.ly
1 % property-init.ly
2
3 \version "1.5.68"
4
5 stemUp = \property Voice.Stem \set #'direction = #1
6 stemDown = \property Voice.Stem \set #'direction = #-1 
7 stemBoth= \property Voice.Stem \revert #'direction
8
9 slurUp   = \property Voice.Slur \set #'direction = #1
10 slurDown = \property Voice.Slur \set #'direction = #-1
11 slurBoth = \property Voice.Slur \revert #'direction 
12
13 phrasingSlurUp   = \property Voice.PhrasingSlur \set #'direction = #1
14 phrasingSlurDown = \property Voice.PhrasingSlur \set #'direction = #-1
15 phrasingSlurBoth = \property Voice.PhrasingSlur \revert #'direction 
16
17 shiftOn  = \property Voice.NoteColumn \set #'horizontal-shift = #1
18 shiftOnn  = \property Voice.NoteColumn \set #'horizontal-shift = #2
19 shiftOnnn  = \property Voice.NoteColumn \set #'horizontal-shift = #3
20 shiftOff  = \property Voice.NoteColumn \revert #'horizontal-shift 
21
22 tieUp = \property Voice.Tie \set #'direction = #1
23 tieDown = \property Voice.Tie \set #'direction = #-1
24 tieBoth = \property Voice.Tie \revert #'direction 
25
26 dynamicUp  = {
27   \property Voice.DynamicText \set #'direction = #1
28   \property Voice.DynamicLineSpanner \set #'direction = #1
29 }
30 dynamicDown = {
31   \property Voice.DynamicText \set #'direction = #-1
32   \property Voice.DynamicLineSpanner \set #'direction = #-1
33 }
34 dynamicBoth = {
35   \property Voice.DynamicText \revert #'direction
36   \property Voice.DynamicLineSpanner \revert #'direction
37 }
38
39 scriptUp  = {
40   \property Voice.TextScript \set #'direction = #1
41   \property Voice.Script \set #'direction = #1
42 }
43 scriptDown = {
44   \property Voice.TextScript \set #'direction = #-1
45   \property Voice.Script \set #'direction = #-1
46 }
47 scriptBoth = {
48   \property Voice.TextScript \revert #'direction
49   \property Voice.Script \revert #'direction
50 }
51
52 dotsUp = \property Voice.Dots \set #'direction = #1
53 dotsDown = \property Voice.Dots \set #'direction = #-1
54 dotsBoth = \property Voice.Dots \revert #'direction 
55
56 % why doubly?
57 tupletUp  = {
58   \property Voice.TupletBracket \set #'direction = #1
59 }
60 tupletDown = {
61   \property Voice.TupletBracket \set #'direction = #-1
62 }
63 tupletBoth = {
64   \property Voice.TupletBracket \revert #'direction
65 }
66
67
68
69 cadenzaOn = \property Timing.timing = ##f
70 cadenzaOff = {
71   \property Timing.timing = ##t
72   \property Timing.measurePosition = #(make-moment 0 1)
73 }
74
75 newpage = \notes
76 {
77   \break
78   % urg, only works for TeX output
79   \context Score \outputproperty #(make-type-checker 'paper-column-interface)
80     #'between-system-string = #"\\newpage"
81 }
82
83 % dynamic dir?  text script, articulation script dir?   
84 oneVoice = #(context-spec-music (make-voice-props-revert) "Voice")
85 voiceOne = #(context-spec-music (make-voice-props-set 0) "Voice")
86 voiceTwo = #(context-spec-music (make-voice-props-set 1) "Voice")
87 voiceThree =#(context-spec-music (make-voice-props-set 2) "Voice")
88 voiceFour = #(context-spec-music (make-voice-props-set 3) "Voice")
89
90 % There's also dash, but setting dash period/length should be fixed.
91 slurDotted = \property Voice.Slur \set #'dashed = #1
92 slurSolid = \property Voice.Slur \revert #'dashed
93 tieDotted = \property Voice.Tie \set #'dashed = #1
94 tieSolid = \property Voice.Tie \revert #'dashed
95
96         
97 tiny  = 
98         \property Voice.fontSize= #-2
99
100 small  = 
101         \property Voice.fontSize= #-1
102
103
104 normalsize = {
105         \property Voice.fontSize= #0
106 }
107
108 normalkey = {
109         \property Staff.keyOctaviation = ##f
110 }
111
112 specialkey = {
113         \property Staff.keyOctaviation = ##t
114 }
115
116 % End the incipit and print a ``normal line start''.
117 endincipit = \notes{
118     \partial 16 s16  % Hack to handle e.g. \bar ".|" \endincipit
119     \context Staff \outputproperty #(make-type-checker 'clef-interface) #'full-size-change = ##t
120     \context Staff \outputproperty #(make-type-checker 'clef-interface) #'non-default = ##t
121     \bar ""
122 }
123
124 autoBeamOff = \property Voice.autoBeaming = ##f
125 autoBeamOn = \property Voice.autoBeaming = ##t
126
127 fatText = \property Voice.TextScript \set #'no-spacing-rods = ##f
128 emptyText = \property Voice.TextScript \set #'no-spacing-rods  = ##t
129
130 showStaffSwitch = \property Voice.followVoice = ##t
131 hideStaffSwitch = \property Voice.followVoice = ##f
132
133 % accidentals as they were common in the 18th century.
134 defaultAccidentals = {
135   \property Current.extraNatural = ##t
136   \property Current.autoAccidentals = #'(Staff (same-octave . 0))
137   \property Current.autoCautionaries = #'()
138 }
139
140 % accidentals in voices instead of staves.
141 % Notice that accidentals from one voice do NOT get cancelled in other voices
142 voiceAccidentals = {
143   \property Current.extraNatural = ##t
144   \property Current.autoAccidentals = #'(Voice (same-octave . 0))
145   \property Current.autoCautionaries = #'()
146   
147 }
148
149 % accidentals as suggested by Kurt Stone, Music Notation in the 20th century.
150 % This includes all the default accidentals, but accidentals also needs cancelling
151 % in other octaves and in the next measure.
152 modernAccidentals = {
153   \property Current.extraNatural = ##f
154   \property Current.autoAccidentals = #'(Staff (same-octave . 0) (any-octave . 0) (same-octave . 1))
155   \property Current.autoCautionaries = #'()  
156 }
157
158 % the accidentals that Stone adds to the old standard as cautionaries
159 modernCautionaries = {
160   \property Current.extraNatural = ##f
161   \property Current.autoAccidentals = #'(Staff (same-octave . 0))
162   \property Current.autoCautionaries = #'(Staff (any-octave . 0) (same-octave . 1))  
163 }
164
165 % Multivoice accidentals to be read both by musicians playing one voice
166 % and musicians playing all voices.
167 % Accidentals are typeset for each voice, but they ARE cancelled across voices.
168 modernVoiceAccidentals = {
169   \property Current.extraNatural = ##f
170   \property Current.autoAccidentals = #'(
171     Voice (same-octave . 0) (any-octave . 0) (same-octave . 1)
172     Staff (same-octave . 0) (any-octave . 0) (same-octave . 1)
173   )
174   \property Current.autoCautionaries = #'()  
175 }
176
177 % same as modernVoiceAccidental eccept that all special accidentals are typeset
178 % as cautionaries
179 modernVoiceCautionaries = {
180   \property Current.extraNatural = ##f
181   \property Current.autoAccidentals = #'(
182     Voice (same-octave . 0) 
183   )
184   \property Current.autoCautionaries = #'(
185     Voice (any-octave . 0) (same-octave . 1)
186     Staff (same-octave . 0) (any-octave . 0) (same-octave . 1)
187   )  
188 }
189
190 % stone's suggestions for accidentals on grand staff.
191 % Accidentals are cancelled across the staves in the same grand staff as well
192 pianoAccidentals = {
193   \property Current.autoAccidentals = #'(
194     Staff (same-octave . 0) (any-octave . 0) (same-octave . 1)
195     GrandStaff (any-octave . 0) (same-octave . 1)
196   )
197   \property Current.autoCautionaries = #'()  
198 }
199
200 pianoCautionaries = {
201   \property Current.autoAccidentals = #'(
202     Staff (same-octave . 0)
203   )
204   \property Current.autoCautionaries = #'(
205     Staff (any-octave . 0) (same-octave . 1)
206     GrandStaff (any-octave . 0) (same-octave . 1)
207   )  
208 }
209
210
211 % Do not reset the key at the start of a measure.  Accidentals will be
212 % printed only once and are in effect until overridden, possibly many
213 % measures later.
214 noResetKey = {
215   \property Current.autoAccidentals = #'(Staff (same-octave . #t))
216   \property Current.autoCautionaries = #'()
217 }
218
219 % do not set localKeySignature when a note alterated differently from
220 % localKeySignature is found.
221 % Causes accidentals to be printed at every note instead of
222 % remembered for the duration of a measure.
223 % accidentals not being remembered, causing accidentals always to be typeset relative to the time signature
224 forgetAccidentals = {
225   \property Current.autoAccidentals = #'(Staff (same-octave . -1))
226   \property Current.autoCautionaries = #'()  
227 }
228
229
230 % To remove a Volta bracket or some other graphical object,
231 % set it to turnOff. Example: \property Staff.VoltaBracket = \turnOff
232
233 turnOff = #'()
234
235 % For drawing vertical chord brackets with \arpeggio
236 % This is a shorthand for the value of the molecule-callback property 
237 % of either Staff.Arpeggio or PianoStaff.Arpeggio, depending whether 
238 % cross-staff brackets are desired. 
239
240 arpeggioBracket = #(lambda (grob) (Arpeggio::brew_chord_bracket grob))
241 arpeggio = #(make-music-by-name 'ArpeggioEvent)
242 glissando = #(make-music-by-name 'GlissandoEvent)