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