]> git.donarmstrong.com Git - lilypond.git/blob - init/property.ly
75d8f106697595b561a776ae657372faea32f4fb
[lilypond.git] / init / property.ly
1 % property.ly
2 % list of properties that lily recognises
3 % and some shorthands (ugh)
4
5 %{
6
7 PROPERTIES
8
9 name                    value   effect                  shorthand
10
11 [Voice]
12 ydirection              -1      force stem down         \stemdown
13 ydirection              0       stem direction free     \stemboth
14 ydirection              1       force stem up           \stemup
15 pletvisibility          0       show nothing
16 pletvisibility          1       show number
17 pletvisibility          2       show number, and bracket-if-no-beam
18 pletvisibility          4       show number, and bracket
19
20 slurdash                0       normal slurs
21 slurdash                1       dotted slurs
22 slurdash                >1      dashed slurs
23
24 slurydirection          -1      force stem down         \slurdown
25 slurydirection          0       stem direction free     \slurboth
26 slurydirection          1       force stem up           \slurup
27
28 slurydirection          -1      force stem down         \slurdown
29 slurydirection          0       stem direction free     \slurboth
30 slurydirection          1       force stem up           \slurup
31
32 [Score?]
33 beamslopedamping        0       no damping              \beamslopeproportional  
34 beamslopedamping        1       damping1)               \beamslopedamped
35 beamslopedamping        100000  zero slope              \beamslopezero
36
37 [Score?]
38 beamquantisation        0       no quantisations        \beamposfree
39 beamquantisation        1       quantise pos and slope  \beamposnormal
40 beamquantisation        2       quantise avoide wedge2) \beampostraditional
41
42 [Staff]
43 specialaccidentals      0       Accidental for all octaves      \normalkey
44 specialaccidentals      1       Accidental only for specified octave    \specialkey
45
46
47 [Staff?]
48 instrument              ascii   midi instrument table lookup
49
50
51 1) after beam slope damping table suggested in [Wanske]
52 2) [Wanske] as well as [Ross] suggests that beams sloped upward must not 
53    start sitting on a staffline, and beams sloped downward must not hang 
54    from a staffline (similar for beam-ends).  This would create a wedge
55    that is traditionally being avoided because it could easily be filled-up 
56    with ink.
57    However, avoiding these wedges restricts the freedom of beams quite a lot 
58    while they don't seem to be a problem in modern printing.
59    In no piece of sheetmusic engraved after 1953 (Baerenreiter) i've seen 
60    these wedges being avoided.
61
62 %}
63
64 %hmm, (these) abbrevs suck, imo
65 % i guess they're meant as some form of doco
66 % that's what i use them for...
67 % should compile a list with recognised properties!
68 stemup = {
69         \skip 1*0;
70         % Stupid hack to make < { \stemup } > work
71         \property Voice.ydirection = \up 
72         }
73 stemboth= {
74         \skip 1*0;
75         \property Voice.ydirection = \center
76 }
77 stemdown = {    
78         \skip 1*0;
79         \property Voice.ydirection = \down
80 }
81 slurup = {
82         \skip 1*0;
83         \property Voice.slurydirection = \up 
84         }
85 slurboth= {
86         \skip 1*0;
87         \property Voice.slurydirection = \center
88 }
89 slurdown = {    
90         \skip 1*0;
91         \property Voice.slurydirection = \down
92 }
93
94 shifton =       \property Voice.hshift = 1
95 shiftoff =      \property Voice.hshift = 0
96
97 onevoice = {    
98         \stemboth \shiftoff     
99 }
100
101 voiceone = {    
102         \type Voice = one 
103         \skip 1*0;
104         \stemup
105 }
106
107 voicetwo = {    
108         \type Voice = two
109         \skip 1*0;
110         \stemdown
111 }
112
113 voicethree = {  
114         \type Voice = three
115         \skip 1*0;
116         \stemup
117
118 }
119
120 voicefour = {   
121         \type Voice = four
122         \skip 1*0;
123         \stemdown
124         \shifton
125 }
126
127 onestaff = {    
128         \translator Staff=one
129         \skip 1*0;
130 }
131
132 staffone = {    
133         \translator Staff=one
134         \skip 1*0;
135         \property Staff.ydirection = \center
136         \property Staff.hshift = 0
137 }
138
139 stafftwo = {    
140         \translator Staff=two
141         \skip 1*0;
142         \property Staff.ydirection = \center
143         \property Staff.hshift = 0
144 }
145
146 staffthree = {  
147         \translator Staff=three
148         \skip 1*0;
149         \property Staff.ydirection = \center
150         \property Staff.hshift = 0
151 }
152
153 stafffour = {   
154         \translator Staff=four
155         \skip 1*0;
156         \property Staff.ydirection = \center
157         \property Staff.hshift = 0
158 }
159
160 % ugh, cluttering global namespace...
161 none=0
162 free=0
163 normal=1
164 traditional=2
165 infinity=10000
166
167 beamslopeproportional = {
168         \property Score.beamslopedamping = \none
169 }
170
171 beamslopedamped = {
172         \property Score.beamslopedamping = \normal
173 }
174
175 beamslopezero = {
176         \property Score.beamslopedamping = \infinity
177 }
178
179 % this sucks, you'd want to pass an array, at least
180 % (or embedded code: you still can't dictate the slope / stemlength)
181 beamposfree = {
182         \property Score.beamquantisation = \none
183 }
184
185 beamposnormal = {
186         \property Score.beamquantisation = \normal
187 }
188
189 beampostraditional = {
190         \property Score.beamquantisation = \traditional
191 }
192
193 slurnormal = {
194         \property Voice.slurdash = 0
195 }
196
197 slurdotted = {
198         \property Voice.slurdash = 1
199 }
200
201 %{
202  for grace note hack, see input/test/grace.ly
203 %}
204 pletoff = {
205         \property Voice.pletvisibility = 0
206 }
207 pleton = {
208         \property Voice.pletvisibility = 2
209 }
210 tiny  = {
211         \property Voice.fontsize= "-2"
212         \pletoff %urg
213 }
214
215 small  = {
216         \property Voice.fontsize= "-1"
217 }
218
219 normalsize = {
220         \property Voice.fontsize= "0"
221         \pleton %urg
222 }
223
224 %{
225   [urg: try at] temporary grace note hack
226   the total visible duration of the grace notes must be half
227   the duration of the 'at' note: e.g.:
228
229   \grace b8 \graceat c4 \ecarg
230   \grace c16 b16 \graceat c4 \ecarg
231
232 grace = {
233         \tiny
234 % it would be so cool not to have to specify these factors each time...
235 % :-(
236         \property Voice.pletvisibility = 0
237         \[1/16
238 }
239
240 graceat = \melodic {
241         \normalsize
242         \property Voice.pletvisibility = 0
243         \] \[31/32
244 }
245
246 ecarg =  \melodic {
247         \property Voice.pletvisibility = 0
248         \]
249         \property Voice.pletvisibility = 2
250 }
251 %}
252
253 normalkey = {
254         \property Staff.specialaccidentals = 0
255 }
256
257 specialkey = {
258         \property Staff.specialaccidentals = 1
259 }
260