]> git.donarmstrong.com Git - lilypond.git/blob - ly/property-init.ly
2002-07-29 Rune Zedeler <rune@zedeler.dk>
[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 % FIXME: Move this docu (to where?)
129
130 % accidentals as they were common in the 18th century.
131 defaultAccidentals = {
132   \property Current.extraNatural = ##t
133   \property Current.autoAccidentals = #'(Staff (same-octave . 0))
134   \property Current.autoCautionaries = #'()
135 }
136
137 % accidentals in voices instead of staves.
138 % Notice that accidentals from one voice do NOT get cancelled in other voices
139 voiceAccidentals = {
140   \property Current.extraNatural = ##t
141   \property Current.autoAccidentals = #'(Voice (same-octave . 0))
142   \property Current.autoCautionaries = #'()
143   
144 }
145
146 % accidentals as suggested by Kurt Stone, Music Notation in the 20th century.
147 % This includes all the default accidentals, but accidentals also needs cancelling
148 % in other octaves and in the next measure.
149 modernAccidentals = {
150   \property Current.extraNatural = ##f
151   \property Current.autoAccidentals = #'(Staff (same-octave . 0) (any-octave . 0) (same-octave . 1))
152   \property Current.autoCautionaries = #'()  
153 }
154
155 % the accidentals that Stone adds to the old standard as cautionaries
156 modernCautionaries = {
157   \property Current.extraNatural = ##f
158   \property Current.autoAccidentals = #'(Staff (same-octave . 0))
159   \property Current.autoCautionaries = #'(Staff (any-octave . 0) (same-octave . 1))  
160 }
161
162 % Multivoice accidentals to be read both by musicians playing one voice
163 % and musicians playing all voices.
164 % Accidentals are typeset for each voice, but they ARE cancelled across voices.
165 modernVoiceAccidentals = {
166   \property Current.extraNatural = ##f
167   \property Current.autoAccidentals = #'(
168     Voice (same-octave . 0) (any-octave . 0) (same-octave . 1)
169     Staff (same-octave . 0) (any-octave . 0) (same-octave . 1)
170   )
171   \property Current.autoCautionaries = #'()  
172 }
173
174 % same as modernVoiceAccidental eccept that all special accidentals are typeset
175 % as cautionaries
176 modernVoiceCautionaries = {
177   \property Current.extraNatural = ##f
178   \property Current.autoAccidentals = #'(
179     Voice (same-octave . 0) 
180   )
181   \property Current.autoCautionaries = #'(
182     Voice (any-octave . 0) (same-octave . 1)
183     Staff (same-octave . 0) (any-octave . 0) (same-octave . 1)
184   )  
185 }
186
187 % stone's suggestions for accidentals on grand staff.
188 % Accidentals are cancelled across the staves in the same grand staff as well
189 pianoAccidentals = {
190   \property Current.autoAccidentals = #'(
191     Staff (same-octave . 0) (any-octave . 0) (same-octave . 1)
192     GrandStaff (any-octave . 0) (same-octave . 1)
193   )
194   \property Current.autoCautionaries = #'()  
195 }
196
197 pianoCautionaries = {
198   \property Current.autoAccidentals = #'(
199     Staff (same-octave . 0)
200   )
201   \property Current.autoCautionaries = #'(
202     Staff (any-octave . 0) (same-octave . 1)
203     GrandStaff (any-octave . 0) (same-octave . 1)
204   )  
205 }
206
207
208 % Do not reset the key at the start of a measure.  Accidentals will be
209 % printed only once and are in effect until overridden, possibly many
210 % measures later.
211 noResetKey = {
212   \property Current.autoAccidentals = #'(Staff (same-octave . #t))
213   \property Current.autoCautionaries = #'()
214 }
215
216 % do not set localKeySignature when a note alterated differently from
217 % localKeySignature is found.
218 % Causes accidentals to be printed at every note instead of
219 % remembered for the duration of a measure.
220 % accidentals not being remembered, causing accidentals always to be typeset relative to the time signature
221 forgetAccidentals = {
222   \property Current.autoAccidentals = #'(Staff (same-octave . -1))
223   \property Current.autoCautionaries = #'()  
224 }
225
226
227 % To remove a Volta bracket or some other graphical object,
228 % set it to turnOff. Example: \property Staff.VoltaBracket = \turnOff
229
230 turnOff = #'()
231
232 % For drawing vertical chord brackets with \arpeggio
233 % This is a shorthand for the value of the molecule-callback property 
234 % of either Staff.Arpeggio or PianoStaff.Arpeggio, depending whether 
235 % cross-staff brackets are desired. 
236
237 arpeggioBracket = #(lambda (grob) (Arpeggio::brew_chord_bracket grob))