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