From: Julien Moutinho Date: Wed, 2 Oct 2013 06:21:59 +0000 (+0200) Subject: Réécriture : organise et passe par une représentation des données sans état. X-Git-Url: https://git.sourcephile.fr/julm/violon-tex.git/commitdiff_plain Réécriture : organise et passe par une représentation des données sans état. --- diff --git a/violon.sty b/violon.sty index 8b2d9a9..d9f0561 100644 --- a/violon.sty +++ b/violon.sty @@ -1,757 +1,1319 @@ -% This file is part of Violon, a violin score engine. -% Copyright (C) 2009-2012 Julien Moutinho -% -% This program is free software: you can redistribute it and/or modify -% it under the terms of the GNU General Public License as published -% by the Free Software Foundation, either version 3 of the License, -% or any later version. -% -% This program is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty -% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -% See the GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this program. If not, see . - -% Any comment or contribution is welcome -% at julm&autogeree.net. - -% Déclaration +% Licence + % This file is part of Violon, a violin score engine. + % Copyright (C) 2009-2013 Julien Moutinho + % + % This program is free software: you can redistribute it and/or modify + % it under the terms of the GNU General Public License as published + % by the Free Software Foundation, either version 3 of the License, + % or any later version. + % + % This program is distributed in the hope that it will be useful, + % but WITHOUT ANY WARRANTY; without even the implied warranty + % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + % See the GNU General Public License for more details. + % + % You should have received a copy of the GNU General Public License + % along with this program. If not, see . + % + % Any comment or contribution is welcome + % at julm+tex+violon&autogeree.net. +% Package \def\fileversion{1.0}% - \def\filedate{2009/10/11}% + \def\filedate{2013/10/02}% \NeedsTeXFormat{LaTeX2e}% \ProvidesPackage{violon}[\filedate\space\fileversion\space% Violin score library (Julien Moutinho)]% -% Bibliothèques +% \usepackage \usepackage{ifthen}% \usepackage{color}% \usepackage{verbatim}% -% Polices - \gdef\ssssmall{% - \@setfontsize\sssmall{5pt}{5pt}}% - \gdef\sssmall{% - \@setfontsize\sssmall{6pt}{6pt}}% - \gdef\ssmall{% - \@setfontsize\ssmall\@viiipt\@ixpt}% - \gdef\vlnfingerfont{% - \expandafter\color{colVlnBowFingerCord\vlncurrcord}% - \fontfamily{pnc}\bfseries\sssmall}% - \gdef\vlncordfont{% - \color{colVlnBowCord}% - \fontfamily{pnc}\bfseries\sssmall}% - \gdef\vlnnamefont{% - \expandafter\color{colVlnBowNameOctave\the\vlncurroctave}% - \fontfamily{pnc}\scshape\ssssmall}% - \gdef\vlnpartfont{% - \color{colVlnPart}% - \fontfamily{pnc}\bfseries\sssmall}% - \gdef\vlntimefont{% - \fontfamily{pnc}\bfseries\ssssmall}% -% Algèbre - \newcount\@calc@mod@cnt% - \def\modulo#1#2{% - \@calc@mod@cnt=#1\relax% - \divide\@calc@mod@cnt by#2\relax% - \multiply\@calc@mod@cnt by#2\relax% - \advance#1 by-\@calc@mod@cnt% +% Utilitaires + % math + \newcount\modulo@% + \def\modulo#1by#2{% + \modulo@=#1\relax% + \divide\modulo@ by#2\relax% + \multiply\modulo@ by-#2\relax% + \advance\modulo@ by#1\relax% + \the\modulo@% + }% + \def\romannumeralz#1{% + \ifnum#1>\z@\romannumeral#1\else\number#1\fi% + }% + % \text + \begingroup% + \catcode`\[ = 1\relax% + \catcode`\] = 2\relax% + \catcode`\{ = 12\relax% + \catcode`\} = 12 \relax% + \gdef\textcurlybraceopen[{]% + \gdef\textcurlybraceclose[}]% + \endgroup% + % \par + \parindent=0pt\relax% + \parskip=0pt\relax% + \parfillskip=0pt\relax% + % \new + \newdimen\dimen@% + \newdimen\dimen@@% + \newcount\count@@% + % \setfontsize + \def\ssmall{% + \@setfontsize\ssmall\@viiipt\@ixpt% + }% + \def\sssmall{% + \@setfontsize\sssmall{6pt}{6pt}% + }% + \def\ssssmall{% + \@setfontsize\sssmall{5pt}{5pt}% + }% + % \if + \def\isundefined#1{TT\fi\ifx#1\undefined}% +% @vln@trace + \newif% + \if@vln@trace@% + \@vln@trace@false% + \def\@vln@trace#1#2{% + \if@vln@trace@% + \message{TRACE: #1: #2^^J}% + \fi% + }% +% @vln@debug + \def\@vln@debug{% + \message{^^JDEBUG: @vln@item: \the\@vln@item^^J}% + \@for\@type:=\@vln@item@types\do{% + \message{DEBUG: @vln@\@type\space= \the\csname @vln@\@type\endcsname^^J}% + }% + }% +% \@vln@staff + \newlength\@vln@staff@vdim@skip% + \newlength% + \@vln@staff@vdim% + \@vln@staff@vdim=0pt\relax% + \newdimen% + \@vln@staff@semitone@vdim% + \@vln@staff@semitone@vdim=3pt% + \newlength% + \@vln@staff@interv@skip% + \@vln@staff@interv@skip=\@vln@staff@semitone@vdim\relax% + \multiply\@vln@staff@interv@skip by 2\relax% + \newlength% + \@vln@staff@skip% + \@vln@staff@skip=0pt\relax% + \def\@vln@staff@hsize@max{\hsize}% + \def\@vln@staff@vsize@max{\textheight}% + \def\@vln@staff@tone@vskip{% + \advance\@vln@staff@vdim by\@vln@staff@semitone@vdim% + \nobreak% }% -% Convertisseurs - \def\romannumeralz#1{% - \ifnum#1>\z@\romannumeral#1\else\number#1\fi% + % \definecolor + \definecolor{colVlnStaffSemiToneToneEven}{gray}{0.98}% + \definecolor{colVlnStaffSemiToneToneOdd}{gray}{1}% + \definecolor{colVlnStaffSemiToneToneFifth}{gray}{0.92}% + \def\@vln@staff@semitone@line@output rank:#1{% + {% + \color{colVlnStaffSemiToneTone#1}% + \hrule depth 0pt height \@vln@staff@semitone@vdim width \@vln@staff@hsize@max% + }% }% -% Moteur - % Constantes - % Couleurs - %\definecolor{colVlnBowU}{rgb}{0.24,0.92,0.24}% - %\definecolor{colVlnBowD}{rgb}{0.80,0,0}% - %\definecolor{colVlnBowU}{rgb}{0.30,0.75,0.75}% + \def\@vln@staff@semitone@five@output{% + \@vln@staff@semitone@line@output rank:{Odd}% + \@vln@staff@tone@vskip% + \@vln@staff@semitone@line@output rank:{Even}% + \@vln@staff@tone@vskip% + \@vln@staff@semitone@line@output rank:{Odd}% + \@vln@staff@tone@vskip% + \@vln@staff@semitone@line@output rank:{Even}% + \@vln@staff@tone@vskip% + \@vln@staff@semitone@line@output rank:{Fifth}% + \@vln@staff@tone@vskip% + }% + \def\@vln@staff@semitone@output{% + \@vln@staff@semitone@line@output rank:{Fifth}\@vln@staff@tone@vskip% + \@vln@staff@semitone@five@output% + \@vln@staff@semitone@five@output% + \@vln@staff@semitone@five@output% + \@vln@staff@semitone@five@output% + \@vln@staff@semitone@five@output% + }% + \newlength% + \@vln@staff@note@hskip% + \@vln@staff@note@hskip=0pt\relax% + \newlength% + \@vln@staff@note@vskip% + \@vln@staff@note@vskip=0pt\relax% + \gdef\@vln@staff@output{% + \nobreak\vskip\@vln@staff@vdim@skip% + \nobreak\vskip\@vln@staff@vdim% + \advance\@vln@staff@skip by\@vln@staff@vdim\relax% + \dimen@=\@vln@staff@skip\relax% + \advance\dimen@ by\@vln@staff@vdim\relax% + \ifnum\dimen@>\@vln@staff@vsize@max% + \@vln@staff@skip=0pt\relax% + \break% + \else% + \advance\@vln@staff@skip by\@vln@staff@interv@skip\relax% + \nobreak\vskip\@vln@staff@interv@skip% + \fi% + \@vln@staff@note@hskip=0pt\relax% + \@vln@staff@vdim=0pt\relax% + \@vln@staff@semitone@output% + \advance\@vln@staff@vdim by\@vln@staff@semitone@vdim% + \nobreak\vskip-\@vln@staff@vdim% + }% + \def\@vln@staff@output@automatic{% + \dimen@=\@vln@staff@note@hskip% + \advance\dimen@ by\@vln@note@hdim\relax% + \ifnum\dimen@>\@vln@staff@hsize@max% + \@vln@staff@output% + \fi% + }% +% \@vln@cord@pitch + \def\@vln@cord@pitch@def#1=#2{% + \expandafter\edef\csname @vln@cord@pitch@#1\endcsname{#2}% + }% + \@vln@cord@pitch@def{0}={0}% G + \@vln@cord@pitch@def{1}={7}% D + \@vln@cord@pitch@def{2}={14}% A + \@vln@cord@pitch@def{3}={21}% E + \def\@vln@cord@pitch@#1{% + \csname @vln@cord@pitch@#1\endcsname% + }% +% \@vln@octave@pitch + \def\@vln@octave@pitch@def#1=#2{% + \expandafter\edef\csname @vln@octave@pitch@#1\endcsname{#2}% + }% + \@vln@octave@pitch@def{G=}={0}% + \@vln@octave@pitch@def{G+}={1}% + \@vln@octave@pitch@def{A-}={1}% + \@vln@octave@pitch@def{A=}={2}% + \@vln@octave@pitch@def{A+}={3}% + \@vln@octave@pitch@def{B-}={3}% + \@vln@octave@pitch@def{B=}={4}% + \@vln@octave@pitch@def{B+}={5}% + \@vln@octave@pitch@def{C-}={4}% + \@vln@octave@pitch@def{C=}={5}% + \@vln@octave@pitch@def{C+}={6}% + \@vln@octave@pitch@def{D-}={6}% + \@vln@octave@pitch@def{D=}={7}% + \@vln@octave@pitch@def{D+}={8}% + \@vln@octave@pitch@def{E-}={8}% + \@vln@octave@pitch@def{E=}={9}% + \@vln@octave@pitch@def{E+}={10}% + \@vln@octave@pitch@def{F-}={9}% + \@vln@octave@pitch@def{F=}={10}% + \@vln@octave@pitch@def{F+}={11}% + \@vln@octave@pitch@def{G-}={11}% + \def\@vln@octave@pitch@#1{% + \csname @vln@octave@pitch@#1\endcsname% + }% +% \@vln@bar + % \@vln@bar@output + \definecolor{colVlnBar}{gray}{.85}% + \def\@vln@bar@font{% + \color{colVlnBar}% + }% + \def\@vln@bar@output{% + \@vln@note@output@{0}% + {}% + {\vbox to0pt{% + \dimen@\@vln@staff@vdim% + \advance\dimen@ by -\@vln@note@vdim\relax% + \advance\dimen@ by -\@vln@note@vdim\relax% + \setbox0=\hbox{{\@vln@bar@font\vrule depth 0pt height \dimen@ width 0.1pt\relax}}% + \nobreak\vskip\@vln@note@vdim\relax% + \dp0=0pt\relax% + \box0}}% + {}% + }% + \def\@vln@bar@def{% + \@vln@item@def{bar}% + }% +% \@vln@cresc + % \@vln@cresc@left + \def\@vln@cresc@left{}% + \def\@vln@cresc@left@def#1{% + \expandafter\edef\csname @vln@cresc@left\endcsname{#1}% + }% + % \@vln@cresc@right + \def\@vln@cresc@right{}% + \def\@vln@cresc@right@def#1{% + \expandafter\edef\csname @vln@cresc@right\endcsname{#1}% + }% + \def\@vln@cresc@def way:#1{% + \@vln@cresc@left@def{\@vln@cresc@right}% + \@vln@cresc@right@def{#1}% + }% +% \@vln@note + % \@vln@note@accidental + \def\@vln@note@accidental@def#1{% + \ifthenelse{\equal{#1}{.}}% + {% + \count@=\@vln@note% + \advance\count@ by -1\relax% + \expandafter\edef\csname @vln@note@accidental@\the\@vln@note\endcsname{% + \@vln@note@accidental@{\the\count@}% + }% + }% + {% + \expandafter\edef\csname @vln@note@accidental@\the\@vln@note\endcsname{#1}% + }% + \@vln@trace{@vln@note@accidental@def}{@vln@note=\the\@vln@note: @vln@note@accidental=\@vln@note@accidental}% + }% + \def\@vln@note@accidental@#1{% + \csname @vln@note@accidental@#1\endcsname% + }% + \def\@vln@note@accidental{% + \csname @vln@note@accidental@\the\@vln@note\endcsname% + }% + % \@vln@note@accidental@output + \def\@vln@note@accidental@output@def #1=#2{% + \expandafter\edef\csname @vln@note@accidental@output@#1\endcsname{#2}% + }% + \@vln@note@accidental@output@def{-}={\kern-0.7pt$\flat$}% + \@vln@note@accidental@output@def{=}={}% + \@vln@note@accidental@output@def{+}={\kern-0.7pt$\sharp$}% + \def\@vln@note@accidental@output{% + \csname @vln@note@accidental@output@\the\@vln@note\endcsname% + }% + % \@vln@note@bow + % \definecolor \definecolor{colVlnBowU}{gray}{0.50}% \definecolor{colVlnBowD}{gray}{0}% \definecolor{colVlnBowN}{gray}{1}% - \definecolor{colVlnBowCord}{rgb}{0,1,0}% - \definecolor{colVlnBowFinger}{rgb}{0,0,0}% - \definecolor{colVlnBowFingerCord0}{rgb}{0,0,0}% - \definecolor{colVlnBowFingerCord1}{rgb}{0,0.66,0}% - \definecolor{colVlnBowFingerCord2}{rgb}{0,0,1}% - \definecolor{colVlnBowFingerCord3}{rgb}{1,0,0}% - \definecolor{colVlnBowName}{rgb}{1,0,0}% - \definecolor{colVlnBowNameOctave0}{rgb}{0,0,0}% - \definecolor{colVlnBowNameOctave1}{rgb}{0,0.66,0}% - \definecolor{colVlnBowNameOctave2}{rgb}{0,0,1}% - \definecolor{colVlnBowNameOctave3}{rgb}{1,0,0}% - \definecolor{colVlnBowNameOctave4}{rgb}{1,1,0}% - \definecolor{colVlnLineHalfToneEven}{gray}{0.98}% - \definecolor{colVlnLineHalfToneOdd}{gray}{1}% - \definecolor{colVlnLineHalfToneFifth}{gray}{0.92}% - \definecolor{colVlnPart}{gray}{0}% - \definecolor{colVlnBar}{gray}{.85}% + \def\@vln@note@bow@def#1{% + \ifthenelse{\equal{#1}{C}}% + {% + \count@=\@vln@note% + \advance\count@ by -1\relax% + \ifthenelse{\equal{\@vln@note@bow@{\the\count@}}{U}}% + {\expandafter\def\csname @vln@note@bow@\the\@vln@note\endcsname{D}}% + {\expandafter\def\csname @vln@note@bow@\the\@vln@note\endcsname{U}}% + }% + {% + \ifthenelse{\equal{#1}{.}}% + {% + \count@=\@vln@note% + \advance\count@ by -1\relax% + \expandafter\edef\csname @vln@note@bow@\the\@vln@note\endcsname% + {\@vln@note@bow@{\the\count@}}% + }% + {% + \expandafter\def\csname @vln@note@bow@\the\@vln@note\endcsname{#1}% + }% + }% + \@vln@trace{@vln@note@bow@def}{@vln@note=\the\@vln@note: @vln@note@bow=\@vln@note@bow}% + }% + \def\@vln@note@bow@#1{% + \csname @vln@note@bow@#1\endcsname% + }% + \def\@vln@note@bow{% + \csname @vln@note@bow@\the\@vln@note\endcsname% + }% + % \@vln@note@bow@output + \def\@vln@note@bow@output{% + \@vln@trace{@vln@note@bow@output}{@vln@note=\the\@vln@note:}% + \@vln@note@output@{\@vln@note@pos}% + {\begingroup\expandafter\color{colVlnBow\@vln@note@bow}}% + {% + \hbox{% + \ifthenelse{\equal{\@vln@note@bow}{N}}% + {}% + {% + \vrule depth 0pt height \@vln@note@vdim width \@vln@note@hdim\relax% + \nobreak\hskip-\@vln@note@hdim\relax% + \@vln@note@cresc@output% + }% + }% + }% + {\endgroup}% + }% + % \@vln@note@chord + \def\@vln@note@chord@def#1{% + \expandafter\edef\csname @vln@note@chord@\the\@vln@note\endcsname{#1}% + }% + \def\@vln@note@chord@#1{% + \csname @vln@note@chord@#1\endcsname% + }% + \def\@vln@note@chord{% + \csname @vln@note@chord@\the\@vln@note\endcsname% + }% + % \@vln@note@chord@output + \def\@vln@note@chord@output{% + \ifthenelse{\equal{\@vln@note@chord}{true}}% + {% + }% + {% + \advance\@vln@staff@note@hskip by\@vln@note@hdim\relax% + }% + }% + % \@vln@note@cord + \def\@vln@note@cord@def#1{% + \ifthenelse{\equal{#1}{.}}% + {% + \count@=\@vln@note% + \advance\count@ by -1\relax% + \expandafter\edef\csname @vln@note@cord@\the\@vln@note\endcsname{% + \@vln@note@cord@{\the\count@}% + }% + }% + {% + \expandafter\edef\csname @vln@note@cord@\the\@vln@note\endcsname{#1}% + }% + \@vln@trace{@vln@note@cord@def}{@vln@note=\the\@vln@note: @vln@note@cord=\@vln@note@cord}% + }% + \def\@vln@note@cord@#1{% + \csname @vln@note@cord@#1\endcsname% + }% + \def\@vln@note@cord{% + \csname @vln@note@cord@\the\@vln@note\endcsname% + }% + \def\@vln@note@cord@pitch{% + \@vln@cord@pitch@{\@vln@note@cord}% + }% + % \@vln@note@cresc + % \@vln@note@cresc@left + \def\@vln@note@cresc@left@def#1{% + \expandafter\edef\csname @vln@note@cresc@left@\the\@vln@note\endcsname{#1}% + }% + \def\@vln@note@cresc@left@#1{% + \csname @vln@note@cresc@left@#1\endcsname% + }% + \def\@vln@note@cresc@left{% + \csname @vln@note@cresc@left@\the\@vln@note\endcsname% + }% + % \@vln@note@cresc@right + \def\@vln@note@cresc@right@def#1{% + \expandafter\edef\csname @vln@note@cresc@right@\the\@vln@note\endcsname{#1}% + }% + \def\@vln@note@cresc@right@#1{% + \csname @vln@note@cresc@right@#1\endcsname% + }% + \def\@vln@note@cresc@right{% + \csname @vln@note@cresc@right@\the\@vln@note\endcsname% + }% + \def\@vln@note@cresc@def{% + \@vln@note@cresc@left@def{\@vln@cresc@left}% + \@vln@note@cresc@right@def{\@vln@cresc@right}% + }% + % \@vln@note@cresc@output \definecolor{colVlnCrescD}{rgb}{0,0.66,0}% \definecolor{colVlnCrescU}{rgb}{1,0,0}% - % Portée - % Déclarations - \newdimen\vlnstaffhalftonelinevdim% - \newskip\vlnstaffvdim% - \def\vlnstaffvdimpre{0pt}% - \newskip\vlnstaffintervskip% - \newskip\vlnstaffvskip% - % Initialisations - \def\vlnstaffhsize{\hsize}% - \def\vlnstaffmaxvsize{\textheight}% - \vlnstaffhalftonelinevdim=3pt% - \vlnstaffvdim=0pt\relax% - \vlnstaffvskip=0pt\relax% - \vlnstaffintervskip=\vlnstaffhalftonelinevdim\relax% - \multiply\vlnstaffintervskip by 2\relax% - \def\vlnstaffhalftoneline#1{% - {\color{colVlnLineHalfTone#1}\hrule depth 0pt height \vlnstaffhalftonelinevdim width \vlnstaffhsize }}% - \def\vlnstafftoneskip{% - \advance\vlnstaffvdim by\vlnstaffhalftonelinevdim% - \nobreak% - }% - \def\vlnstafffivehalftonelines{% - \vlnstaffhalftoneline{Odd}\vlnstafftoneskip% - \vlnstaffhalftoneline{Even}\vlnstafftoneskip% - \vlnstaffhalftoneline{Odd}\vlnstafftoneskip% - \vlnstaffhalftoneline{Even}\vlnstafftoneskip% - \vlnstaffhalftoneline{Fifth}\vlnstafftoneskip% - }% - \def\vlnstaffallhalftonelines{% - \vlnstaffhalftoneline{Fifth}\vlnstafftoneskip% - \vlnstafffivehalftonelines% - \vlnstafffivehalftonelines% - \vlnstafffivehalftonelines% - \vlnstafffivehalftonelines% - \vlnstafffivehalftonelines% - }% - \def\vlnstaff{% - \nobreak\vskip\vlnstaffvdimpre% - \nobreak\vskip\vlnstaffvdim% - \advance\vlnstaffvskip by\vlnstaffvdim\relax% - \count@\vlnstaffvskip\relax% - \advance\count@ by\vlnstaffvdim\relax% - \ifnum\count@>\vlnstaffmaxvsize% - \vlnstaffvskip=0pt\relax% - \break% - \else% - \advance\vlnstaffvskip by\vlnstaffintervskip\relax% - \nobreak\vskip\vlnstaffintervskip% - \fi% - \vlnnotehskip=0pt\relax% - \vlnstaffvdim=0pt\relax% - \vlnstaffallhalftonelines% - \advance\vlnstaffvdim by\vlnstaffhalftonelinevdim% - \nobreak\vskip-\vlnstaffvdim% - }% - % Notes - % Déclarations - % Variables - \newskip\vlnnotevskip% - \newskip\vlnnotehskip% - \newdimen\dimen@% - \newdimen\dimen@@% - \newdimen\vlnnotevdim% - \newdimen\vlnnotevdimmore% - \newdimen\vlnnotehdim% - \newdimen\vlnnotehdimbase% - \newcount\vlncurrfinger% - \newcount\vlncurrposbase% - \newcount\vlncurrposunit% - \newcount\vlncurroctave% - \def\vlncurrletter{}% - \def\vlncurrshift{}% - \newcount\vlnnotepos% - \newcount\vlncurrpos% - \newcount\vlncurrpitch% - \newcount\vlnlastpitch% - \newcount\vlnnote% - \newcount\vlncurrtimes% - \newcount\vlnbow% - \gdef\vlncrescleft{}% - \gdef\vlncrescright{}% - % Initialisations - \vlnnotevskip=0pt\relax% - \vlnnotehskip=0pt\relax% - \vlnnotevdim=\vlnstaffhalftonelinevdim% - \vlnnotevdimmore=1pt\relax% - \vlnnotehdimbase=2cm\relax% - %\advance\vlnnotevdim by\vlnnotevdimmore% - %\advance\vlnnotevdim by\vlnnotevdimmore% - \def\vlncurrbow{}% - \def\vlncurrrealbow{}% - \def\vlncurrcord{}% - \def\vlncurrtimenum{}% - \def\vlncurrtimeden{}% - \def\vlncurrbowwithnext{no}% - \def\vlnnotehdimmodetim{yes}% - \def\vlnnotehdimmodetxt{}% - \parindent=0pt\relax% - \parskip=0pt\relax% - \parfillskip=0pt\relax% - \def\vlncurrposfinger{% - \csname vlncurrposfinger\romannumeralz\vlncurrfinger\endcsname% - }% - \def\vlncurrfingerpos{% - \csname vlncurrfingerpos\romannumeralz\vlncurrpos\endcsname% - }% - %\def\vlncurrposname{% - % \csname vlncurrposname\romannumeralz\vlncurrpos\endcsname% - % }% - \def\vlntimefrac#1/#2{% - \leavevmode% - \hbox{#1}% - \kern-.4ex\lower.3ex\hbox{\bfseries\tiny /}% - \kern-.3ex\lower.6ex\hbox{#2}% - }% - % Graveur - \def\vlndoatnote#1#2#3#4{% - \nointerlineskip% - \vlnnotevskip=0pt\relax% - \advance\vlnnotevskip by\vlnstaffhalftonelinevdim\relax% - \multiply\vlnnotevskip by#1\relax% - \advance\vlnnotevskip by\vlnstaffhalftonelinevdim\relax% - %\advance\vlnnotevskip by-\vlnnotevdimmore\relax% - \nobreak\vskip\vlnnotevskip\relax% - \vrule depth 0pt height 0pt width \vlnnotehskip\relax% - \setbox0=#3% - \advance\vlnnotevskip by \ht0\relax% - #2% - \box0% - #4% - \nobreak\vskip-\vlnnotevskip\relax% - \nointerlineskip% - }% - \def\vlnnotedraw{% - % Durée - \vlnnotehdim0pt% - \ifthenelse{\equal{\vlnnotehdimmodetim}{yes}}{% - \count@0% - \whiledo{\count@<\vlncurrtimes}{% - \dimen@\vlnnotehdimbase% - \multiply\dimen@ by\csname vlncurrtimenum\the\count@\endcsname\relax% - \divide\dimen@ by\csname vlncurrtimeden\the\count@\endcsname\relax% - \advance\vlnnotehdim by\dimen@\relax% - \advance\count@ by 1\relax% - }% - }{% + \def\@vln@note@cresc@output{% + \dimen@=\@vln@note@vdim% + \divide\dimen@ by 3\relax% + \dimen@@=\@vln@note@hdim% + \divide\dimen@@ by 2\relax% + \ifthenelse{\equal{\@vln@note@cresc@left}{}}% + {% + \ifthenelse{\equal{\@vln@note@cresc@right}{}}% + {% }% - % Automatic staff break - \count@\vlnnotehskip\relax% - \advance\count@ by\vlnnotehdim\relax% - \ifnum\count@>\vlnstaffhsize\vlnstaff\fi% - % Explicite - \def\vlnnotehdimmodetxtdo{% - % FIXME: handle \vlncurrtimes - \vbox to0pt{% - \setbox0=\hbox{% - \ifthenelse{\equal{\vlncurrtimeden}{1}}% - {{\vlntimefont{\vlncurrtimenum}}}% - {\vlntimefrac{\vlntimefont{\vlncurrtimenum}}/{\vlntimefont{\vlncurrtimeden}}}% - }% - \nobreak\vskip\vlnnotevdim\relax% - \nobreak\vskip0.2mm\relax% - \nobreak\hskip\vlnnotehdim\relax% - \nobreak\hskip-\wd0\relax% - \dp0=0pt\relax% - \box0% - }% - }% - \ifthenelse{\equal{}{\vlnnotehdimmodetxt}}% - {\null}% - {\vlndoatnote{\vlncurrpos}% - {}% - {\vlnnotehdimmodetxtdo}% - {}% - }% - % Archet - \vlndoatnote{\vlncurrpos}% - {\begingroup\expandafter\color{colVlnBow\vlncurrbow}}% {% - \hbox{% - \ifthenelse{\equal{\vlncurrbow}{N}} - {}% - {% - \vrule depth 0pt height \vlnnotevdim width \vlnnotehdim\relax% - \nobreak\hskip-\vlnnotehdim\relax% - \dimen@\vlnnotevdim% - \divide\dimen@ by3\relax% - \dimen@@\vlnnotehdim% - \divide\dimen@@ by2\relax% - \ifthenelse{\equal{\vlncrescleft}{}}% - {% - \ifthenelse{\equal{\vlncrescright}{}}% - {% - }% - {% - \vrule depth 0pt height 0pt width \dimen@@\relax% - \color{colVlnCresc\vlncrescright}% - \vrule depth 0pt height \dimen@ width \dimen@@\relax% - }% - }% - {% - \ifthenelse{\equal{\vlncrescright}{}}% - {% - \color{colVlnCresc\vlncrescleft}% - \vrule depth 0pt height \dimen@ width \dimen@@\relax% - }% - {% - \color{colVlnCresc\vlncrescleft}% - \vrule depth 0pt height \dimen@ width \dimen@@\relax% - \color{colVlnCresc\vlncrescright}% - \vrule depth 0pt height \dimen@ width \dimen@@\relax% - }% - }% - \global\let\vlncrescleft\vlncrescright% - }% - }% + \vrule depth 0pt height 0pt width \dimen@@\relax% + \color{colVlnCresc\@vln@note@cresc@right}% + \vrule depth 0pt height \dimen@ width \dimen@@\relax% + }% + }% + {% + \ifthenelse{\equal{\@vln@note@cresc@right}{}}% + {% + \color{colVlnCresc\@vln@note@cresc@left}% + \vrule depth 0pt height \dimen@ width \dimen@@\relax% }% - {\endgroup}% - % Cordes - % Doigts - \ifthenelse{\equal{\vlncurrbow}{N}% - % \OR\equal{\the\vlncurrfinger}{\vlncurrfingerpos}% - % \AND\equal{\the\vlncurrpos}{\vlncurrposfinger}% - % \AND\equal{\the\vlncurrcord}{\thevlncurrlastcord}% + {% + \color{colVlnCresc\@vln@note@cresc@left}% + \vrule depth 0pt height \dimen@ width \dimen@@\relax% + \color{colVlnCresc\@vln@note@cresc@right}% + \vrule depth 0pt height \dimen@ width \dimen@@\relax% }% + }% + }% + % \@vln@note@finger + \def\@vln@note@finger@def#1{% + \ifthenelse{\equal{#1}{.}}% + {% + \count@=\@vln@note% + \advance\count@ by -1\relax% + \expandafter\edef\csname @vln@note@finger@\the\@vln@note\endcsname{% + \@vln@note@finger@{\the\count@}% + }% + }% + {% + \expandafter\edef\csname @vln@note@finger@\the\@vln@note\endcsname{#1}% + }% + \@vln@trace{@vln@note@finger@def}{@vln@note=\the\@vln@note: @vln@note@finger=\@vln@note@finger}% + }% + \def\@vln@note@finger@#1{% + \csname @vln@note@finger@#1\endcsname% + }% + \def\@vln@note@finger{% + \csname @vln@note@finger@\the\@vln@note\endcsname% + }% + % \@vln@note@finger@output + %\definecolor{colVlnBowFinger}{rgb}{0,0,0}% + \definecolor{colVlnBowFingerCord0}{rgb}{0,0,0}% + \definecolor{colVlnBowFingerCord1}{rgb}{0,0.66,0}% + \definecolor{colVlnBowFingerCord2}{rgb}{0,0,1}% + \definecolor{colVlnBowFingerCord3}{rgb}{1,0,0}% + \def\@vln@finger@font{% + \expandafter\color{colVlnBowFingerCord\@vln@note@cord}% + \fontfamily{pnc}\bfseries\sssmall% + }% + \def\@vln@note@finger@output{% + \ifthenelse{\equal{\@vln@note@bow}{N}}% + {}% + {% + \@vln@note@output@{\@vln@note@pos}% {}% {% - \expandafter\edef\csname vlncurrfingerpos\romannumeralz\vlncurrpos\endcsname{\the\vlncurrfinger}% - \expandafter\edef\csname vlncurrposfinger\romannumeralz\vlncurrfinger\endcsname{\the\vlncurrpos}% - \vlndoatnote{\vlncurrpos}% - {}% - {\vbox to0pt{% - \setbox0=\hbox{{\vlnfingerfont{\the\vlncurrfinger}}}% - \nobreak\vskip\vlnnotevdim\relax% + \vbox to0pt{% + \setbox0=\hbox{{\@vln@finger@font{\@vln@note@finger}}}% + \nobreak\vskip\@vln@note@vdim\relax% \nobreak\vskip0.2mm\relax% \dp0=0pt\relax% NOTE: to prevent fonts like pnc to mess up the vertical alignment - \box0}}% - {}% + \box0% + }% }% - % Nom - %\expandafter\edef\csname vlncurrposname\romannumeralz\vlncurrpos\endcsname{#5}% - \ifthenelse{\equal{\vlncurrbow}{N}}% + {}% + }% + }% + % \@vln@note@octave + \def\@vln@note@octave@def#1{% + \ifthenelse{\equal{#1}{.}}% + {% + \count@=\@vln@note% + \advance\count@ by -1\relax% + \expandafter\edef\csname @vln@note@octave@\the\@vln@note\endcsname{% + \@vln@note@octave@{\the\count@}% + }% + }% + {% + \expandafter\edef\csname @vln@note@octave@\the\@vln@note\endcsname{#1}% + }% + \@vln@trace{@vln@note@octave@def}{@vln@note=\the\@vln@note: @vln@note@octave=\@vln@note@octave}% + }% + \def\@vln@note@octave@#1{% + \csname @vln@note@octave@#1\endcsname% + }% + \def\@vln@note@octave{% + \csname @vln@note@octave@\the\@vln@note\endcsname% + }% + \def\@vln@note@octave@pitch{% + \expandafter\@vln@octave@pitch@{\@vln@note@semitone}% + }% + % \@vln@note@pitch + \newcount\@vln@note@pitch@count% + \def\@vln@note@pitch@def{% + \@vln@note@pitch@count=\@vln@note@octave% + \multiply\@vln@note@pitch@count by 12\relax% + \advance\@vln@note@pitch@count by\@vln@note@octave@pitch% + \expandafter\edef\csname @vln@note@pitch@\the\@vln@note\endcsname{\the\@vln@note@pitch@count}% + \@vln@trace{@vln@note@pitch@def}{@vln@note=\the\@vln@note: @vln@note@pitch=\@vln@note@pitch}% + }% + \def\@vln@note@pitch@#1{% + \csname @vln@note@pitch@#1\endcsname% + }% + \def\@vln@note@pitch{% + \csname @vln@note@pitch@\the\@vln@note\endcsname% + }% + % \@vln@note@pos + \newcount\@vln@note@pos@count% + \def\@vln@note@pos@def{% + \@vln@note@pos@count=\@vln@note@pitch% + \advance\@vln@note@pos@count by -\@vln@note@cord@pitch% + \expandafter\edef\csname @vln@note@pos@\the\@vln@note\endcsname{\the\@vln@note@pos@count}% + \@vln@trace{@vln@note@pos@def}{@vln@note=\the\@vln@note: @vln@note@pos=\@vln@note@pos}% + }% + \def\@vln@note@pos@#1{% + \csname @vln@note@pos@#1\endcsname% + }% + \def\@vln@note@pos{% + \csname @vln@note@pos@\the\@vln@note\endcsname% + }% + % \@vln@note@semitone + \def\@vln@note@semitone{% + \@vln@note@tone% + \@vln@note@accidental% + }% + % \@vln@note@semitone@output + \definecolor{colVlnOctave0}{rgb}{0,0,0}% + \definecolor{colVlnOctave1}{rgb}{0,0.66,0}% + \definecolor{colVlnOctave2}{rgb}{0,0,1}% + \definecolor{colVlnOctave3}{rgb}{1,0,0}% + \definecolor{colVlnOctave4}{rgb}{1,1,0}% + \def\@vln@note@semitone@font{% + \expandafter\color{colVlnOctave\@vln@note@octave}% + \fontfamily{pnc}\scshape\ssssmall% + }% + \def\@vln@note@semitone@output{% + \ifthenelse{\equal{\@vln@note@bow}{N}}% + {}% + {% + \@vln@note@output@{\@vln@note@pos}% {}% {% - \vlndoatnote{\vlncurrpos}% - {}% - {\vbox to0pt{% - \setbox0=\hbox{{\vlnnamefont{\vlncurrname}}}% + \vbox to0pt{% + \setbox0=\hbox{{\@vln@note@semitone@font{\@vln@note@tone\@vln@note@accidental@output}}}% \nobreak\vskip-0.275mm\relax% \nobreak\vskip-\ht0\relax% %\vskip-\dp0\relax% \dp0=0pt\relax% NOTE: to prevent fonts like pnc to mess up the vertical alignment - \box0}}% - {}% - }% - % Accord - \ifthenelse{\equal{\vlncurrbowwithnext}{yes}}% - {% - }% - { - \advance\vlnnotehskip by\vlnnotehdim\relax% + \box0% + }% }% - \nointerlineskip% - }% - % Cordes - \def\vlncordposi{0}% G - \def\vlncordposii{7}% D - \def\vlncordposiii{14}% A - \def\vlncordposiv{21}% E - % Demi-tons alphabétiques sans modification - \expandafter\def\csname vlnnotetoneofnameG=\endcsname{0}% - \expandafter\def\csname vlnnotetoneofnameG+\endcsname{1}% - \expandafter\def\csname vlnnotetoneofnameA-\endcsname{1}% - \expandafter\def\csname vlnnotetoneofnameA=\endcsname{2}% - \expandafter\def\csname vlnnotetoneofnameA+\endcsname{3}% - \expandafter\def\csname vlnnotetoneofnameB-\endcsname{3}% - \expandafter\def\csname vlnnotetoneofnameB=\endcsname{4}% - \expandafter\def\csname vlnnotetoneofnameB+\endcsname{5}% - \expandafter\def\csname vlnnotetoneofnameC-\endcsname{4}% - \expandafter\def\csname vlnnotetoneofnameC=\endcsname{5}% - \expandafter\def\csname vlnnotetoneofnameC+\endcsname{6}% - \expandafter\def\csname vlnnotetoneofnameD-\endcsname{6}% - \expandafter\def\csname vlnnotetoneofnameD=\endcsname{7}% - \expandafter\def\csname vlnnotetoneofnameD+\endcsname{8}% - \expandafter\def\csname vlnnotetoneofnameE-\endcsname{8}% - \expandafter\def\csname vlnnotetoneofnameE=\endcsname{9}% - \expandafter\def\csname vlnnotetoneofnameE+\endcsname{10}% - \expandafter\def\csname vlnnotetoneofnameF-\endcsname{9}% - \expandafter\def\csname vlnnotetoneofnameF=\endcsname{10}% - \expandafter\def\csname vlnnotetoneofnameF+\endcsname{11}% - \expandafter\def\csname vlnnotetoneofnameG-\endcsname{11}% - % Modifications - \expandafter\def\csname vlnshiftsymbol-\endcsname{\kern-0.7pt$\flat$}% - \expandafter\def\csname vlnshiftsymbol=\endcsname{}% - \expandafter\def\csname vlnshiftsymbol+\endcsname{\kern-0.7pt$\sharp$}% - \def\vlnnotedrawtonebyname#1#2#3#4#5#6#7#8{% - % Octave + {}% + }% + }% + % \@vln@note@time + \def\@vln@note@time@def#1{% + \expandafter\edef\csname @vln@note@time@\the\@vln@note\endcsname{#1}% + \@vln@trace{@vln@note@time@def}{@vln@note=\the\@vln@note: @vln@note@time=\@vln@note@time}% + }% + \def\@vln@note@time@#1{% + \csname @vln@note@time@#1\endcsname% + }% + \def\@vln@note@time{% + \@vln@note@time@{\the\@vln@note}% + }% + % \@vln@note@time@num + \def\@vln@note@time@num@def#1{% \ifthenelse{\equal{#1}{.}}% - {}% - {\vlncurroctave#1\relax}% - % Ton dans l'octave - \ifthenelse{\equal{#2}{.}}% - {}% - {\def\vlncurrletter{#2}}% - \ifthenelse{\equal{#3}{.}}% - {}% - {\def\vlncurrshift{#3}}% - \edef\vlncurrname{% - \vlncurrletter\csname vlnshiftsymbol\vlncurrshift\endcsname% + {% + \ifnum\@vln@note@time=\z@% + \count@=\@vln@note% + \advance\count@ by -1\relax% + \count@@=\@vln@note@time@{\the\count@}% + \advance\count@@ by -1\relax% + \expandafter\edef\csname @vln@note@time@num@\the\@vln@note @\@vln@note@time\endcsname{% + \@vln@note@time@num@@{\the\count@}{\the\count@@}% + }% + \else% + \count@=\@vln@note@time% + \advance\count@ by -1\relax% + \expandafter\edef\csname @vln@note@time@num@\the\@vln@note @\@vln@note@time\endcsname{% + \@vln@note@time@num@{\the\count@}% + }% + \fi% }% - % Position - \edef\vlncurroctavepitch{\csname vlnnotetoneofname\vlncurrletter\vlncurrshift\endcsname}% - \vlnlastpitch\vlncurrpitch% - \vlncurrpitch\vlncurroctavepitch% - \count@\vlncurroctave\relax% - \multiply\count@ by12\relax% - \advance\vlncurrpitch by\count@% - % Corde - \ifthenelse{\equal{#4}{.}}% - {}% - {\def\vlncurrcord{#4}% + {% + \expandafter\edef\csname @vln@note@time@num@\the\@vln@note @\@vln@note@time\endcsname{#1}% }% - \count@\vlncurrcord% - \advance\count@ by1\relax% - \vlncurrpos\vlncurrpitch% - \advance\vlncurrpos by-\csname vlncordpos\romannumeralz\count@\endcsname% - % Doigt - \ifthenelse{\equal{#5}{.}}% - {}% - {\vlncurrfinger#5\relax}% - % Archet - \let\vlnlastlastrealbow\vlnlastrealbow% - \let\vlnlastrealbow\vlncurrrealbow% - \ifthenelse{\equal{#6}{C}}% - {\ifthenelse{\equal{U}{\vlncurrrealbow}}% - {\def\vlncurrbow{D}}% - {\def\vlncurrbow{U}}}% - {\ifthenelse{\equal{#6}{.}}% - {\def\vlncurrbow{\vlncurrrealbow}}% - {\def\vlncurrbow{#6}}}% - \ifthenelse{\equal{\vlncurrbow}{N}}% - {}% - {\edef\vlncurrrealbow{\vlncurrbow}}% - % Durée - \vlncurrtimes0\relax% - \def\@nexttime##1+##2##3{% - \ifthenelse{\equal{##2}{.}}% - {}% - {\def\vlncurrtimenum{##2}}% - \ifthenelse{\equal{##3}{.}}% - {}% - {\def\vlncurrtimeden{##3}}% - \expandafter\edef\csname vlncurrtimenum\the\vlncurrtimes\endcsname{\vlncurrtimenum}% - \expandafter\edef\csname vlncurrtimeden\the\vlncurrtimes\endcsname{\vlncurrtimeden}% - \advance\vlncurrtimes by 1\relax% - \@ifnextchar+{\@nexttime{##1}}{##1}% + \@vln@trace{@vln@note@time@num@def}{@vln@note=\the\@vln@note: @vln@note@time@num@=\@vln@note@time@num@{\@vln@note@time}}% + }% + \def\@vln@note@time@num@@#1#2{% + \csname @vln@note@time@num@#1@#2\endcsname% + }% + \def\@vln@note@time@num@#1{% + \csname @vln@note@time@num@\the\@vln@note @#1\endcsname% + }% + % \@vln@note@time@den + \def\@vln@note@time@den@def#1{% + \ifthenelse{\equal{#1}{.}}% + {% + \ifnum\@vln@note@time=\z@% + \count@=\@vln@note% + \advance\count@ by -1\relax% + \count@@=\@vln@note@time@{\the\count@}% + \advance\count@@ by -1\relax% + \expandafter\edef\csname @vln@note@time@den@\the\@vln@note @\@vln@note@time\endcsname{% + \@vln@note@time@den@@{\the\count@}{\the\count@@}% + }% + \else% + \count@=\@vln@note@time% + \advance\count@ by -1\relax% + \expandafter\edef\csname @vln@note@time@den@\the\@vln@note @\the\count@\endcsname{% + \@vln@note@time@den@{\the\count@}% + }% + \fi% + }% + {% + \expandafter\edef\csname @vln@note@time@den@\the\@vln@note @\@vln@note@time\endcsname{#1}% }% - \def\@nextbow{% - \let\vlncurrbowwithlast\vlncurrbowwithnext% - \@ifnextchar&{% - \def\next&{% - \def\vlncurrbowwithnext{yes}% - \vlnnotelily% - \vlnnotedraw% - \advance\vlnnote by1\relax% + \@vln@trace{@vln@note@time@den@def}{@vln@note=\the\@vln@note: @vln@note@time@den@=\@vln@note@time@den@{\@vln@note@time}}% + }% + \def\@vln@note@time@den@@#1#2{% + \csname @vln@note@time@den@#1@#2\endcsname% + }% + \def\@vln@note@time@den@#1{% + \csname @vln@note@time@den@\the\@vln@note @#1\endcsname% + }% + % \@vln@note@hdim + \def\@vln@note@hdim@unit{2cm}% + \newif% + \if@vln@note@time@hdim@% + \@vln@note@time@hdim@true% + \newcount\@vln@note@hdim@def@loop% + \def\@vln@note@hdim@def{% + \if@vln@note@time@hdim@% + \expandafter\def\csname @vln@note@hdim@\the\@vln@note\endcsname{0pt}% + \@vln@note@hdim@def@loop=0% + \whiledo{\@vln@note@hdim@def@loop<\@vln@note@time}{% + \dimen@=\@vln@note@hdim@unit% + \multiply\dimen@ by\@vln@note@time@num@{\the\@vln@note@hdim@def@loop}\relax% + \divide\dimen@ by\@vln@note@time@den@{\the\@vln@note@hdim@def@loop}\relax% + \advance\dimen@ by\@vln@note@hdim\relax% + \expandafter\edef\csname @vln@note@hdim@\the\@vln@note\endcsname{\the\dimen@}% + \advance\@vln@note@hdim@def@loop by 1\relax% + }% + \else% + \expandafter\edef\csname @vln@note@hdim@\the\@vln@note\endcsname{\@vln@note@hdim@unit}% + \fi% + \@vln@trace{@vln@note@hdim@def}{@vln@note=\the\@vln@note: @vln@note@hdim=\@vln@note@hdim}% + }% + \def\@vln@note@hdim{% + \csname @vln@note@hdim@\the\@vln@note\endcsname% + }% + % \@vln@note@time@output + \newdimen% + \@vln@note@vdim% + \@vln@note@vdim=\@vln@staff@semitone@vdim% + \newif% + \if@vln@note@time@output@% + \@vln@note@time@output@false% + \def\@vln@note@time@font{% + \fontfamily{pnc}\bfseries\ssssmall% + }% + \def\@vln@note@time@frac@output#1/#2{% + \leavevmode% + \hbox{#1}% + \kern-.4ex\lower.3ex\hbox{\bfseries\tiny /}% + \kern-.3ex\lower.6ex\hbox{#2}% + }% + \def\@vln@note@time@output{% + \@vln@trace{@vln@note@time@output}{@vln@note=\the\@vln@note:}% + \if@vln@note@time@output@% + \null% + \else% + \@vln@note@output@{\@vln@note@pos}% + {}% + {% + % FIXME: handle \@vln@note@time + \vbox to0pt{% + \setbox0=\hbox{% + \ifthenelse{\equal{\@vln@note@time@den@0}{1}}% + {{\@vln@note@time@font{\@vln@note@time@num@0}}}% + {\@vln@note@time@frac@output% + {\@vln@note@time@font{\@vln@note@time@num@0}}/% + {\@vln@note@time@font{\@vln@note@time@den@0}}}% + }% + \nobreak\vskip\@vln@note@vdim\relax% + \nobreak\vskip0.2mm\relax% + \nobreak\hskip\@vln@note@hdim\relax% + \nobreak\hskip-\wd0\relax% + \dp0=0pt\relax% + \box0% + }% }% - \next% - }{% - \def\vlncurrbowwithnext{no}% - \advance\vlnbow by1\relax% - \vlnnotelily% - \vlnnotedraw% - \advance\vlnnote by1\relax% + {}% + \fi% + }% + % \@vln@note@tone + \def\@vln@note@tone@def#1{% + \ifthenelse{\equal{#1}{.}}% + {% + \count@=\@vln@note% + \advance\count@ by -1\relax% + \expandafter\edef\csname @vln@note@tone@\the\@vln@note\endcsname{% + \@vln@note@tone@{\the\count@}% }% }% - \@nexttime\@nextbow+{#7}{#8}% + {% + \expandafter\edef\csname @vln@note@tone@\the\@vln@note\endcsname{#1}% + }% + \@vln@trace{@vln@note@tone@def}{@vln@note=\the\@vln@note: @vln@note@tone=\@vln@note@tone}% + }% + \def\@vln@note@tone@#1{% + \csname @vln@note@tone@#1\endcsname% + }% + \def\@vln@note@tone{% + \csname @vln@note@tone@\the\@vln@note\endcsname% + }% + % \@vln@note@output + \def\@vln@note@output@#1#2#3#4{% + \count@=#1% + \@vln@trace{@vln@note@output@}{@vln@note=\the\@vln@note: pos=\the\count@}% + \nointerlineskip% + \@vln@staff@note@vskip=0pt\relax% + \advance\@vln@staff@note@vskip by\@vln@staff@semitone@vdim\relax% + \multiply\@vln@staff@note@vskip by#1\relax% + \advance\@vln@staff@note@vskip by\@vln@staff@semitone@vdim\relax% + \nobreak\vskip\@vln@staff@note@vskip\relax% + \vrule depth 0pt height 0pt width \@vln@staff@note@hskip\relax% + \setbox0=#3% + \advance\@vln@staff@note@vskip by\ht0\relax% + #2% + \box0% + #4% + \nobreak\vskip-\@vln@staff@note@vskip\relax% + \nointerlineskip% + }% + \def\@vln@note@output{% + \@vln@trace{@vln@note@output}{[ @vln@note=\the\@vln@note:}% + \@vln@note@hdim@def% + \@vln@staff@output@automatic% + %\@vln@note@time@output% + \@vln@note@bow@output% + \@vln@note@finger@output% + \@vln@note@semitone@output% + \@vln@note@chord@output% + \nointerlineskip% + \@vln@trace{@vln@note@output}{] @vln@note=\the\@vln@note:}% + }% + \def\@vln@note@def@chord@{% + \@ifnextchar&{% + \@vln@trace{@vln@note@def@chord@}{| @vln@note=\the\@vln@note: chord=yes}% + \def\next&{% + \@vln@note@chord@def{yes}% + \@vln@lily@note@def% + \@vln@item@def type:{note}% + }% + \next% + }{% + \@vln@trace{@vln@note@def@chord@}{| @vln@note=\the\@vln@note: chord=false}% + \@vln@note@chord@def{false}% + \@vln@lily@note@def% + \@vln@item@def type:{note}% + }% + }% + \def\@vln@note@def@time@ tie:#1+#2#3{% + \@vln@trace{@vln@note@def@time@}{| @vln@note=\the\@vln@note: tie=#1+#2#3}% + \@vln@note@time@def{#1}% + \@vln@note@time@num@def{#2}% + \@vln@note@time@den@def{#3}% + \count@=#1\relax% + \advance\count@ by 1\relax% + \@vln@note@time@def{\the\count@}% + \@ifnextchar+% + {\@vln@note@def@time@ tie:\@vln@note@time}% + \@vln@note@def@chord@% + }% + \def\@vln@note@def octave:#1tone:#2accidental:#3cord:#4finger:#5bow:#6time:{% + \@vln@trace{@vln@note@def}{octave=#1 tone=#2 accidental=#3 cord=#4 finger=#5 bow=#6}% + \@vln@note@cresc@def% + \@vln@note@octave@def{#1}% + \@vln@note@tone@def{#2}% + \@vln@trace{@vln@note@def}{BEGIN}% + \@vln@note@accidental@def{#3}% + \@vln@trace{@vln@note@def}{END}% + \@vln@note@cord@def{#4}% + \@vln@note@finger@def{#5}% + \@vln@note@bow@def{#6}% + \@vln@note@pitch@def% + \@vln@note@pos@def% + \@vln@note@def@time@ tie:{0}+% + }% +% \@vln@part + % \@vln@part@text + \def\@vln@part@text@def#1{% + \expandafter\edef\csname @vln@part@text@\the\@vln@part\endcsname{#1}% }% - \def\vlnpart#1{% - \vlndoatnote{0}% + \def\@vln@part@text@#1{% + \csname @vln@part@text@#1\endcsname% + }% + \def\@vln@part@text{% + \@vln@part@text@{\the\@vln@part}% + }% + % \@vln@part@output + \definecolor{colVlnPart}{gray}{0}% + \def\@vln@part@font{% + \color{colVlnPart}% + \fontfamily{pnc}\bfseries\sssmall% + }% + \def\@vln@part@up@output{% + \@vln@note@output@{0}% {}% {\vbox to0pt{% - \setbox0=\hbox{{\vlnpartfont{#1}}}% + \setbox0=\hbox{{\@vln@part@font{\@vln@part@text}}}% \nobreak\vskip-0.3mm\relax% \nobreak\vskip-\ht0\relax% + \nobreak\vskip-\ht0\relax% \dp0=0pt\relax% NOTE: to prevent fonts like pnc to mess up the vertical alignment \box0}}% {}% }% - \def\vlnpartup#1{% - \vlndoatnote{0}% + \def\@vln@part@output{% + \@vln@note@output@{0}% {}% {\vbox to0pt{% - \setbox0=\hbox{{\vlnpartfont{#1}}}% + \setbox0=\hbox{{\@vln@part@font{\@vln@part@text}}}% \nobreak\vskip-0.3mm\relax% \nobreak\vskip-\ht0\relax% - \nobreak\vskip-\ht0\relax% \dp0=0pt\relax% NOTE: to prevent fonts like pnc to mess up the vertical alignment \box0}}% {}% }% - \def\vlnbar{% - \vlndoatnote{0}% - {}% - {\vbox to0pt{% - \dimen@\vlnstaffvdim% - \advance\dimen@ by -\vlnnotevdim\relax% - \advance\dimen@ by -\vlnnotevdim\relax% - \setbox0=\hbox{{\color{colVlnBar}\vrule depth 0pt height \dimen@ width 0.1pt\relax}}% - \nobreak\vskip\vlnnotevdim\relax% - \dp0=0pt\relax% - \box0}}% - {}% + \def\@vln@part@def text:#1{% + \@vln@part@text@def {#1}% + \@vln@item@def type:{part}% + }% +% \@vln@item + \newcount\@vln@item% + % \@vln@item@type + \def\@vln@item@type@def#1{% + \expandafter\edef\csname @vln@item@type@\the\@vln@item\endcsname{#1}% }% - \def\vlncresc#1{% - \global\let\vlncrescleft\vlncrescright% - \xdef\vlncrescright{#1}% - }% - % Lylipond - \def\lily{}% - % input time fraction -> Lilypond dotted duration - \expandafter\def\csname vlnnotelilyofduration1/2\endcsname{2}% - \expandafter\def\csname vlnnotelilyofduration2/2\endcsname{1}% - \expandafter\def\csname vlnnotelilyofduration3/2\endcsname{2.}% - \expandafter\def\csname vlnnotelilyofduration1/4\endcsname{4}% - \expandafter\def\csname vlnnotelilyofduration2/4\endcsname{2}% - \expandafter\def\csname vlnnotelilyofduration3/4\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration4/4\endcsname{1}% - \expandafter\def\csname vlnnotelilyofduration1/8\endcsname{8}% - \expandafter\def\csname vlnnotelilyofduration2/8\endcsname{4}% - \expandafter\def\csname vlnnotelilyofduration3/8\endcsname{4.}% - \expandafter\def\csname vlnnotelilyofduration4/8\endcsname{2}% - \expandafter\def\csname vlnnotelilyofduration5/8\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration6/8\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration7/8\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration8/8\endcsname{1}% - \expandafter\def\csname vlnnotelilyofduration1/12\endcsname{12}% - \expandafter\def\csname vlnnotelilyofduration2/12\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration3/12\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration4/12\endcsname{3}% - \expandafter\def\csname vlnnotelilyofduration5/12\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration6/12\endcsname{2}% - \expandafter\def\csname vlnnotelilyofduration7/12\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration8/12\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration9/12\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration10/12\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration11/12\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration12/12\endcsname{1}% - \expandafter\def\csname vlnnotelilyofduration1/16\endcsname{16}% - \expandafter\def\csname vlnnotelilyofduration2/16\endcsname{8}% - \expandafter\def\csname vlnnotelilyofduration3/16\endcsname{8.}% - \expandafter\def\csname vlnnotelilyofduration4/16\endcsname{4}% - \expandafter\def\csname vlnnotelilyofduration5/16\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration6/16\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration7/16\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration8/16\endcsname{2}% - \expandafter\def\csname vlnnotelilyofduration9/16\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration10/16\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration11/16\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration12/16\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration13/16\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration14/16\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration15/16\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration16/16\endcsname{1}% - \expandafter\def\csname vlnnotelilyofduration1/32\endcsname{32}% - \expandafter\def\csname vlnnotelilyofduration2/32\endcsname{16}% - \expandafter\def\csname vlnnotelilyofduration3/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration4/32\endcsname{8}% - \expandafter\def\csname vlnnotelilyofduration5/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration6/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration7/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration8/32\endcsname{4}% - \expandafter\def\csname vlnnotelilyofduration9/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration10/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration11/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration12/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration13/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration14/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration15/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration16/32\endcsname{2}% - \expandafter\def\csname vlnnotelilyofduration17/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration18/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration19/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration20/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration21/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration22/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration23/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration24/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration25/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration26/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration27/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration28/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration29/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration30/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration31/32\endcsname{???}% - \expandafter\def\csname vlnnotelilyofduration32/32\endcsname{1}% - % input octave -> Lilypond octave - \expandafter\def\csname vlnnotelilyofoctave0\endcsname{}% - \expandafter\def\csname vlnnotelilyofoctave1\endcsname{'}% - \expandafter\def\csname vlnnotelilyofoctave2\endcsname{''}% - \expandafter\def\csname vlnnotelilyofoctave3\endcsname{'''}% - % input name -> Lilypond name - \expandafter\def\csname vlnnotelilyofnameG=\endcsname{g}% - \expandafter\def\csname vlnnotelilyofnameG+\endcsname{gis}% - \expandafter\def\csname vlnnotelilyofnameA-\endcsname{aes}% - \expandafter\def\csname vlnnotelilyofnameA=\endcsname{a}% - \expandafter\def\csname vlnnotelilyofnameA+\endcsname{ais}% - \expandafter\def\csname vlnnotelilyofnameB-\endcsname{bes}% - \expandafter\def\csname vlnnotelilyofnameB=\endcsname{b}% - \expandafter\def\csname vlnnotelilyofnameB+\endcsname{bis}% - \expandafter\def\csname vlnnotelilyofnameC-\endcsname{ces}% - \expandafter\def\csname vlnnotelilyofnameC=\endcsname{c}% - \expandafter\def\csname vlnnotelilyofnameC+\endcsname{cis}% - \expandafter\def\csname vlnnotelilyofnameD-\endcsname{des}% - \expandafter\def\csname vlnnotelilyofnameD=\endcsname{d}% - \expandafter\def\csname vlnnotelilyofnameD+\endcsname{dis}% - \expandafter\def\csname vlnnotelilyofnameE-\endcsname{ees}% - \expandafter\def\csname vlnnotelilyofnameE=\endcsname{e}% - \expandafter\def\csname vlnnotelilyofnameE+\endcsname{eis}% - \expandafter\def\csname vlnnotelilyofnameF-\endcsname{fes}% - \expandafter\def\csname vlnnotelilyofnameF=\endcsname{f}% - \expandafter\def\csname vlnnotelilyofnameF+\endcsname{fis}% - \expandafter\def\csname vlnnotelilyofnameG-\endcsname{ges}% - \def\lilywrite{% - \newwrite\lilyfile% - \immediate\openout\lilyfile=out.ly% - \immediate\write\lilyfile{\lily}% - \immediate\closeout\lilyfile% - }% - \def\vlnlilyaddnote#1{% - \expandafter\xdef\csname lilynote\the\vlnnote\endcsname{#1}% - } - \def\vlnlilyflush{% - \count@0% - \ifthenelse{\equal{\the\vlnlilyslurbegin}{0}}% - {% + \def\@vln@item@type@#1{% + \csname @vln@item@type@#1\endcsname% + }% + \def\@vln@item@type{% + \csname @vln@item@type@\the\@vln@item\endcsname% + }% + \def\@vln@item@types{% + bar,% + note,% + part% + }% + \def\@vln@item@def type:#1{% + \@vln@trace{@vln@item@def}{[ type=#1}% + \@vln@item@type@def{#1}% + \@vln@trace{@vln@item@def}{| @vln@item@type@{\the\@vln@item} = \@vln@item@type@{\the\@vln@item}}% + \expandafter\advance% + \csname @vln@\@vln@item@type@{\the\@vln@item}\endcsname% + by 1\relax% + \@vln@trace{@vln@item@def}{| @vln@\@vln@item@type@{\the\@vln@item} = \the\csname @vln@\@vln@item@type@{\the\@vln@item}\endcsname}% + \advance\@vln@item by 1\relax% + \@vln@trace{@vln@item@def}{]}% + }% + \@for\@type:=\@vln@item@types\do{% + \expandafter\newcount\csname @vln@\@type\endcsname% + }% + \newcount\@vln@item@output@loop% + \def\@vln@item@output{% + \@vln@item@output@loop=0% + \@for\@type:=\@vln@item@types\do{% + \csname @vln@\@type\endcsname=0% + }% + \whiledo{\@vln@item@output@loop<\@vln@item}{% + \csname @vln@\@vln@item@type@{\the\@vln@item@output@loop}@output\endcsname% + \expandafter\advance% + \csname @vln@\@vln@item@type@{\the\@vln@item@output@loop}\endcsname% + by 1\relax% + \advance\@vln@item@output@loop by 1\relax% + }% + }% +% \@vln@lily + % \@vln@lily@output + \def\@vln@lily@output{}% + \newcount\@vln@lily@output@loop% + \def\@vln@lily@output@flush{% + \@vln@trace{@vln@lily@output@flush}{}% + %\ifthenelse{\equal{\@vln@lily@slur@begin}{}}% + % {% + % }% + % {% + % \@vln@lily@note@def@{\@vln@lily@slur@begin}={\@vln@lily@note@{\@vln@lily@slur@begin}(}% + % \count@=\@vln@note% + % \advance\count@ by -1\relax% + % \@vln@lily@note@def@{\the\count@}={)\@vln@lily@note@{\the\count@}}% + % \def\@vln@lily@slur@begin{}% + % }% + %\ifthenelse{\equal{\@vln@lily@note@time}{}}% + % {% + % }% + % {% + % \count@=\@vln@note% + % \advance\count@ by -1\relax% + % \@vln@lily@note@def@{\the\count@}={\@vln@lily@note\textcurlybraceclose}% + % }% + \@vln@lily@output@loop=0% + \whiledo{\@vln@lily@output@loop<\@vln@note}{% + \edef\@vln@lily@output{% + \@vln@lily@output% + \@vln@lily@note@output@{\the\@vln@lily@output@loop}% + ^^J% }% + \advance\@vln@lily@output@loop by 1\relax% + }% + }% + \def\@vln@lily@output@write{% + \newwrite\@vln@lily@output@file% + \immediate\openout\@vln@lily@output@file=out.ly% + \immediate\write\@vln@lily@output@file{\@vln@lily@output}% + \immediate\closeout\@vln@lily@output@file% + }% + \def\@vln@lily@output@write@verbatim{% + \@bsphack% + \let\do\@makeother\dospecials% + \catcode`\^^M\active \catcode`\^^I=12% + \def\verbatim@processline{% + \xdef\@vln@lily@output{\@vln@lily@output\the\verbatim@line^^J}% + }% + \verbatim@start% + }% + \def\end@vln@lily@output@write@verbatim{% + \@esphack% + }% + % \@vln@lily@time + \def\@vln@lily@time@def#1/#2=#3#4{% + \expandafter\def\csname @vln@lily@time@times@#1/#2\endcsname{#3}% + \expandafter\def\csname @vln@lily@time@wholedotted@#1/#2\endcsname{#4}% + }% + % FIXME: à compléter.. + \@vln@lily@time@def 1/2={}{2}% + \@vln@lily@time@def 2/2={}{1}% + \@vln@lily@time@def 3/2={}{2.}% + \@vln@lily@time@def 1/4={}{4}% + \@vln@lily@time@def 2/4={}{2}% + \@vln@lily@time@def 3/4={}{???}% + \@vln@lily@time@def 4/4={}{1}% + \@vln@lily@time@def 1/8={}{8}% + \@vln@lily@time@def 2/8={}{4}% + \@vln@lily@time@def 3/8={}{4.}% + \@vln@lily@time@def 4/8={}{2}% + \@vln@lily@time@def 5/8={}{???}% + \@vln@lily@time@def 6/8={}{2.}% + \@vln@lily@time@def 7/8={}{???}% + \@vln@lily@time@def 8/8={}{1}% + \@vln@lily@time@def 1/12={2/3}{8}% + \@vln@lily@time@def 2/12={}{???}% + \@vln@lily@time@def 3/12={}{???}% + \@vln@lily@time@def 4/12={}{3}% + \@vln@lily@time@def 5/12={}{???}% + \@vln@lily@time@def 6/12={}{2}% + \@vln@lily@time@def 7/12={}{???}% + \@vln@lily@time@def 8/12={}{???}% + \@vln@lily@time@def 9/12={}{???}% + \@vln@lily@time@def 10/12={}{???}% + \@vln@lily@time@def 11/12={}{???}% + \@vln@lily@time@def 12/12={}{1}% + \@vln@lily@time@def 1/16={}{16}% + \@vln@lily@time@def 2/16={}{8}% + \@vln@lily@time@def 3/16={}{8.}% + \@vln@lily@time@def 4/16={}{4}% + \@vln@lily@time@def 5/16={}{???}% + \@vln@lily@time@def 6/16={}{???}% + \@vln@lily@time@def 7/16={}{???}% + \@vln@lily@time@def 8/16={}{2}% + \@vln@lily@time@def 9/16={}{???}% + \@vln@lily@time@def 10/16={}{???}% + \@vln@lily@time@def 11/16={}{???}% + \@vln@lily@time@def 12/16={}{???}% + \@vln@lily@time@def 13/16={}{???}% + \@vln@lily@time@def 14/16={}{???}% + \@vln@lily@time@def 15/16={}{???}% + \@vln@lily@time@def 16/16={}{1}% + \@vln@lily@time@def 1/32={}{32}% + \@vln@lily@time@def 2/32={}{16}% + \@vln@lily@time@def 3/32={}{???}% + \@vln@lily@time@def 4/32={}{8}% + \@vln@lily@time@def 5/32={}{???}% + \@vln@lily@time@def 6/32={}{???}% + \@vln@lily@time@def 7/32={}{???}% + \@vln@lily@time@def 8/32={}{4}% + \@vln@lily@time@def 9/32={}{???}% + \@vln@lily@time@def 10/32={}{???}% + \@vln@lily@time@def 11/32={}{???}% + \@vln@lily@time@def 12/32={}{???}% + \@vln@lily@time@def 13/32={}{???}% + \@vln@lily@time@def 14/32={}{???}% + \@vln@lily@time@def 15/32={}{???}% + \@vln@lily@time@def 16/32={}{2}% + \@vln@lily@time@def 17/32={}{???}% + \@vln@lily@time@def 18/32={}{???}% + \@vln@lily@time@def 19/32={}{???}% + \@vln@lily@time@def 20/32={}{???}% + \@vln@lily@time@def 21/32={}{???}% + \@vln@lily@time@def 22/32={}{???}% + \@vln@lily@time@def 23/32={}{???}% + \@vln@lily@time@def 24/32={}{???}% + \@vln@lily@time@def 25/32={}{???}% + \@vln@lily@time@def 26/32={}{???}% + \@vln@lily@time@def 27/32={}{???}% + \@vln@lily@time@def 28/32={}{???}% + \@vln@lily@time@def 29/32={}{???}% + \@vln@lily@time@def 30/32={}{???}% + \@vln@lily@time@def 31/32={}{???}% + \@vln@lily@time@def 32/32={}{1}% + \def\@vln@lily@time@times@#1/#2{% + \csname @vln@lily@time@times@#1/#2\endcsname% + }% + \def\@vln@lily@time@wholedotted@#1/#2{% + \csname @vln@lily@time@wholedotted@#1/#2\endcsname% + }% + \def\@vln@lily@time@#1/#2{% + \ifthenelse{\equal{\@vln@lily@time@times@#1/#2}{}}% + {% + % + }% + {% + % + }% + }% + % \@vln@lily@octave + \def\@vln@lily@octave@def#1=#2{% + \expandafter\def\csname @vln@lily@octave@#1\endcsname{#2}% + }% + \def\@vln@lily@octave@#1{% + \csname @vln@lily@octave@#1\endcsname% + }% + \@vln@lily@octave@def{0}={}% + \@vln@lily@octave@def{1}={'}% + \@vln@lily@octave@def{2}={''}% + \@vln@lily@octave@def{3}={'''}% + % \@vln@lily@semitone + \def\@vln@lily@semitone@def#1=#2{% + \expandafter\def\csname @vln@lily@semitone@#1\endcsname{#2}% + }% + \@vln@lily@semitone@def{G=}={g}% + \@vln@lily@semitone@def{G+}={gis}% + \@vln@lily@semitone@def{A-}={aes}% + \@vln@lily@semitone@def{A=}={a}% + \@vln@lily@semitone@def{A+}={ais}% + \@vln@lily@semitone@def{B-}={bes}% + \@vln@lily@semitone@def{B=}={b}% + \@vln@lily@semitone@def{B+}={bis}% + \@vln@lily@semitone@def{C-}={ces}% + \@vln@lily@semitone@def{C=}={c}% + \@vln@lily@semitone@def{C+}={cis}% + \@vln@lily@semitone@def{D-}={des}% + \@vln@lily@semitone@def{D=}={d}% + \@vln@lily@semitone@def{D+}={dis}% + \@vln@lily@semitone@def{E-}={ees}% + \@vln@lily@semitone@def{E=}={e}% + \@vln@lily@semitone@def{E+}={eis}% + \@vln@lily@semitone@def{F-}={fes}% + \@vln@lily@semitone@def{F=}={f}% + \@vln@lily@semitone@def{F+}={fis}% + \@vln@lily@semitone@def{G-}={ges}% + \def\@vln@lily@semitone@#1{% + \csname @vln@lily@semitone@#1\endcsname% + }% + % \@vln@lily@note + % \@vln@lily@note@name + \def\@vln@lily@note@name@def{% + \ifthenelse{\equal{\@vln@note@bow}{N}}% {% - \advance\vlnlilyslurbegin by-1\relax% - \expandafter\xdef\csname lilynote\the\vlnlilyslurbegin\endcsname{\csname lilynote\the\vlnlilyslurbegin\endcsname(}% - \advance\vlnnote by-1\relax% - \expandafter\xdef\csname lilynote\the\vlnnote\endcsname{)\csname lilynote\the\vlnnote\endcsname}% - \advance\vlnnote by1\relax% - \vlnlilyslurbegin=0% + \expandafter\edef\csname @vln@lily@note@name@\the\@vln@note\endcsname{r}% }% - \whiledo{\count@<\vlnnote}{% - \edef\lily{\lily\csname lilynote\the\count@\endcsname^^J}% - \advance\count@ by1\relax% + {% + \expandafter\edef\csname @vln@lily@note@name@\the\@vln@note\endcsname{\@vln@lily@semitone@{\@vln@note@semitone}}% }% }% - \def\vlnlilywriteverbatim{% - \@bsphack% - \let\do\@makeother\dospecials% - \catcode`\^^M\active \catcode`\^^I=12% - \def\verbatim@processline{% - \xdef\lily{\lily\the\verbatim@line^^J}% + \def\@vln@lily@note@name@#1{% + \csname @vln@lily@note@name@#1\endcsname% + }% + \def\@vln@lily@note@name{% + \csname @vln@lily@note@name@\the\@vln@note\endcsname% + }% + % \@vln@lily@note@octave + \def\@vln@lily@note@octave@def{% + \ifthenelse{\equal{\@vln@note@bow}{N}}% + {% + \expandafter\edef\csname @vln@lily@note@octave@\the\@vln@note\endcsname{}% }% - \verbatim@start% - }% - \def\endvlnlilywriteverbatim{% - \@esphack% - }% - \newcount\vlnlilyslurbegin% - \vlnlilyslurbegin=0% - \def\vlnlilyslurend{}% - \def\vlnnotelily{% - \count@=\vlncurrpitch\relax% - \advance\count@ by8% - \divide\count@ by12% - \edef\vlnlilyoctave{\csname vlnnotelilyofoctave\the\count@\endcsname}% - \ifthenelse{\equal{\vlncurrbow}{N}}% - {% - \edef\vlnlilyname{r}% - \edef\vlnlilyoctave{}% - }% - {% - \edef\vlnlilyname{\csname vlnnotelilyofname\vlncurrletter\vlncurrshift\endcsname}% - }% - \edef\text@{\csname vlncurrtimenum0\endcsname/\csname vlncurrtimeden0\endcsname}% - \edef\vlnlilyduration{\csname vlnnotelilyofduration\text@\endcsname}% - \count@1% - \whiledo{\count@<\vlncurrtimes}{% - \edef\text@{\csname vlncurrtimenum\the\count@\endcsname/\csname vlncurrtimeden\the\count@\endcsname}% - \edef\vlnlilyduration{% - \vlnlilyduration\string~\vlnlilyname\vlnlilyoctave\csname vlnnotelilyofduration\text@\endcsname% - }% - \advance\count@ by 1\relax% + {% + \count@=\@vln@note@pitch\relax% + \advance\count@ by 7\relax% + \divide\count@ by 12\relax% + \expandafter\edef\csname @vln@lily@note@octave@\the\@vln@note\endcsname{\@vln@lily@octave@{\the\count@}}% }% - % Phrasé - \def\vlnlilytie{}%yes - \def\vlnlilyslurend{}% - \ifthenelse{\equal{\vlncurrrealbow}{\vlnlastrealbow}}% + \@vln@trace{@vln@lily@note@octave@def}{@vln@note=\the\@vln@note: @vln@lily@note@octave=\@vln@lily@note@octave}% + }% + \def\@vln@lily@note@octave@#1{% + \csname @vln@lily@note@octave@#1\endcsname% + }% + \def\@vln@lily@note@octave{% + \csname @vln@lily@note@octave@\the\@vln@note\endcsname% + }% + % \@vln@lily@note@slur + \def\@vln@lily@slur@begin{}% + \def\@vln@lily@slur@end{}% + \def\@vln@lily@note@slur@def{% + \def\@vln@lily@slur@end{}% + \count@=\@vln@note% + \advance\count@ by -1\relax% + \ifthenelse{\equal{\@vln@note@bow}{\@vln@note@bow@{\the\count@}}}% + {% + \count@=\@vln@note% + \advance\count@ by -1\relax% + \ifthenelse{\equal{\@vln@note@chord@{\the\count@}}{true}}% {% - \ifthenelse{\equal{\vlncurrbowwithlast}{yes}}% - {% - }% - {% - \ifthenelse{\equal{\the\vlnlilyslurbegin}{0}}% - {% - \vlnlilyslurbegin\vlnnote% - }% - {% - }% - }% }% {% - \ifthenelse{\equal{\the\vlnlilyslurbegin}{0}}% + \ifthenelse{\equal{\@vln@lily@slur@begin}{}}% {% + \edef\@vln@lily@slur@begin{\the\@vln@note}% }% {% - \advance\vlnlilyslurbegin by-1\relax% - \expandafter\xdef\csname lilynote\the\vlnlilyslurbegin\endcsname{\csname lilynote\the\vlnlilyslurbegin\endcsname(}% - \vlnlilyslurbegin=0% - \def\vlnlilyslurend{)}% }% }% - %\ifthenelse{\equal{\the\vlncurrpitch}{\the\vlnlastpitch}}% - %\edef\vlnlilytie{\string~ }% - %\edef\vlnlilytie{} - %\csname lilynote\the\vlnlilyslurbegin\endcsname% - %\expandafter\def\csname lilynote\the\vlnlilyslurbegin\endcsname{#1}% - %\ifthenelse{\equal{\vlnlilyslurbegin}{}}% - % {\edef\vlnlilyslurend{}}% - % {\edef\vlnlilyslurend{)}}% - %\edef\vlnlilyslurbegin{} - % Accord - \ifthenelse{\equal{\vlncurrbowwithnext}{yes}}% + }% + {% + \ifthenelse{\equal{\@vln@lily@slur@begin}{}}% {% - \ifthenelse{\equal{\vlncurrbowwithlast}{yes}}% - {% - \vlnlilyaddnote{% - \space% - \vlnlilyname% - \vlnlilyoctave% - }% - }% - {% - \vlnlilyaddnote{% - \vlnlilytie% - \vlnlilyslurend% - <\vlnlilyname% - \vlnlilyoctave% - }% - }% }% {% - \ifthenelse{\equal{\vlncurrbowwithlast}{yes}}% - {% - \vlnlilyaddnote{% - \space% - \vlnlilyname% - \vlnlilyoctave% - >% - \vlnlilyduration% - }% - %\vlncurrtimeden*\vlncurrtimenum% - }% - {% - \vlnlilyaddnote{% - \vlnlilyslurend% - \vlnlilyname% - \vlnlilyoctave% - \vlnlilyduration% - }% - %\vlncurrtimeden*\vlncurrtimenum% - }% + \@vln@lily@note@def@{\@vln@lily@note@slur@begin}=% + {\@vln@lily@note@{\@vln@lily@note@slur@begin}(}% ) + \edef\@vln@lily@slur@begin{0}% + \def\@vln@lily@slur@end{}% + }% + }% + }% + % \@vln@lily@note@time + \newcount\@vln@lily@note@time@loop% + \def\@vln@lily@note@time@def{% + \expandafter\edef\csname @vln@lily@time@begin@\the\@vln@note\endcsname{% + % + }% + \@vln@lily@note@time@loop=0% + \expandafter\edef\csname @vln@lily@time@end@\the\@vln@note\endcsname{}% + \whiledo{\@vln@lily@note@time@loop<\@vln@note@time}{% + \edef\text@{% + \@vln@note@time@num@{\the\@vln@lily@note@time@loop}% + /% + \@vln@note@time@den@{\the\@vln@lily@note@time@loop}% + }% + \expandafter\edef\csname @vln@lily@time@end@\the\@vln@note\endcsname{% + \string~\csname @vln@lily@time@end@\the\@vln@note\endcsname% + %\expandafter\@vln@lily@time@times@\text@% + \@vln@lily@note@name\@vln@lily@note@octave% + \expandafter\@vln@lily@time@wholedotted@\text@% + }% + \advance\@vln@lily@note@time@loop by 1\relax% + }% + }% + \def\@vln@lily@note@def{% + \@vln@trace{@vln@lily@note@def}{}% + \@vln@lily@note@name@def% + \@vln@lily@note@octave@def% + \@vln@lily@note@time@def% + %\@vln@lily@note@slur@def% + \@vln@lily@note@output@def% + }% + % \@vln@lily@note@output + \def\@vln@lily@note@output@def{% + \ifthenelse{\equal{\@vln@note@chord}{true}}% + {% + \count@=\@vln@note% + \advance\count@ by -1\relax% + \ifthenelse{\equal{\@vln@note@chord@{\the\count@}}{true}}% + {% + \expandafter\edef\csname @vln@lily@note@output@\the\@vln@note\endcsname{% + \space% + \@vln@lily@note@name% + \@vln@lily@note@octave% + }% + }% + {% + \expandafter\edef\csname @vln@lily@note@output@\the\@vln@note\endcsname{% + %\@vln@lily@slur@end% + %\@vln@lily@note@time@begin% + <\@vln@lily@note@name% + \@vln@lily@note@octave% + }% + }% + }% + {% + \count@=\@vln@note% + \advance\count@ by -1\relax% + \ifthenelse{\equal{\@vln@note@chord@{\the\count@}}{true}}% + {% + \expandafter\edef\csname @vln@lily@note@output@\the\@vln@note\endcsname{% + \space% + \@vln@lily@note@name% + \@vln@lily@note@octave% + >% + %\@vln@lily@note@time@end% + }% + }% + {% + \expandafter\edef\csname @vln@lily@note@output@\the\@vln@note\endcsname{% + %\@vln@lily@slur@end% + %\@vln@lily@note@time@begin% + \@vln@lily@note@name% + \@vln@lily@note@octave% + %\@vln@lily@note@time@end% }% + }% }% + \@vln@trace{@vln@lily@note@output@def}{\@vln@lily@note@output}% + }% + \def\@vln@lily@note@output@#1{% + \csname @vln@lily@note@output@#1\endcsname% + }% + \def\@vln@lily@note@output{% + \csname @vln@lily@note@output@\the\@vln@note\endcsname% + }% +% Aliases + \def\n#1#2#3#4#5#6{% + \@vln@note@def octave:{#1}tone:{#2}accidental:{#3}cord:{#4}finger:{#5}bow:{#6}time:% + }% + \def\bar{% + \@vln@bar@def% + }% + \def\c#1{% + \@vln@cresc@def way:{#1}% + }% + \def\p#1{% + \@vln@part@def text:{#1}% + }% + \def\lilyflush{\@vln@lily@output@flush}% + \def\lilywrite{\@vln@lily@output@write}% + + + + + + %\edef\text@{\csname vlncurrtimenum0\endcsname/\csname vlncurrtimeden0\endcsname}% + %\@latex@info{TRACE: vlnlilyduration: text@=\text@}% + %% @begin + % \let\vlnlilyduration@times@last\vlnlilyduration@times% + % \edef\vlnlilyduration@times{% + % \csname vlnlilyduration\text@ @times\endcsname% + % }% + % \ifthenelse{\equal{\vlnlilyduration@times}{}}% + % {% + % \ifthenelse{\equal{\vlnlilyduration@times@last}{}}% + % {% + % \edef\vlnlilyduration@begin{% + % }% + % }% + % {% + % \edef\vlnlilyduration@begin{% + % \textcurlybraceclose% + % }% + % }% + % }% + % {% + % \ifthenelse{\equal{\vlnlilyduration@times}{\vlnlilyduration@times@last}}% + % {% + % \edef\vlnlilyduration@begin{% + % }% + % }% + % {% + % \ifthenelse{\equal{\vlnlilyduration@times@last}{}}% + % {% + % \edef\vlnlilyduration@begin{% + % \times \vlnlilyduration@times \textcurlybraceopen% + % }% + % }% + % {% + % \edef\vlnlilyduration@begin{% + % \textcurlybraceclose \times \vlnlilydurationtimes \textcurlybraceopen% + % }% + % }% + % }% + % }% + %% @end + % \let\vlnlilyduration@wholedotted@last\vlnlilyduration@wholedotted% + % \edef\vlnlilyduration@wholedotted{% + % \csname vlnlilyduration\text@ @wholedotted\endcsname% + % }% + % \ifthenelse{\equal{\vlnlilyduration@wholedotted}{\vlnlilyduration@wholedotted@last}}% + % {% + % \edef\vlnlilyduration@end{% + % }% + % }% + % {% + % \edef\vlnlilyduration@end{% + % \vlnlilyduration@wholedotted% + % }% + % }% + %\@latex@info{TRACE: vlnlilyduration: @times=\vlnlilyduration@times}% + %\@latex@info{TRACE: vlnlilyduration: @wholedotted=\vlnlilyduration@wholedotted}% + %\@latex@info{TRACE: vlnlilyduration: @begin=\vlnlilyduration@begin}% + %\@latex@info{TRACE: vlnlilyduration: @end=\vlnlilyduration@end}% + % Phrasé + % Accord