Hi all,

For my tabulature extensions of MusiXTeX, I'm trying to hack some code.
First of all, I'd like to know if the code below is acceptable.
My problem is the \edef line. This is taken from musixtex.tex and by
using it in my tabdefs.tex, I can redifine \writ@colons. This may cause
erratic behaviour (I don't know). Redefining \writ@colons is necessary
(IMO) when multiple staffs are used, one of which is tabulature.


%%%%%%%%%%%%
% START CODE
% \settab n gives instrument n to tabulature staffs
\newcount\tabinstrument
\def\settab#1{%
  \tabinstrument=1%
  \setlines#1 6%
  \setclefsymbol#1\tabclef%
}

% \edef is needed to be able to redefine \writ@colons from musixtex.tex
\edef\catcodeat{\the\catcode`\@}\catcode`\@=11
\def\writ@colons{\n@loop{%
  \ifnum\noinstrum@nt=\tabinstrument\tabcoli%
  \else\w@coli\fi}\repeat%
}

\def\tabcoli{\p@loop\raise\altportee\hbox{%
  \raise5.2\internote\hbox{\musixchar'30}%
  \raise1.2\internote\hbox{\musixchar'30\addspace{\internote}}% 
  }\count@portee\repeat%
}
% END CODE
%%%%%%%%%%

My second question is about the behaviour of the above code. 
The code generates a \rightrepeat colon with large spacing for the
tabulature staffs (note the six staff lines):
  -------------------| ||
                     | ||
  -------------------| ||
                   . | ||
  -------------------| ||
                     | ||
  -------------------| ||
                   . | ||
  -------------------| ||
                     | ||
  -------------------| ||

If I have only one instrument, the dots of the colon are placed slightly 
too high (not centered between the stafflines). However, when I have 
two instruments, one of which has a tabulature staff, the dots are placed
slightly too low! Is this inconsistent behaviour of \raise, or does
anyone know other possibilities?

Thanks in advance,
Ronald

PS: the testcode that I used was:
\hsize=50mm
\settab 1
\nobarnumbers
\startpiece
  \Notes\tab60\tab17\tab20\tab37\tab17\tab20\tab37\tab40\en
  \setrightrepeat
\endpiece

\instrumentnumber{2}
\settab 1
\startpiece
  \Notes\tab60\tab17\tab20\tab37\tab17\tab20\tab37\tab40%
     &\ibu0m0\qb0 {`d}\qb0 {'o}\qb0 h\tbu0\qb0 k%
      \ibu0m0\qb0 o\qb0 h\qb0 k\tbu0\qb0 d\en
\setrightrepeat
\endpiece


-- 
Eindhoven University of Technology | tel: +31 40 2473575
e-mail: [EMAIL PROTECTED]         | fax: +31 40 2455054
http://www.tak.chem.tue.nl/personal/rgelten/
"Trust me, I'm a doctor!" - S.P. Bates, Ph.D.

Reply via email to