[texhax] re-defining \vnotes in musixtex
Bob Tennent
rdt at cs.queensu.ca
Tue Jan 6 14:11:11 CET 2015
It is possible to re-define the basic \vontes macro in
musixtex to achieve various effects.
For example,
\def\vnotes#1\elemskip#2\en
{\noteskip#1\@l at mskip\@vnotes#3\enotes}
produces a single-instrument part from a two-instrument score,
\def\vnotes#1\elemskip#2\en
{\noteskip#1\@l at mskip\@vnotes#2&\transpose+7#3\enotes}
transposes the second instrument an octave higher, and
\def\vnotes#1\elemskip#2\en
{\noteskip#1\@l at mskip\@vnotes#3\enotes}
will switch the order of the two instruments. These all
have to be used within \makeatletter ... \makeatother
brackets.
I'd like to provide a user-friendly "front end" so that
users could write
\transinstr{#2}{#3}
\transinstr{#2}{#2&\transpose+7#3}
\transinstr{#2}{#3}
or, even better,
\transinstr{#1}{#2}
\transinstr{#1}{#1&\transpose+7#2}
\transinstr{#1}{#2}
and not have to deal with the \makeat... brackets, the
\elemskip argument and \@l at mskip\@vnotes.
Would this be feasible in TeX?
Bob T.
More information about the texhax
mailing list