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