Hello Christian,

sorry for not having answered earlier, but it took me a while to get a
clear picture of the problem ... but now I'd like to suggest another
solution which is closer to MusiXTeX's barline drawing method (unless
I've completely misunderstood the matter).

These are the basic ideas. Step 1: Using "plain" MusiXTeX, you would
typeset barlines wherever you want, and wouldn't care whether the note
values "cross" the barlines or not; for example, you could write:

8<------------------------------------------------------------------
\input musixtex \input musixlit
\instrumentnumber3 \setstaffs12 \interbarrules

\startpiece
  \NOtes\qa{gggg}|\qa{gggg}&\qa{gggg}&\qa{gggg}\en
  \NOtes\qa g|\ha g&\ha g&\qa g\en\bar
  \NOtes\qa g&&\qa g\en
  \NOtes\qa{gggg}|\qa{gggg}&\qa{gggg}&\qa{gggg}\en
\zstoppiece
\bye
8<------------------------------------------------------------------

However, this is not feasible for a PMX/M-Tx source since PMX doesn't
allow to insert TeX strings at that place, i.e. directly outside a
\notes group. To solve this, you have to make MusiXTeX draw a barline
from within a \notes group; this can be done by calling MusiXTeX's
\writ@rule directly, properly enclosed in a couple of positioning
shifts:

8<------------------------------------------------------------------
\input musixtex \input musixlit
\instrumentnumber3 \setstaffs12 \interbarrules

\makeatletter
  \def\mybarrule{\lower\altitude\rlap{\hsk\kern.5\qn@width
                                      \writ@rule\lthick
                                      \addspace{-\lthick}}}
\makeatother

\startpiece
  \NOtes\qa{gggg}|\qa{gggg}&\qa{gggg}&\qa{gggg}\en
  \NOtes\mybarrule\qa{gg}|\ha g&\ha g&\qa{gg}\en
  \NOtes\qa{gggg}|\qa{gggg}&\qa{gggg}&\qa{gggg}\en
\zstoppiece
\bye
8<------------------------------------------------------------------

"\lower\altitude" eliminates the base height of the current staff,
"\hsk\kern.5\qn@width" positions the barline horizontally in the
middle of the adjacent notes (to be changed according to your
typesetting taste), "\writ@rule\lthick" does the main work, and
"\addspace{-\lthick}" eliminates the horizontal space caused by
drawing the barline.

This can now directly be used as an inline TeX string for PMX:

8<------------------------------------------------------------------
---
\input musixtex \input musixlit
\interbarrules
\makeatletter
  \def\mybarrule{\lower\altitude\rlap{\hsk\kern.5\qn@width
                                      \writ@rule\lthick
                                      \addspace{-\lthick}}}
\makeatother
---
% nv  noinst  mtrnuml  mtrdenl  mtrnmp  mtrdnp  xmtrnum0
   4     3       10        4        0       0       0
% isig  npages_or_0  nsyst_or_bars/syst  musicsize  fracindent
   0          0              4             16          0



tttt
/

g44 g g g \mybarrule\ g  g g  g g g /
g44 g g g             g2   g4 g g g /
g44 g g g             g  g g  g g g /
g44 g g g             g2   g4 g g g /
8<------------------------------------------------------------------


Best regards,

Rainer
_______________________________________________
TeX-music mailing list
[EMAIL PROTECTED]
http://sunsite.dk/mailman/listinfo/tex-music

Reply via email to