]> Git — Sourcephile - julm/violon-tex.git/blob - violon.sty
Réécriture : organise et passe par une représentation des données sans état.
[julm/violon-tex.git] / violon.sty
1 % Licence
2 % This file is part of Violon, a violin score engine.
3 % Copyright (C) 2009-2013 Julien Moutinho
4 %
5 % This program is free software: you can redistribute it and/or modify
6 % it under the terms of the GNU General Public License as published
7 % by the Free Software Foundation, either version 3 of the License,
8 % or any later version.
9 %
10 % This program is distributed in the hope that it will be useful,
11 % but WITHOUT ANY WARRANTY; without even the implied warranty
12 % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 % See the GNU General Public License for more details.
14 %
15 % You should have received a copy of the GNU General Public License
16 % along with this program. If not, see <http://www.gnu.org/licenses/>.
17 %
18 % Any comment or contribution is welcome
19 % at julm+tex+violon&autogeree.net.
20 % Package
21 \def\fileversion{1.0}%
22 \def\filedate{2013/10/02}%
23 \NeedsTeXFormat{LaTeX2e}%
24 \ProvidesPackage{violon}[\filedate\space\fileversion\space%
25 Violin score library (Julien Moutinho)]%
26 % \usepackage
27 \usepackage{ifthen}%
28 \usepackage{color}%
29 \usepackage{verbatim}%
30 % Utilitaires
31 % math
32 \newcount\modulo@%
33 \def\modulo#1by#2{%
34 \modulo@=#1\relax%
35 \divide\modulo@ by#2\relax%
36 \multiply\modulo@ by-#2\relax%
37 \advance\modulo@ by#1\relax%
38 \the\modulo@%
39 }%
40 \def\romannumeralz#1{%
41 \ifnum#1>\z@\romannumeral#1\else\number#1\fi%
42 }%
43 % \text
44 \begingroup%
45 \catcode`\[ = 1\relax%
46 \catcode`\] = 2\relax%
47 \catcode`\{ = 12\relax%
48 \catcode`\} = 12 \relax%
49 \gdef\textcurlybraceopen[{]%
50 \gdef\textcurlybraceclose[}]%
51 \endgroup%
52 % \par
53 \parindent=0pt\relax%
54 \parskip=0pt\relax%
55 \parfillskip=0pt\relax%
56 % \new
57 \newdimen\dimen@%
58 \newdimen\dimen@@%
59 \newcount\count@@%
60 % \setfontsize
61 \def\ssmall{%
62 \@setfontsize\ssmall\@viiipt\@ixpt%
63 }%
64 \def\sssmall{%
65 \@setfontsize\sssmall{6pt}{6pt}%
66 }%
67 \def\ssssmall{%
68 \@setfontsize\sssmall{5pt}{5pt}%
69 }%
70 % \if
71 \def\isundefined#1{TT\fi\ifx#1\undefined}%
72 % @vln@trace
73 \newif%
74 \if@vln@trace@%
75 \@vln@trace@false%
76 \def\@vln@trace#1#2{%
77 \if@vln@trace@%
78 \message{TRACE: #1: #2^^J}%
79 \fi%
80 }%
81 % @vln@debug
82 \def\@vln@debug{%
83 \message{^^JDEBUG: @vln@item: \the\@vln@item^^J}%
84 \@for\@type:=\@vln@item@types\do{%
85 \message{DEBUG: @vln@\@type\space= \the\csname @vln@\@type\endcsname^^J}%
86 }%
87 }%
88 % \@vln@staff
89 \newlength\@vln@staff@vdim@skip%
90 \newlength%
91 \@vln@staff@vdim%
92 \@vln@staff@vdim=0pt\relax%
93 \newdimen%
94 \@vln@staff@semitone@vdim%
95 \@vln@staff@semitone@vdim=3pt%
96 \newlength%
97 \@vln@staff@interv@skip%
98 \@vln@staff@interv@skip=\@vln@staff@semitone@vdim\relax%
99 \multiply\@vln@staff@interv@skip by 2\relax%
100 \newlength%
101 \@vln@staff@skip%
102 \@vln@staff@skip=0pt\relax%
103 \def\@vln@staff@hsize@max{\hsize}%
104 \def\@vln@staff@vsize@max{\textheight}%
105 \def\@vln@staff@tone@vskip{%
106 \advance\@vln@staff@vdim by\@vln@staff@semitone@vdim%
107 \nobreak%
108 }%
109 % \definecolor
110 \definecolor{colVlnStaffSemiToneToneEven}{gray}{0.98}%
111 \definecolor{colVlnStaffSemiToneToneOdd}{gray}{1}%
112 \definecolor{colVlnStaffSemiToneToneFifth}{gray}{0.92}%
113 \def\@vln@staff@semitone@line@output rank:#1{%
114 {%
115 \color{colVlnStaffSemiToneTone#1}%
116 \hrule depth 0pt height \@vln@staff@semitone@vdim width \@vln@staff@hsize@max%
117 }%
118 }%
119 \def\@vln@staff@semitone@five@output{%
120 \@vln@staff@semitone@line@output rank:{Odd}%
121 \@vln@staff@tone@vskip%
122 \@vln@staff@semitone@line@output rank:{Even}%
123 \@vln@staff@tone@vskip%
124 \@vln@staff@semitone@line@output rank:{Odd}%
125 \@vln@staff@tone@vskip%
126 \@vln@staff@semitone@line@output rank:{Even}%
127 \@vln@staff@tone@vskip%
128 \@vln@staff@semitone@line@output rank:{Fifth}%
129 \@vln@staff@tone@vskip%
130 }%
131 \def\@vln@staff@semitone@output{%
132 \@vln@staff@semitone@line@output rank:{Fifth}\@vln@staff@tone@vskip%
133 \@vln@staff@semitone@five@output%
134 \@vln@staff@semitone@five@output%
135 \@vln@staff@semitone@five@output%
136 \@vln@staff@semitone@five@output%
137 \@vln@staff@semitone@five@output%
138 }%
139 \newlength%
140 \@vln@staff@note@hskip%
141 \@vln@staff@note@hskip=0pt\relax%
142 \newlength%
143 \@vln@staff@note@vskip%
144 \@vln@staff@note@vskip=0pt\relax%
145 \gdef\@vln@staff@output{%
146 \nobreak\vskip\@vln@staff@vdim@skip%
147 \nobreak\vskip\@vln@staff@vdim%
148 \advance\@vln@staff@skip by\@vln@staff@vdim\relax%
149 \dimen@=\@vln@staff@skip\relax%
150 \advance\dimen@ by\@vln@staff@vdim\relax%
151 \ifnum\dimen@>\@vln@staff@vsize@max%
152 \@vln@staff@skip=0pt\relax%
153 \break%
154 \else%
155 \advance\@vln@staff@skip by\@vln@staff@interv@skip\relax%
156 \nobreak\vskip\@vln@staff@interv@skip%
157 \fi%
158 \@vln@staff@note@hskip=0pt\relax%
159 \@vln@staff@vdim=0pt\relax%
160 \@vln@staff@semitone@output%
161 \advance\@vln@staff@vdim by\@vln@staff@semitone@vdim%
162 \nobreak\vskip-\@vln@staff@vdim%
163 }%
164 \def\@vln@staff@output@automatic{%
165 \dimen@=\@vln@staff@note@hskip%
166 \advance\dimen@ by\@vln@note@hdim\relax%
167 \ifnum\dimen@>\@vln@staff@hsize@max%
168 \@vln@staff@output%
169 \fi%
170 }%
171 % \@vln@cord@pitch
172 \def\@vln@cord@pitch@def#1=#2{%
173 \expandafter\edef\csname @vln@cord@pitch@#1\endcsname{#2}%
174 }%
175 \@vln@cord@pitch@def{0}={0}% G
176 \@vln@cord@pitch@def{1}={7}% D
177 \@vln@cord@pitch@def{2}={14}% A
178 \@vln@cord@pitch@def{3}={21}% E
179 \def\@vln@cord@pitch@#1{%
180 \csname @vln@cord@pitch@#1\endcsname%
181 }%
182 % \@vln@octave@pitch
183 \def\@vln@octave@pitch@def#1=#2{%
184 \expandafter\edef\csname @vln@octave@pitch@#1\endcsname{#2}%
185 }%
186 \@vln@octave@pitch@def{G=}={0}%
187 \@vln@octave@pitch@def{G+}={1}%
188 \@vln@octave@pitch@def{A-}={1}%
189 \@vln@octave@pitch@def{A=}={2}%
190 \@vln@octave@pitch@def{A+}={3}%
191 \@vln@octave@pitch@def{B-}={3}%
192 \@vln@octave@pitch@def{B=}={4}%
193 \@vln@octave@pitch@def{B+}={5}%
194 \@vln@octave@pitch@def{C-}={4}%
195 \@vln@octave@pitch@def{C=}={5}%
196 \@vln@octave@pitch@def{C+}={6}%
197 \@vln@octave@pitch@def{D-}={6}%
198 \@vln@octave@pitch@def{D=}={7}%
199 \@vln@octave@pitch@def{D+}={8}%
200 \@vln@octave@pitch@def{E-}={8}%
201 \@vln@octave@pitch@def{E=}={9}%
202 \@vln@octave@pitch@def{E+}={10}%
203 \@vln@octave@pitch@def{F-}={9}%
204 \@vln@octave@pitch@def{F=}={10}%
205 \@vln@octave@pitch@def{F+}={11}%
206 \@vln@octave@pitch@def{G-}={11}%
207 \def\@vln@octave@pitch@#1{%
208 \csname @vln@octave@pitch@#1\endcsname%
209 }%
210 % \@vln@bar
211 % \@vln@bar@output
212 \definecolor{colVlnBar}{gray}{.85}%
213 \def\@vln@bar@font{%
214 \color{colVlnBar}%
215 }%
216 \def\@vln@bar@output{%
217 \@vln@note@output@{0}%
218 {}%
219 {\vbox to0pt{%
220 \dimen@\@vln@staff@vdim%
221 \advance\dimen@ by -\@vln@note@vdim\relax%
222 \advance\dimen@ by -\@vln@note@vdim\relax%
223 \setbox0=\hbox{{\@vln@bar@font\vrule depth 0pt height \dimen@ width 0.1pt\relax}}%
224 \nobreak\vskip\@vln@note@vdim\relax%
225 \dp0=0pt\relax%
226 \box0}}%
227 {}%
228 }%
229 \def\@vln@bar@def{%
230 \@vln@item@def{bar}%
231 }%
232 % \@vln@cresc
233 % \@vln@cresc@left
234 \def\@vln@cresc@left{}%
235 \def\@vln@cresc@left@def#1{%
236 \expandafter\edef\csname @vln@cresc@left\endcsname{#1}%
237 }%
238 % \@vln@cresc@right
239 \def\@vln@cresc@right{}%
240 \def\@vln@cresc@right@def#1{%
241 \expandafter\edef\csname @vln@cresc@right\endcsname{#1}%
242 }%
243 \def\@vln@cresc@def way:#1{%
244 \@vln@cresc@left@def{\@vln@cresc@right}%
245 \@vln@cresc@right@def{#1}%
246 }%
247 % \@vln@note
248 % \@vln@note@accidental
249 \def\@vln@note@accidental@def#1{%
250 \ifthenelse{\equal{#1}{.}}%
251 {%
252 \count@=\@vln@note%
253 \advance\count@ by -1\relax%
254 \expandafter\edef\csname @vln@note@accidental@\the\@vln@note\endcsname{%
255 \@vln@note@accidental@{\the\count@}%
256 }%
257 }%
258 {%
259 \expandafter\edef\csname @vln@note@accidental@\the\@vln@note\endcsname{#1}%
260 }%
261 \@vln@trace{@vln@note@accidental@def}{@vln@note=\the\@vln@note: @vln@note@accidental=\@vln@note@accidental}%
262 }%
263 \def\@vln@note@accidental@#1{%
264 \csname @vln@note@accidental@#1\endcsname%
265 }%
266 \def\@vln@note@accidental{%
267 \csname @vln@note@accidental@\the\@vln@note\endcsname%
268 }%
269 % \@vln@note@accidental@output
270 \def\@vln@note@accidental@output@def #1=#2{%
271 \expandafter\edef\csname @vln@note@accidental@output@#1\endcsname{#2}%
272 }%
273 \@vln@note@accidental@output@def{-}={\kern-0.7pt$\flat$}%
274 \@vln@note@accidental@output@def{=}={}%
275 \@vln@note@accidental@output@def{+}={\kern-0.7pt$\sharp$}%
276 \def\@vln@note@accidental@output{%
277 \csname @vln@note@accidental@output@\the\@vln@note\endcsname%
278 }%
279 % \@vln@note@bow
280 % \definecolor
281 \definecolor{colVlnBowU}{gray}{0.50}%
282 \definecolor{colVlnBowD}{gray}{0}%
283 \definecolor{colVlnBowN}{gray}{1}%
284 \def\@vln@note@bow@def#1{%
285 \ifthenelse{\equal{#1}{C}}%
286 {%
287 \count@=\@vln@note%
288 \advance\count@ by -1\relax%
289 \ifthenelse{\equal{\@vln@note@bow@{\the\count@}}{U}}%
290 {\expandafter\def\csname @vln@note@bow@\the\@vln@note\endcsname{D}}%
291 {\expandafter\def\csname @vln@note@bow@\the\@vln@note\endcsname{U}}%
292 }%
293 {%
294 \ifthenelse{\equal{#1}{.}}%
295 {%
296 \count@=\@vln@note%
297 \advance\count@ by -1\relax%
298 \expandafter\edef\csname @vln@note@bow@\the\@vln@note\endcsname%
299 {\@vln@note@bow@{\the\count@}}%
300 }%
301 {%
302 \expandafter\def\csname @vln@note@bow@\the\@vln@note\endcsname{#1}%
303 }%
304 }%
305 \@vln@trace{@vln@note@bow@def}{@vln@note=\the\@vln@note: @vln@note@bow=\@vln@note@bow}%
306 }%
307 \def\@vln@note@bow@#1{%
308 \csname @vln@note@bow@#1\endcsname%
309 }%
310 \def\@vln@note@bow{%
311 \csname @vln@note@bow@\the\@vln@note\endcsname%
312 }%
313 % \@vln@note@bow@output
314 \def\@vln@note@bow@output{%
315 \@vln@trace{@vln@note@bow@output}{@vln@note=\the\@vln@note:}%
316 \@vln@note@output@{\@vln@note@pos}%
317 {\begingroup\expandafter\color{colVlnBow\@vln@note@bow}}%
318 {%
319 \hbox{%
320 \ifthenelse{\equal{\@vln@note@bow}{N}}%
321 {}%
322 {%
323 \vrule depth 0pt height \@vln@note@vdim width \@vln@note@hdim\relax%
324 \nobreak\hskip-\@vln@note@hdim\relax%
325 \@vln@note@cresc@output%
326 }%
327 }%
328 }%
329 {\endgroup}%
330 }%
331 % \@vln@note@chord
332 \def\@vln@note@chord@def#1{%
333 \expandafter\edef\csname @vln@note@chord@\the\@vln@note\endcsname{#1}%
334 }%
335 \def\@vln@note@chord@#1{%
336 \csname @vln@note@chord@#1\endcsname%
337 }%
338 \def\@vln@note@chord{%
339 \csname @vln@note@chord@\the\@vln@note\endcsname%
340 }%
341 % \@vln@note@chord@output
342 \def\@vln@note@chord@output{%
343 \ifthenelse{\equal{\@vln@note@chord}{true}}%
344 {%
345 }%
346 {%
347 \advance\@vln@staff@note@hskip by\@vln@note@hdim\relax%
348 }%
349 }%
350 % \@vln@note@cord
351 \def\@vln@note@cord@def#1{%
352 \ifthenelse{\equal{#1}{.}}%
353 {%
354 \count@=\@vln@note%
355 \advance\count@ by -1\relax%
356 \expandafter\edef\csname @vln@note@cord@\the\@vln@note\endcsname{%
357 \@vln@note@cord@{\the\count@}%
358 }%
359 }%
360 {%
361 \expandafter\edef\csname @vln@note@cord@\the\@vln@note\endcsname{#1}%
362 }%
363 \@vln@trace{@vln@note@cord@def}{@vln@note=\the\@vln@note: @vln@note@cord=\@vln@note@cord}%
364 }%
365 \def\@vln@note@cord@#1{%
366 \csname @vln@note@cord@#1\endcsname%
367 }%
368 \def\@vln@note@cord{%
369 \csname @vln@note@cord@\the\@vln@note\endcsname%
370 }%
371 \def\@vln@note@cord@pitch{%
372 \@vln@cord@pitch@{\@vln@note@cord}%
373 }%
374 % \@vln@note@cresc
375 % \@vln@note@cresc@left
376 \def\@vln@note@cresc@left@def#1{%
377 \expandafter\edef\csname @vln@note@cresc@left@\the\@vln@note\endcsname{#1}%
378 }%
379 \def\@vln@note@cresc@left@#1{%
380 \csname @vln@note@cresc@left@#1\endcsname%
381 }%
382 \def\@vln@note@cresc@left{%
383 \csname @vln@note@cresc@left@\the\@vln@note\endcsname%
384 }%
385 % \@vln@note@cresc@right
386 \def\@vln@note@cresc@right@def#1{%
387 \expandafter\edef\csname @vln@note@cresc@right@\the\@vln@note\endcsname{#1}%
388 }%
389 \def\@vln@note@cresc@right@#1{%
390 \csname @vln@note@cresc@right@#1\endcsname%
391 }%
392 \def\@vln@note@cresc@right{%
393 \csname @vln@note@cresc@right@\the\@vln@note\endcsname%
394 }%
395 \def\@vln@note@cresc@def{%
396 \@vln@note@cresc@left@def{\@vln@cresc@left}%
397 \@vln@note@cresc@right@def{\@vln@cresc@right}%
398 }%
399 % \@vln@note@cresc@output
400 \definecolor{colVlnCrescD}{rgb}{0,0.66,0}%
401 \definecolor{colVlnCrescU}{rgb}{1,0,0}%
402 \def\@vln@note@cresc@output{%
403 \dimen@=\@vln@note@vdim%
404 \divide\dimen@ by 3\relax%
405 \dimen@@=\@vln@note@hdim%
406 \divide\dimen@@ by 2\relax%
407 \ifthenelse{\equal{\@vln@note@cresc@left}{}}%
408 {%
409 \ifthenelse{\equal{\@vln@note@cresc@right}{}}%
410 {%
411 }%
412 {%
413 \vrule depth 0pt height 0pt width \dimen@@\relax%
414 \color{colVlnCresc\@vln@note@cresc@right}%
415 \vrule depth 0pt height \dimen@ width \dimen@@\relax%
416 }%
417 }%
418 {%
419 \ifthenelse{\equal{\@vln@note@cresc@right}{}}%
420 {%
421 \color{colVlnCresc\@vln@note@cresc@left}%
422 \vrule depth 0pt height \dimen@ width \dimen@@\relax%
423 }%
424 {%
425 \color{colVlnCresc\@vln@note@cresc@left}%
426 \vrule depth 0pt height \dimen@ width \dimen@@\relax%
427 \color{colVlnCresc\@vln@note@cresc@right}%
428 \vrule depth 0pt height \dimen@ width \dimen@@\relax%
429 }%
430 }%
431 }%
432 % \@vln@note@finger
433 \def\@vln@note@finger@def#1{%
434 \ifthenelse{\equal{#1}{.}}%
435 {%
436 \count@=\@vln@note%
437 \advance\count@ by -1\relax%
438 \expandafter\edef\csname @vln@note@finger@\the\@vln@note\endcsname{%
439 \@vln@note@finger@{\the\count@}%
440 }%
441 }%
442 {%
443 \expandafter\edef\csname @vln@note@finger@\the\@vln@note\endcsname{#1}%
444 }%
445 \@vln@trace{@vln@note@finger@def}{@vln@note=\the\@vln@note: @vln@note@finger=\@vln@note@finger}%
446 }%
447 \def\@vln@note@finger@#1{%
448 \csname @vln@note@finger@#1\endcsname%
449 }%
450 \def\@vln@note@finger{%
451 \csname @vln@note@finger@\the\@vln@note\endcsname%
452 }%
453 % \@vln@note@finger@output
454 %\definecolor{colVlnBowFinger}{rgb}{0,0,0}%
455 \definecolor{colVlnBowFingerCord0}{rgb}{0,0,0}%
456 \definecolor{colVlnBowFingerCord1}{rgb}{0,0.66,0}%
457 \definecolor{colVlnBowFingerCord2}{rgb}{0,0,1}%
458 \definecolor{colVlnBowFingerCord3}{rgb}{1,0,0}%
459 \def\@vln@finger@font{%
460 \expandafter\color{colVlnBowFingerCord\@vln@note@cord}%
461 \fontfamily{pnc}\bfseries\sssmall%
462 }%
463 \def\@vln@note@finger@output{%
464 \ifthenelse{\equal{\@vln@note@bow}{N}}%
465 {}%
466 {%
467 \@vln@note@output@{\@vln@note@pos}%
468 {}%
469 {%
470 \vbox to0pt{%
471 \setbox0=\hbox{{\@vln@finger@font{\@vln@note@finger}}}%
472 \nobreak\vskip\@vln@note@vdim\relax%
473 \nobreak\vskip0.2mm\relax%
474 \dp0=0pt\relax% NOTE: to prevent fonts like pnc to mess up the vertical alignment
475 \box0%
476 }%
477 }%
478 {}%
479 }%
480 }%
481 % \@vln@note@octave
482 \def\@vln@note@octave@def#1{%
483 \ifthenelse{\equal{#1}{.}}%
484 {%
485 \count@=\@vln@note%
486 \advance\count@ by -1\relax%
487 \expandafter\edef\csname @vln@note@octave@\the\@vln@note\endcsname{%
488 \@vln@note@octave@{\the\count@}%
489 }%
490 }%
491 {%
492 \expandafter\edef\csname @vln@note@octave@\the\@vln@note\endcsname{#1}%
493 }%
494 \@vln@trace{@vln@note@octave@def}{@vln@note=\the\@vln@note: @vln@note@octave=\@vln@note@octave}%
495 }%
496 \def\@vln@note@octave@#1{%
497 \csname @vln@note@octave@#1\endcsname%
498 }%
499 \def\@vln@note@octave{%
500 \csname @vln@note@octave@\the\@vln@note\endcsname%
501 }%
502 \def\@vln@note@octave@pitch{%
503 \expandafter\@vln@octave@pitch@{\@vln@note@semitone}%
504 }%
505 % \@vln@note@pitch
506 \newcount\@vln@note@pitch@count%
507 \def\@vln@note@pitch@def{%
508 \@vln@note@pitch@count=\@vln@note@octave%
509 \multiply\@vln@note@pitch@count by 12\relax%
510 \advance\@vln@note@pitch@count by\@vln@note@octave@pitch%
511 \expandafter\edef\csname @vln@note@pitch@\the\@vln@note\endcsname{\the\@vln@note@pitch@count}%
512 \@vln@trace{@vln@note@pitch@def}{@vln@note=\the\@vln@note: @vln@note@pitch=\@vln@note@pitch}%
513 }%
514 \def\@vln@note@pitch@#1{%
515 \csname @vln@note@pitch@#1\endcsname%
516 }%
517 \def\@vln@note@pitch{%
518 \csname @vln@note@pitch@\the\@vln@note\endcsname%
519 }%
520 % \@vln@note@pos
521 \newcount\@vln@note@pos@count%
522 \def\@vln@note@pos@def{%
523 \@vln@note@pos@count=\@vln@note@pitch%
524 \advance\@vln@note@pos@count by -\@vln@note@cord@pitch%
525 \expandafter\edef\csname @vln@note@pos@\the\@vln@note\endcsname{\the\@vln@note@pos@count}%
526 \@vln@trace{@vln@note@pos@def}{@vln@note=\the\@vln@note: @vln@note@pos=\@vln@note@pos}%
527 }%
528 \def\@vln@note@pos@#1{%
529 \csname @vln@note@pos@#1\endcsname%
530 }%
531 \def\@vln@note@pos{%
532 \csname @vln@note@pos@\the\@vln@note\endcsname%
533 }%
534 % \@vln@note@semitone
535 \def\@vln@note@semitone{%
536 \@vln@note@tone%
537 \@vln@note@accidental%
538 }%
539 % \@vln@note@semitone@output
540 \definecolor{colVlnOctave0}{rgb}{0,0,0}%
541 \definecolor{colVlnOctave1}{rgb}{0,0.66,0}%
542 \definecolor{colVlnOctave2}{rgb}{0,0,1}%
543 \definecolor{colVlnOctave3}{rgb}{1,0,0}%
544 \definecolor{colVlnOctave4}{rgb}{1,1,0}%
545 \def\@vln@note@semitone@font{%
546 \expandafter\color{colVlnOctave\@vln@note@octave}%
547 \fontfamily{pnc}\scshape\ssssmall%
548 }%
549 \def\@vln@note@semitone@output{%
550 \ifthenelse{\equal{\@vln@note@bow}{N}}%
551 {}%
552 {%
553 \@vln@note@output@{\@vln@note@pos}%
554 {}%
555 {%
556 \vbox to0pt{%
557 \setbox0=\hbox{{\@vln@note@semitone@font{\@vln@note@tone\@vln@note@accidental@output}}}%
558 \nobreak\vskip-0.275mm\relax%
559 \nobreak\vskip-\ht0\relax%
560 %\vskip-\dp0\relax%
561 \dp0=0pt\relax% NOTE: to prevent fonts like pnc to mess up the vertical alignment
562 \box0%
563 }%
564 }%
565 {}%
566 }%
567 }%
568 % \@vln@note@time
569 \def\@vln@note@time@def#1{%
570 \expandafter\edef\csname @vln@note@time@\the\@vln@note\endcsname{#1}%
571 \@vln@trace{@vln@note@time@def}{@vln@note=\the\@vln@note: @vln@note@time=\@vln@note@time}%
572 }%
573 \def\@vln@note@time@#1{%
574 \csname @vln@note@time@#1\endcsname%
575 }%
576 \def\@vln@note@time{%
577 \@vln@note@time@{\the\@vln@note}%
578 }%
579 % \@vln@note@time@num
580 \def\@vln@note@time@num@def#1{%
581 \ifthenelse{\equal{#1}{.}}%
582 {%
583 \ifnum\@vln@note@time=\z@%
584 \count@=\@vln@note%
585 \advance\count@ by -1\relax%
586 \count@@=\@vln@note@time@{\the\count@}%
587 \advance\count@@ by -1\relax%
588 \expandafter\edef\csname @vln@note@time@num@\the\@vln@note @\@vln@note@time\endcsname{%
589 \@vln@note@time@num@@{\the\count@}{\the\count@@}%
590 }%
591 \else%
592 \count@=\@vln@note@time%
593 \advance\count@ by -1\relax%
594 \expandafter\edef\csname @vln@note@time@num@\the\@vln@note @\@vln@note@time\endcsname{%
595 \@vln@note@time@num@{\the\count@}%
596 }%
597 \fi%
598 }%
599 {%
600 \expandafter\edef\csname @vln@note@time@num@\the\@vln@note @\@vln@note@time\endcsname{#1}%
601 }%
602 \@vln@trace{@vln@note@time@num@def}{@vln@note=\the\@vln@note: @vln@note@time@num@=\@vln@note@time@num@{\@vln@note@time}}%
603 }%
604 \def\@vln@note@time@num@@#1#2{%
605 \csname @vln@note@time@num@#1@#2\endcsname%
606 }%
607 \def\@vln@note@time@num@#1{%
608 \csname @vln@note@time@num@\the\@vln@note @#1\endcsname%
609 }%
610 % \@vln@note@time@den
611 \def\@vln@note@time@den@def#1{%
612 \ifthenelse{\equal{#1}{.}}%
613 {%
614 \ifnum\@vln@note@time=\z@%
615 \count@=\@vln@note%
616 \advance\count@ by -1\relax%
617 \count@@=\@vln@note@time@{\the\count@}%
618 \advance\count@@ by -1\relax%
619 \expandafter\edef\csname @vln@note@time@den@\the\@vln@note @\@vln@note@time\endcsname{%
620 \@vln@note@time@den@@{\the\count@}{\the\count@@}%
621 }%
622 \else%
623 \count@=\@vln@note@time%
624 \advance\count@ by -1\relax%
625 \expandafter\edef\csname @vln@note@time@den@\the\@vln@note @\the\count@\endcsname{%
626 \@vln@note@time@den@{\the\count@}%
627 }%
628 \fi%
629 }%
630 {%
631 \expandafter\edef\csname @vln@note@time@den@\the\@vln@note @\@vln@note@time\endcsname{#1}%
632 }%
633 \@vln@trace{@vln@note@time@den@def}{@vln@note=\the\@vln@note: @vln@note@time@den@=\@vln@note@time@den@{\@vln@note@time}}%
634 }%
635 \def\@vln@note@time@den@@#1#2{%
636 \csname @vln@note@time@den@#1@#2\endcsname%
637 }%
638 \def\@vln@note@time@den@#1{%
639 \csname @vln@note@time@den@\the\@vln@note @#1\endcsname%
640 }%
641 % \@vln@note@hdim
642 \def\@vln@note@hdim@unit{2cm}%
643 \newif%
644 \if@vln@note@time@hdim@%
645 \@vln@note@time@hdim@true%
646 \newcount\@vln@note@hdim@def@loop%
647 \def\@vln@note@hdim@def{%
648 \if@vln@note@time@hdim@%
649 \expandafter\def\csname @vln@note@hdim@\the\@vln@note\endcsname{0pt}%
650 \@vln@note@hdim@def@loop=0%
651 \whiledo{\@vln@note@hdim@def@loop<\@vln@note@time}{%
652 \dimen@=\@vln@note@hdim@unit%
653 \multiply\dimen@ by\@vln@note@time@num@{\the\@vln@note@hdim@def@loop}\relax%
654 \divide\dimen@ by\@vln@note@time@den@{\the\@vln@note@hdim@def@loop}\relax%
655 \advance\dimen@ by\@vln@note@hdim\relax%
656 \expandafter\edef\csname @vln@note@hdim@\the\@vln@note\endcsname{\the\dimen@}%
657 \advance\@vln@note@hdim@def@loop by 1\relax%
658 }%
659 \else%
660 \expandafter\edef\csname @vln@note@hdim@\the\@vln@note\endcsname{\@vln@note@hdim@unit}%
661 \fi%
662 \@vln@trace{@vln@note@hdim@def}{@vln@note=\the\@vln@note: @vln@note@hdim=\@vln@note@hdim}%
663 }%
664 \def\@vln@note@hdim{%
665 \csname @vln@note@hdim@\the\@vln@note\endcsname%
666 }%
667 % \@vln@note@time@output
668 \newdimen%
669 \@vln@note@vdim%
670 \@vln@note@vdim=\@vln@staff@semitone@vdim%
671 \newif%
672 \if@vln@note@time@output@%
673 \@vln@note@time@output@false%
674 \def\@vln@note@time@font{%
675 \fontfamily{pnc}\bfseries\ssssmall%
676 }%
677 \def\@vln@note@time@frac@output#1/#2{%
678 \leavevmode%
679 \hbox{#1}%
680 \kern-.4ex\lower.3ex\hbox{\bfseries\tiny /}%
681 \kern-.3ex\lower.6ex\hbox{#2}%
682 }%
683 \def\@vln@note@time@output{%
684 \@vln@trace{@vln@note@time@output}{@vln@note=\the\@vln@note:}%
685 \if@vln@note@time@output@%
686 \null%
687 \else%
688 \@vln@note@output@{\@vln@note@pos}%
689 {}%
690 {%
691 % FIXME: handle \@vln@note@time
692 \vbox to0pt{%
693 \setbox0=\hbox{%
694 \ifthenelse{\equal{\@vln@note@time@den@0}{1}}%
695 {{\@vln@note@time@font{\@vln@note@time@num@0}}}%
696 {\@vln@note@time@frac@output%
697 {\@vln@note@time@font{\@vln@note@time@num@0}}/%
698 {\@vln@note@time@font{\@vln@note@time@den@0}}}%
699 }%
700 \nobreak\vskip\@vln@note@vdim\relax%
701 \nobreak\vskip0.2mm\relax%
702 \nobreak\hskip\@vln@note@hdim\relax%
703 \nobreak\hskip-\wd0\relax%
704 \dp0=0pt\relax%
705 \box0%
706 }%
707 }%
708 {}%
709 \fi%
710 }%
711 % \@vln@note@tone
712 \def\@vln@note@tone@def#1{%
713 \ifthenelse{\equal{#1}{.}}%
714 {%
715 \count@=\@vln@note%
716 \advance\count@ by -1\relax%
717 \expandafter\edef\csname @vln@note@tone@\the\@vln@note\endcsname{%
718 \@vln@note@tone@{\the\count@}%
719 }%
720 }%
721 {%
722 \expandafter\edef\csname @vln@note@tone@\the\@vln@note\endcsname{#1}%
723 }%
724 \@vln@trace{@vln@note@tone@def}{@vln@note=\the\@vln@note: @vln@note@tone=\@vln@note@tone}%
725 }%
726 \def\@vln@note@tone@#1{%
727 \csname @vln@note@tone@#1\endcsname%
728 }%
729 \def\@vln@note@tone{%
730 \csname @vln@note@tone@\the\@vln@note\endcsname%
731 }%
732 % \@vln@note@output
733 \def\@vln@note@output@#1#2#3#4{%
734 \count@=#1%
735 \@vln@trace{@vln@note@output@}{@vln@note=\the\@vln@note: pos=\the\count@}%
736 \nointerlineskip%
737 \@vln@staff@note@vskip=0pt\relax%
738 \advance\@vln@staff@note@vskip by\@vln@staff@semitone@vdim\relax%
739 \multiply\@vln@staff@note@vskip by#1\relax%
740 \advance\@vln@staff@note@vskip by\@vln@staff@semitone@vdim\relax%
741 \nobreak\vskip\@vln@staff@note@vskip\relax%
742 \vrule depth 0pt height 0pt width \@vln@staff@note@hskip\relax%
743 \setbox0=#3%
744 \advance\@vln@staff@note@vskip by\ht0\relax%
745 #2%
746 \box0%
747 #4%
748 \nobreak\vskip-\@vln@staff@note@vskip\relax%
749 \nointerlineskip%
750 }%
751 \def\@vln@note@output{%
752 \@vln@trace{@vln@note@output}{[ @vln@note=\the\@vln@note:}%
753 \@vln@note@hdim@def%
754 \@vln@staff@output@automatic%
755 %\@vln@note@time@output%
756 \@vln@note@bow@output%
757 \@vln@note@finger@output%
758 \@vln@note@semitone@output%
759 \@vln@note@chord@output%
760 \nointerlineskip%
761 \@vln@trace{@vln@note@output}{] @vln@note=\the\@vln@note:}%
762 }%
763 \def\@vln@note@def@chord@{%
764 \@ifnextchar&{%
765 \@vln@trace{@vln@note@def@chord@}{| @vln@note=\the\@vln@note: chord=yes}%
766 \def\next&{%
767 \@vln@note@chord@def{yes}%
768 \@vln@lily@note@def%
769 \@vln@item@def type:{note}%
770 }%
771 \next%
772 }{%
773 \@vln@trace{@vln@note@def@chord@}{| @vln@note=\the\@vln@note: chord=false}%
774 \@vln@note@chord@def{false}%
775 \@vln@lily@note@def%
776 \@vln@item@def type:{note}%
777 }%
778 }%
779 \def\@vln@note@def@time@ tie:#1+#2#3{%
780 \@vln@trace{@vln@note@def@time@}{| @vln@note=\the\@vln@note: tie=#1+#2#3}%
781 \@vln@note@time@def{#1}%
782 \@vln@note@time@num@def{#2}%
783 \@vln@note@time@den@def{#3}%
784 \count@=#1\relax%
785 \advance\count@ by 1\relax%
786 \@vln@note@time@def{\the\count@}%
787 \@ifnextchar+%
788 {\@vln@note@def@time@ tie:\@vln@note@time}%
789 \@vln@note@def@chord@%
790 }%
791 \def\@vln@note@def octave:#1tone:#2accidental:#3cord:#4finger:#5bow:#6time:{%
792 \@vln@trace{@vln@note@def}{octave=#1 tone=#2 accidental=#3 cord=#4 finger=#5 bow=#6}%
793 \@vln@note@cresc@def%
794 \@vln@note@octave@def{#1}%
795 \@vln@note@tone@def{#2}%
796 \@vln@trace{@vln@note@def}{BEGIN}%
797 \@vln@note@accidental@def{#3}%
798 \@vln@trace{@vln@note@def}{END}%
799 \@vln@note@cord@def{#4}%
800 \@vln@note@finger@def{#5}%
801 \@vln@note@bow@def{#6}%
802 \@vln@note@pitch@def%
803 \@vln@note@pos@def%
804 \@vln@note@def@time@ tie:{0}+%
805 }%
806 % \@vln@part
807 % \@vln@part@text
808 \def\@vln@part@text@def#1{%
809 \expandafter\edef\csname @vln@part@text@\the\@vln@part\endcsname{#1}%
810 }%
811 \def\@vln@part@text@#1{%
812 \csname @vln@part@text@#1\endcsname%
813 }%
814 \def\@vln@part@text{%
815 \@vln@part@text@{\the\@vln@part}%
816 }%
817 % \@vln@part@output
818 \definecolor{colVlnPart}{gray}{0}%
819 \def\@vln@part@font{%
820 \color{colVlnPart}%
821 \fontfamily{pnc}\bfseries\sssmall%
822 }%
823 \def\@vln@part@up@output{%
824 \@vln@note@output@{0}%
825 {}%
826 {\vbox to0pt{%
827 \setbox0=\hbox{{\@vln@part@font{\@vln@part@text}}}%
828 \nobreak\vskip-0.3mm\relax%
829 \nobreak\vskip-\ht0\relax%
830 \nobreak\vskip-\ht0\relax%
831 \dp0=0pt\relax% NOTE: to prevent fonts like pnc to mess up the vertical alignment
832 \box0}}%
833 {}%
834 }%
835 \def\@vln@part@output{%
836 \@vln@note@output@{0}%
837 {}%
838 {\vbox to0pt{%
839 \setbox0=\hbox{{\@vln@part@font{\@vln@part@text}}}%
840 \nobreak\vskip-0.3mm\relax%
841 \nobreak\vskip-\ht0\relax%
842 \dp0=0pt\relax% NOTE: to prevent fonts like pnc to mess up the vertical alignment
843 \box0}}%
844 {}%
845 }%
846 \def\@vln@part@def text:#1{%
847 \@vln@part@text@def {#1}%
848 \@vln@item@def type:{part}%
849 }%
850 % \@vln@item
851 \newcount\@vln@item%
852 % \@vln@item@type
853 \def\@vln@item@type@def#1{%
854 \expandafter\edef\csname @vln@item@type@\the\@vln@item\endcsname{#1}%
855 }%
856 \def\@vln@item@type@#1{%
857 \csname @vln@item@type@#1\endcsname%
858 }%
859 \def\@vln@item@type{%
860 \csname @vln@item@type@\the\@vln@item\endcsname%
861 }%
862 \def\@vln@item@types{%
863 bar,%
864 note,%
865 part%
866 }%
867 \def\@vln@item@def type:#1{%
868 \@vln@trace{@vln@item@def}{[ type=#1}%
869 \@vln@item@type@def{#1}%
870 \@vln@trace{@vln@item@def}{| @vln@item@type@{\the\@vln@item} = \@vln@item@type@{\the\@vln@item}}%
871 \expandafter\advance%
872 \csname @vln@\@vln@item@type@{\the\@vln@item}\endcsname%
873 by 1\relax%
874 \@vln@trace{@vln@item@def}{| @vln@\@vln@item@type@{\the\@vln@item} = \the\csname @vln@\@vln@item@type@{\the\@vln@item}\endcsname}%
875 \advance\@vln@item by 1\relax%
876 \@vln@trace{@vln@item@def}{]}%
877 }%
878 \@for\@type:=\@vln@item@types\do{%
879 \expandafter\newcount\csname @vln@\@type\endcsname%
880 }%
881 \newcount\@vln@item@output@loop%
882 \def\@vln@item@output{%
883 \@vln@item@output@loop=0%
884 \@for\@type:=\@vln@item@types\do{%
885 \csname @vln@\@type\endcsname=0%
886 }%
887 \whiledo{\@vln@item@output@loop<\@vln@item}{%
888 \csname @vln@\@vln@item@type@{\the\@vln@item@output@loop}@output\endcsname%
889 \expandafter\advance%
890 \csname @vln@\@vln@item@type@{\the\@vln@item@output@loop}\endcsname%
891 by 1\relax%
892 \advance\@vln@item@output@loop by 1\relax%
893 }%
894 }%
895 % \@vln@lily
896 % \@vln@lily@output
897 \def\@vln@lily@output{}%
898 \newcount\@vln@lily@output@loop%
899 \def\@vln@lily@output@flush{%
900 \@vln@trace{@vln@lily@output@flush}{}%
901 %\ifthenelse{\equal{\@vln@lily@slur@begin}{}}%
902 % {%
903 % }%
904 % {%
905 % \@vln@lily@note@def@{\@vln@lily@slur@begin}={\@vln@lily@note@{\@vln@lily@slur@begin}(}%
906 % \count@=\@vln@note%
907 % \advance\count@ by -1\relax%
908 % \@vln@lily@note@def@{\the\count@}={)\@vln@lily@note@{\the\count@}}%
909 % \def\@vln@lily@slur@begin{}%
910 % }%
911 %\ifthenelse{\equal{\@vln@lily@note@time}{}}%
912 % {%
913 % }%
914 % {%
915 % \count@=\@vln@note%
916 % \advance\count@ by -1\relax%
917 % \@vln@lily@note@def@{\the\count@}={\@vln@lily@note\textcurlybraceclose}%
918 % }%
919 \@vln@lily@output@loop=0%
920 \whiledo{\@vln@lily@output@loop<\@vln@note}{%
921 \edef\@vln@lily@output{%
922 \@vln@lily@output%
923 \@vln@lily@note@output@{\the\@vln@lily@output@loop}%
924 ^^J%
925 }%
926 \advance\@vln@lily@output@loop by 1\relax%
927 }%
928 }%
929 \def\@vln@lily@output@write{%
930 \newwrite\@vln@lily@output@file%
931 \immediate\openout\@vln@lily@output@file=out.ly%
932 \immediate\write\@vln@lily@output@file{\@vln@lily@output}%
933 \immediate\closeout\@vln@lily@output@file%
934 }%
935 \def\@vln@lily@output@write@verbatim{%
936 \@bsphack%
937 \let\do\@makeother\dospecials%
938 \catcode`\^^M\active \catcode`\^^I=12%
939 \def\verbatim@processline{%
940 \xdef\@vln@lily@output{\@vln@lily@output\the\verbatim@line^^J}%
941 }%
942 \verbatim@start%
943 }%
944 \def\end@vln@lily@output@write@verbatim{%
945 \@esphack%
946 }%
947 % \@vln@lily@time
948 \def\@vln@lily@time@def#1/#2=#3#4{%
949 \expandafter\def\csname @vln@lily@time@times@#1/#2\endcsname{#3}%
950 \expandafter\def\csname @vln@lily@time@wholedotted@#1/#2\endcsname{#4}%
951 }%
952 % FIXME: à compléter..
953 \@vln@lily@time@def 1/2={}{2}%
954 \@vln@lily@time@def 2/2={}{1}%
955 \@vln@lily@time@def 3/2={}{2.}%
956 \@vln@lily@time@def 1/4={}{4}%
957 \@vln@lily@time@def 2/4={}{2}%
958 \@vln@lily@time@def 3/4={}{???}%
959 \@vln@lily@time@def 4/4={}{1}%
960 \@vln@lily@time@def 1/8={}{8}%
961 \@vln@lily@time@def 2/8={}{4}%
962 \@vln@lily@time@def 3/8={}{4.}%
963 \@vln@lily@time@def 4/8={}{2}%
964 \@vln@lily@time@def 5/8={}{???}%
965 \@vln@lily@time@def 6/8={}{2.}%
966 \@vln@lily@time@def 7/8={}{???}%
967 \@vln@lily@time@def 8/8={}{1}%
968 \@vln@lily@time@def 1/12={2/3}{8}%
969 \@vln@lily@time@def 2/12={}{???}%
970 \@vln@lily@time@def 3/12={}{???}%
971 \@vln@lily@time@def 4/12={}{3}%
972 \@vln@lily@time@def 5/12={}{???}%
973 \@vln@lily@time@def 6/12={}{2}%
974 \@vln@lily@time@def 7/12={}{???}%
975 \@vln@lily@time@def 8/12={}{???}%
976 \@vln@lily@time@def 9/12={}{???}%
977 \@vln@lily@time@def 10/12={}{???}%
978 \@vln@lily@time@def 11/12={}{???}%
979 \@vln@lily@time@def 12/12={}{1}%
980 \@vln@lily@time@def 1/16={}{16}%
981 \@vln@lily@time@def 2/16={}{8}%
982 \@vln@lily@time@def 3/16={}{8.}%
983 \@vln@lily@time@def 4/16={}{4}%
984 \@vln@lily@time@def 5/16={}{???}%
985 \@vln@lily@time@def 6/16={}{???}%
986 \@vln@lily@time@def 7/16={}{???}%
987 \@vln@lily@time@def 8/16={}{2}%
988 \@vln@lily@time@def 9/16={}{???}%
989 \@vln@lily@time@def 10/16={}{???}%
990 \@vln@lily@time@def 11/16={}{???}%
991 \@vln@lily@time@def 12/16={}{???}%
992 \@vln@lily@time@def 13/16={}{???}%
993 \@vln@lily@time@def 14/16={}{???}%
994 \@vln@lily@time@def 15/16={}{???}%
995 \@vln@lily@time@def 16/16={}{1}%
996 \@vln@lily@time@def 1/32={}{32}%
997 \@vln@lily@time@def 2/32={}{16}%
998 \@vln@lily@time@def 3/32={}{???}%
999 \@vln@lily@time@def 4/32={}{8}%
1000 \@vln@lily@time@def 5/32={}{???}%
1001 \@vln@lily@time@def 6/32={}{???}%
1002 \@vln@lily@time@def 7/32={}{???}%
1003 \@vln@lily@time@def 8/32={}{4}%
1004 \@vln@lily@time@def 9/32={}{???}%
1005 \@vln@lily@time@def 10/32={}{???}%
1006 \@vln@lily@time@def 11/32={}{???}%
1007 \@vln@lily@time@def 12/32={}{???}%
1008 \@vln@lily@time@def 13/32={}{???}%
1009 \@vln@lily@time@def 14/32={}{???}%
1010 \@vln@lily@time@def 15/32={}{???}%
1011 \@vln@lily@time@def 16/32={}{2}%
1012 \@vln@lily@time@def 17/32={}{???}%
1013 \@vln@lily@time@def 18/32={}{???}%
1014 \@vln@lily@time@def 19/32={}{???}%
1015 \@vln@lily@time@def 20/32={}{???}%
1016 \@vln@lily@time@def 21/32={}{???}%
1017 \@vln@lily@time@def 22/32={}{???}%
1018 \@vln@lily@time@def 23/32={}{???}%
1019 \@vln@lily@time@def 24/32={}{???}%
1020 \@vln@lily@time@def 25/32={}{???}%
1021 \@vln@lily@time@def 26/32={}{???}%
1022 \@vln@lily@time@def 27/32={}{???}%
1023 \@vln@lily@time@def 28/32={}{???}%
1024 \@vln@lily@time@def 29/32={}{???}%
1025 \@vln@lily@time@def 30/32={}{???}%
1026 \@vln@lily@time@def 31/32={}{???}%
1027 \@vln@lily@time@def 32/32={}{1}%
1028 \def\@vln@lily@time@times@#1/#2{%
1029 \csname @vln@lily@time@times@#1/#2\endcsname%
1030 }%
1031 \def\@vln@lily@time@wholedotted@#1/#2{%
1032 \csname @vln@lily@time@wholedotted@#1/#2\endcsname%
1033 }%
1034 \def\@vln@lily@time@#1/#2{%
1035 \ifthenelse{\equal{\@vln@lily@time@times@#1/#2}{}}%
1036 {%
1037 %
1038 }%
1039 {%
1040 %
1041 }%
1042 }%
1043 % \@vln@lily@octave
1044 \def\@vln@lily@octave@def#1=#2{%
1045 \expandafter\def\csname @vln@lily@octave@#1\endcsname{#2}%
1046 }%
1047 \def\@vln@lily@octave@#1{%
1048 \csname @vln@lily@octave@#1\endcsname%
1049 }%
1050 \@vln@lily@octave@def{0}={}%
1051 \@vln@lily@octave@def{1}={'}%
1052 \@vln@lily@octave@def{2}={''}%
1053 \@vln@lily@octave@def{3}={'''}%
1054 % \@vln@lily@semitone
1055 \def\@vln@lily@semitone@def#1=#2{%
1056 \expandafter\def\csname @vln@lily@semitone@#1\endcsname{#2}%
1057 }%
1058 \@vln@lily@semitone@def{G=}={g}%
1059 \@vln@lily@semitone@def{G+}={gis}%
1060 \@vln@lily@semitone@def{A-}={aes}%
1061 \@vln@lily@semitone@def{A=}={a}%
1062 \@vln@lily@semitone@def{A+}={ais}%
1063 \@vln@lily@semitone@def{B-}={bes}%
1064 \@vln@lily@semitone@def{B=}={b}%
1065 \@vln@lily@semitone@def{B+}={bis}%
1066 \@vln@lily@semitone@def{C-}={ces}%
1067 \@vln@lily@semitone@def{C=}={c}%
1068 \@vln@lily@semitone@def{C+}={cis}%
1069 \@vln@lily@semitone@def{D-}={des}%
1070 \@vln@lily@semitone@def{D=}={d}%
1071 \@vln@lily@semitone@def{D+}={dis}%
1072 \@vln@lily@semitone@def{E-}={ees}%
1073 \@vln@lily@semitone@def{E=}={e}%
1074 \@vln@lily@semitone@def{E+}={eis}%
1075 \@vln@lily@semitone@def{F-}={fes}%
1076 \@vln@lily@semitone@def{F=}={f}%
1077 \@vln@lily@semitone@def{F+}={fis}%
1078 \@vln@lily@semitone@def{G-}={ges}%
1079 \def\@vln@lily@semitone@#1{%
1080 \csname @vln@lily@semitone@#1\endcsname%
1081 }%
1082 % \@vln@lily@note
1083 % \@vln@lily@note@name
1084 \def\@vln@lily@note@name@def{%
1085 \ifthenelse{\equal{\@vln@note@bow}{N}}%
1086 {%
1087 \expandafter\edef\csname @vln@lily@note@name@\the\@vln@note\endcsname{r}%
1088 }%
1089 {%
1090 \expandafter\edef\csname @vln@lily@note@name@\the\@vln@note\endcsname{\@vln@lily@semitone@{\@vln@note@semitone}}%
1091 }%
1092 }%
1093 \def\@vln@lily@note@name@#1{%
1094 \csname @vln@lily@note@name@#1\endcsname%
1095 }%
1096 \def\@vln@lily@note@name{%
1097 \csname @vln@lily@note@name@\the\@vln@note\endcsname%
1098 }%
1099 % \@vln@lily@note@octave
1100 \def\@vln@lily@note@octave@def{%
1101 \ifthenelse{\equal{\@vln@note@bow}{N}}%
1102 {%
1103 \expandafter\edef\csname @vln@lily@note@octave@\the\@vln@note\endcsname{}%
1104 }%
1105 {%
1106 \count@=\@vln@note@pitch\relax%
1107 \advance\count@ by 7\relax%
1108 \divide\count@ by 12\relax%
1109 \expandafter\edef\csname @vln@lily@note@octave@\the\@vln@note\endcsname{\@vln@lily@octave@{\the\count@}}%
1110 }%
1111 \@vln@trace{@vln@lily@note@octave@def}{@vln@note=\the\@vln@note: @vln@lily@note@octave=\@vln@lily@note@octave}%
1112 }%
1113 \def\@vln@lily@note@octave@#1{%
1114 \csname @vln@lily@note@octave@#1\endcsname%
1115 }%
1116 \def\@vln@lily@note@octave{%
1117 \csname @vln@lily@note@octave@\the\@vln@note\endcsname%
1118 }%
1119 % \@vln@lily@note@slur
1120 \def\@vln@lily@slur@begin{}%
1121 \def\@vln@lily@slur@end{}%
1122 \def\@vln@lily@note@slur@def{%
1123 \def\@vln@lily@slur@end{}%
1124 \count@=\@vln@note%
1125 \advance\count@ by -1\relax%
1126 \ifthenelse{\equal{\@vln@note@bow}{\@vln@note@bow@{\the\count@}}}%
1127 {%
1128 \count@=\@vln@note%
1129 \advance\count@ by -1\relax%
1130 \ifthenelse{\equal{\@vln@note@chord@{\the\count@}}{true}}%
1131 {%
1132 }%
1133 {%
1134 \ifthenelse{\equal{\@vln@lily@slur@begin}{}}%
1135 {%
1136 \edef\@vln@lily@slur@begin{\the\@vln@note}%
1137 }%
1138 {%
1139 }%
1140 }%
1141 }%
1142 {%
1143 \ifthenelse{\equal{\@vln@lily@slur@begin}{}}%
1144 {%
1145 }%
1146 {%
1147 \@vln@lily@note@def@{\@vln@lily@note@slur@begin}=%
1148 {\@vln@lily@note@{\@vln@lily@note@slur@begin}(}% )
1149 \edef\@vln@lily@slur@begin{0}%
1150 \def\@vln@lily@slur@end{}%
1151 }%
1152 }%
1153 }%
1154 % \@vln@lily@note@time
1155 \newcount\@vln@lily@note@time@loop%
1156 \def\@vln@lily@note@time@def{%
1157 \expandafter\edef\csname @vln@lily@time@begin@\the\@vln@note\endcsname{%
1158 %
1159 }%
1160 \@vln@lily@note@time@loop=0%
1161 \expandafter\edef\csname @vln@lily@time@end@\the\@vln@note\endcsname{}%
1162 \whiledo{\@vln@lily@note@time@loop<\@vln@note@time}{%
1163 \edef\text@{%
1164 \@vln@note@time@num@{\the\@vln@lily@note@time@loop}%
1165 /%
1166 \@vln@note@time@den@{\the\@vln@lily@note@time@loop}%
1167 }%
1168 \expandafter\edef\csname @vln@lily@time@end@\the\@vln@note\endcsname{%
1169 \string~\csname @vln@lily@time@end@\the\@vln@note\endcsname%
1170 %\expandafter\@vln@lily@time@times@\text@%
1171 \@vln@lily@note@name\@vln@lily@note@octave%
1172 \expandafter\@vln@lily@time@wholedotted@\text@%
1173 }%
1174 \advance\@vln@lily@note@time@loop by 1\relax%
1175 }%
1176 }%
1177 \def\@vln@lily@note@def{%
1178 \@vln@trace{@vln@lily@note@def}{}%
1179 \@vln@lily@note@name@def%
1180 \@vln@lily@note@octave@def%
1181 \@vln@lily@note@time@def%
1182 %\@vln@lily@note@slur@def%
1183 \@vln@lily@note@output@def%
1184 }%
1185 % \@vln@lily@note@output
1186 \def\@vln@lily@note@output@def{%
1187 \ifthenelse{\equal{\@vln@note@chord}{true}}%
1188 {%
1189 \count@=\@vln@note%
1190 \advance\count@ by -1\relax%
1191 \ifthenelse{\equal{\@vln@note@chord@{\the\count@}}{true}}%
1192 {%
1193 \expandafter\edef\csname @vln@lily@note@output@\the\@vln@note\endcsname{%
1194 \space%
1195 \@vln@lily@note@name%
1196 \@vln@lily@note@octave%
1197 }%
1198 }%
1199 {%
1200 \expandafter\edef\csname @vln@lily@note@output@\the\@vln@note\endcsname{%
1201 %\@vln@lily@slur@end%
1202 %\@vln@lily@note@time@begin%
1203 <\@vln@lily@note@name%
1204 \@vln@lily@note@octave%
1205 }%
1206 }%
1207 }%
1208 {%
1209 \count@=\@vln@note%
1210 \advance\count@ by -1\relax%
1211 \ifthenelse{\equal{\@vln@note@chord@{\the\count@}}{true}}%
1212 {%
1213 \expandafter\edef\csname @vln@lily@note@output@\the\@vln@note\endcsname{%
1214 \space%
1215 \@vln@lily@note@name%
1216 \@vln@lily@note@octave%
1217 >%
1218 %\@vln@lily@note@time@end%
1219 }%
1220 }%
1221 {%
1222 \expandafter\edef\csname @vln@lily@note@output@\the\@vln@note\endcsname{%
1223 %\@vln@lily@slur@end%
1224 %\@vln@lily@note@time@begin%
1225 \@vln@lily@note@name%
1226 \@vln@lily@note@octave%
1227 %\@vln@lily@note@time@end%
1228 }%
1229 }%
1230 }%
1231 \@vln@trace{@vln@lily@note@output@def}{\@vln@lily@note@output}%
1232 }%
1233 \def\@vln@lily@note@output@#1{%
1234 \csname @vln@lily@note@output@#1\endcsname%
1235 }%
1236 \def\@vln@lily@note@output{%
1237 \csname @vln@lily@note@output@\the\@vln@note\endcsname%
1238 }%
1239 % Aliases
1240 \def\n#1#2#3#4#5#6{%
1241 \@vln@note@def octave:{#1}tone:{#2}accidental:{#3}cord:{#4}finger:{#5}bow:{#6}time:%
1242 }%
1243 \def\bar{%
1244 \@vln@bar@def%
1245 }%
1246 \def\c#1{%
1247 \@vln@cresc@def way:{#1}%
1248 }%
1249 \def\p#1{%
1250 \@vln@part@def text:{#1}%
1251 }%
1252 \def\lilyflush{\@vln@lily@output@flush}%
1253 \def\lilywrite{\@vln@lily@output@write}%
1254
1255
1256
1257
1258
1259 %\edef\text@{\csname vlncurrtimenum0\endcsname/\csname vlncurrtimeden0\endcsname}%
1260 %\@latex@info{TRACE: vlnlilyduration: text@=\text@}%
1261 %% @begin
1262 % \let\vlnlilyduration@times@last\vlnlilyduration@times%
1263 % \edef\vlnlilyduration@times{%
1264 % \csname vlnlilyduration\text@ @times\endcsname%
1265 % }%
1266 % \ifthenelse{\equal{\vlnlilyduration@times}{}}%
1267 % {%
1268 % \ifthenelse{\equal{\vlnlilyduration@times@last}{}}%
1269 % {%
1270 % \edef\vlnlilyduration@begin{%
1271 % }%
1272 % }%
1273 % {%
1274 % \edef\vlnlilyduration@begin{%
1275 % \textcurlybraceclose%
1276 % }%
1277 % }%
1278 % }%
1279 % {%
1280 % \ifthenelse{\equal{\vlnlilyduration@times}{\vlnlilyduration@times@last}}%
1281 % {%
1282 % \edef\vlnlilyduration@begin{%
1283 % }%
1284 % }%
1285 % {%
1286 % \ifthenelse{\equal{\vlnlilyduration@times@last}{}}%
1287 % {%
1288 % \edef\vlnlilyduration@begin{%
1289 % \times \vlnlilyduration@times \textcurlybraceopen%
1290 % }%
1291 % }%
1292 % {%
1293 % \edef\vlnlilyduration@begin{%
1294 % \textcurlybraceclose \times \vlnlilydurationtimes \textcurlybraceopen%
1295 % }%
1296 % }%
1297 % }%
1298 % }%
1299 %% @end
1300 % \let\vlnlilyduration@wholedotted@last\vlnlilyduration@wholedotted%
1301 % \edef\vlnlilyduration@wholedotted{%
1302 % \csname vlnlilyduration\text@ @wholedotted\endcsname%
1303 % }%
1304 % \ifthenelse{\equal{\vlnlilyduration@wholedotted}{\vlnlilyduration@wholedotted@last}}%
1305 % {%
1306 % \edef\vlnlilyduration@end{%
1307 % }%
1308 % }%
1309 % {%
1310 % \edef\vlnlilyduration@end{%
1311 % \vlnlilyduration@wholedotted%
1312 % }%
1313 % }%
1314 %\@latex@info{TRACE: vlnlilyduration: @times=\vlnlilyduration@times}%
1315 %\@latex@info{TRACE: vlnlilyduration: @wholedotted=\vlnlilyduration@wholedotted}%
1316 %\@latex@info{TRACE: vlnlilyduration: @begin=\vlnlilyduration@begin}%
1317 %\@latex@info{TRACE: vlnlilyduration: @end=\vlnlilyduration@end}%
1318 % Phrasé
1319 % Accord