]> git.donarmstrong.com Git - lilypond.git/blob - ly/property-init.ly
* scm/chord-generic-names.scm: move from
[lilypond.git] / ly / property-init.ly
1 % property-init.ly
2
3 \version "1.7.18"
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 cadenzaOn = \property Timing.timing = ##f
68 cadenzaOff = {
69   \property Timing.timing = ##t
70   \property Timing.measurePosition = #(ly:make-moment 0 1)
71 }
72
73 newpage = \notes
74 {
75   \break
76   % urg, only works for TeX output
77   \context Score \outputproperty #(make-type-checker 'paper-column-interface)
78     #'between-system-string = #"\\newpage"
79 }
80
81 % dynamic ly:dir?  text script, articulation script ly:dir?     
82 oneVoice = #(context-spec-music (make-voice-props-revert) "Voice")
83 voiceOne = #(context-spec-music (make-voice-props-set 0) "Voice")
84 voiceTwo = #(context-spec-music (make-voice-props-set 1) "Voice")
85 voiceThree =#(context-spec-music (make-voice-props-set 2) "Voice")
86 voiceFour = #(context-spec-music (make-voice-props-set 3) "Voice")
87
88 % There's also dash, but setting dash period/length should be fixed.
89 slurDotted = \property Voice.Slur \set #'dashed = #1
90 slurSolid = \property Voice.Slur \revert #'dashed
91 tieDotted = \property Voice.Tie \set #'dashed = #1
92 tieSolid = \property Voice.Tie \revert #'dashed
93
94         
95 tiny  = 
96         \property Voice.fontSize= #-2
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 fatText = \property Voice.TextScript \set #'no-spacing-rods = ##f
126 emptyText = \property Voice.TextScript \set #'no-spacing-rods  = ##t
127
128 showStaffSwitch = \property Voice.followVoice = ##t
129 hideStaffSwitch = \property Voice.followVoice = ##f
130
131 % accidentals as they were common in the 18th century.
132 defaultAccidentals = {
133   \property Current.extraNatural = ##t
134   \property Current.autoAccidentals = #'(Staff (same-octave . 0))
135   \property Current.autoCautionaries = #'()
136 }
137
138 % accidentals in voices instead of staves.
139 % Notice that accidentals from one voice do NOT get cancelled in other voices
140 voiceAccidentals = {
141   \property Current.extraNatural = ##t
142   \property Current.autoAccidentals = #'(Voice (same-octave . 0))
143   \property Current.autoCautionaries = #'()
144   
145 }
146
147 % accidentals as suggested by Kurt Stone, Music Notation in the 20th century.
148 % This includes all the default accidentals, but accidentals also needs cancelling
149 % in other octaves and in the next measure.
150 modernAccidentals = {
151   \property Current.extraNatural = ##f
152   \property Current.autoAccidentals = #'(Staff (same-octave . 0) (any-octave . 0) (same-octave . 1))
153   \property Current.autoCautionaries = #'()  
154 }
155
156 % the accidentals that Stone adds to the old standard as cautionaries
157 modernCautionaries = {
158   \property Current.extraNatural = ##f
159   \property Current.autoAccidentals = #'(Staff (same-octave . 0))
160   \property Current.autoCautionaries = #'(Staff (any-octave . 0) (same-octave . 1))  
161 }
162
163 % Multivoice accidentals to be read both by musicians playing one voice
164 % and musicians playing all voices.
165 % Accidentals are typeset for each voice, but they ARE cancelled across voices.
166 modernVoiceAccidentals = {
167   \property Current.extraNatural = ##f
168   \property Current.autoAccidentals = #'(
169     Voice (same-octave . 0) (any-octave . 0) (same-octave . 1)
170     Staff (same-octave . 0) (any-octave . 0) (same-octave . 1)
171   )
172   \property Current.autoCautionaries = #'()  
173 }
174
175 % same as modernVoiceAccidental eccept that all special accidentals are typeset
176 % as cautionaries
177 modernVoiceCautionaries = {
178   \property Current.extraNatural = ##f
179   \property Current.autoAccidentals = #'(
180     Voice (same-octave . 0) 
181   )
182   \property Current.autoCautionaries = #'(
183     Voice (any-octave . 0) (same-octave . 1)
184     Staff (same-octave . 0) (any-octave . 0) (same-octave . 1)
185   )  
186 }
187
188 % stone's suggestions for accidentals on grand staff.
189 % Accidentals are cancelled across the staves in the same grand staff as well
190 pianoAccidentals = {
191   \property Current.autoAccidentals = #'(
192     Staff (same-octave . 0) (any-octave . 0) (same-octave . 1)
193     GrandStaff (any-octave . 0) (same-octave . 1)
194   )
195   \property Current.autoCautionaries = #'()  
196 }
197
198 pianoCautionaries = {
199   \property Current.autoAccidentals = #'(
200     Staff (same-octave . 0)
201   )
202   \property Current.autoCautionaries = #'(
203     Staff (any-octave . 0) (same-octave . 1)
204     GrandStaff (any-octave . 0) (same-octave . 1)
205   )  
206 }
207
208
209 % Do not reset the key at the start of a measure.  Accidentals will be
210 % printed only once and are in effect until overridden, possibly many
211 % measures later.
212 noResetKey = {
213   \property Current.autoAccidentals = #'(Staff (same-octave . #t))
214   \property Current.autoCautionaries = #'()
215 }
216
217 % do not set localKeySignature when a note alterated differently from
218 % localKeySignature is found.
219 % Causes accidentals to be printed at every note instead of
220 % remembered for the duration of a measure.
221 % accidentals not being remembered, causing accidentals always to be typeset relative to the time signature
222 forgetAccidentals = {
223   \property Current.autoAccidentals = #'(Staff (same-octave . -1))
224   \property Current.autoCautionaries = #'()  
225 }
226
227
228 % To remove a Volta bracket or some other graphical object,
229 % set it to turnOff. Example: \property Staff.VoltaBracket = \turnOff
230
231 %%
232 %% DO NOT USE THIS. IT CAN LEAD TO CRASHES.
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)
243
244 fermataMarkup = \markup { \musicglyph #"scripts-ufermata" } 
245
246 setMmRestFermata =
247   \once \property Voice.MultiMeasureRestNumber \override #'text =
248     #fermataMarkup 
249
250
251 hideNotes =\sequential {
252                                 % hide notes, accidentals, etc.
253     \property Voice.Dots \override #'transparent = ##t
254     \property Voice.NoteHead \override #'transparent = ##t
255     \property Voice.Stem \override #'transparent = ##t
256     \property Voice.Beam \override #'transparent = ##t
257     \property Staff.Accidental \override #'transparent = ##t
258 }
259
260
261 unHideNotes =  \sequential {
262   \property Staff.Accidental \revert #'transparent
263   \property Voice.Beam \revert #'transparent
264   \property Voice.Stem \revert #'transparent
265   \property Voice.NoteHead \revert #'transparent
266   \property Voice.Dots \revert #'transparent 
267 }
268
269 germanChords = {
270     \property ChordNames. chordRootNamer = #(chord-name->german-markup #t)
271     \property ChordNames. chordNoteNamer = #note-name->german-markup
272 }
273 semiGermanChords = {
274     \property ChordNames. chordRootNamer = #(chord-name->german-markup #f)
275     \property ChordNames. chordNoteNamer = #note-name->german-markup
276 }