Re: [Tex-music] difficulty with inline TeX within pmx

2011-06-30 Thread Don Simons
Terrence Enger wrote

>...pmx copies a (one-backslash)
>inline TeX instruction to the output only if it is followed by a note
>(or, for all I know, something else) in the same measure.  

Not quite. Try this example:


1 1 4 4 4 4 0 0
1 1 20 0

t
.\
c4 c c c \zcharnote{10}{Hello}\ | c c c c /
c4 c c c | c c c c \zcharnote{10}{Hello}\ /
c4 c c c /


The first one is copied, but not the 2nd. Clearly, the command is ignored if
it's the last thing before the end of an input block, 

One solution to this shortcoming is like what the doctor said to the patient
who complained "It hurts when I do this," the solution being "Well, don't do
that."

The basic reason has to do with ambiguity about where the TeX command should
go if it comes at the end of an input block. My basic rule for type 1, for
better or worse (and 'til death do us part), is as stated in the PMX manual:
it "will appear in the .tex file right before the TEX command for the next
note or rest in the .pmx file.". But if you put it at the end of an input
block, all sorts of things could happen between there and the next note, and
besides if you really wanted it right before the next note (which is now in
the next input block), then put it in the next input block. On the other
hand, if for example you really need the command \blabla after the last note
of a normal bar but before the bar symbol, a workaround is to redefine \xbar
BEFORE entering the last note of the bar:

...c44 \let\xbart\xbar\def\xbar{\blabla\xbart\let\xbar\xbart}\ c44 | ...

Similar constructs could be used for "abnormal" bars, like a repeat sign or
the last bar of the piece,  but you might have to look at the TeX file first
to see what the "abnormal" bar command is, so you know what command to
redefine.

This sort of redefinition, including the last step which reverses the
redefinition, is a standard trick useful in lots of situations. 

--Don


---
TeX-music@tug.org mailing list
If you want to unsubscribe or look at the archives, go to 
http://tug.org/mailman/listinfo/tex-music


Re: [Tex-music] difficulty with inline TeX within pmx

2011-06-30 Thread Terrence Enger
On Thu, 2011-06-30 at 19:58 +0100, Olivier Vogel wrote:
> (snip)
> \\\def\atnextbar{\znotes\loff{\Toctfin1}\en}\

Thank you, that's just the ticket.

Terry.


---
TeX-music@tug.org mailing list
If you want to unsubscribe or look at the archives, go to 
http://tug.org/mailman/listinfo/tex-music


Re: [Tex-music] difficulty with inline TeX within pmx

2011-06-30 Thread Olivier Vogel
I suppose, you want to get this:

% nstaves,noinst,mtrnuml,mtrdenl,mtrnump,mtrdenp,xmtrnum0,isig,
1   1  4   40  00   -3
%
% npages,nsyst,musicsize,fracindent
   1  1 200.15
Violin
t
./
% === m.
\\\def\atnextbar{\znotes\loff{\Toctfin1}\en}\
   \Ioctfinup1q\ a24
%   Inline tex if last in measure does not go to output.
   d- /
% === m.
   \Ioctfinup2o\ g24
%   Inline tex if followed by a note goes to output.
   c4- \Toctfin2\ c /

Olivier
---
TeX-music@tug.org mailing list
If you want to unsubscribe or look at the archives, go to 
http://tug.org/mailman/listinfo/tex-music


[Tex-music] difficulty with inline TeX within pmx

2011-06-30 Thread Terrence Enger
Greetings,

( Now that I have written this down, it is obvious that I need to code
the \Tocfin1 one note earlier.  Still, my question stands with respect
to inline TeX in general. )

Early in my attempts to use inline TeX within a pmx file, I have found
something which surprises me as funny: pmx copies a (one-backslash)
inline TeX instruction to the output only if it is followed by a note
(or, for all I know, something else) in the same measure.  I append
source code and generated .tex file, and I attach resulting .pdf.

The result is the same from pmx Version 2.502a <29 March 04> and from
Version 2612 , 22 Jun 11.

Is there something I need to know?  If this is a program problem, is
there anything I can do to help?

Thanks,
Terry.

== source ==
% -
%
% Trying to figure out why \Toctfin1 is not going through
% to the output file.
%
% -
%
% nstaves,noinst,mtrnuml,mtrdenl,mtrnump,mtrdenp,xmtrnum0,isig,
 1   1  4   40  00   -3 
%
% npages,nsyst,musicsize,fracindent
1  1 200.15
Violin
t
./
% === m.
\Ioctfinup1q\ a24
%   Inline tex if last in measure does not go to output.
d- \Toctfin1\ /
% === m.
\Ioctfinup2o\ g24
%   Inline tex if followed by a note goes to output.
c4- \Toctfin2\ c /
==generated tex 
%
%
% m136b.tex
%

\input musixtex
\input pmx
\input musixmad%\setmaxslurs{24}\setmaxinstruments{24}%
\normalmusicsize%
\nopagenumbers
\tracingstats=2\relax
\hsize=524pt
\vsize740pt
\def\nbinstruments{1}
\setstaffs11
\setclef10
\setname1{Violin}
\generalsignature{-3}%
\parindent 79pt
\elemskip1pt\afterruleskip1.000pt\beforeruleskip0pt\relax
\stafftopmarg0pt\staffbotmarg5\Interligne\interstaff{10}\relax
\nostartrule
\readmod{m136b}
\startmuflex\startpiece\addspace\afterruleskip%
\znotes\zcharnote{16}{\titles{2.0}{}{0}{}{0}{}{0}}\en%
% Bar count 1
\pnotes{4.00}\Ioctfinup1q\hu{'a}\hu{`d}\en%
% Bar count 2
\xbar
\pnotes{4.00}\Ioctfinup2o\hu g\en%
\pnotes{2.83}\qu c\Toctfin2\qu c\en%
\Endpiece
\vfill\eject\endmuflex
\bye


---
TeX-music@tug.org mailing list
If you want to unsubscribe or look at the archives, go to 
http://tug.org/mailman/listinfo/tex-music


Re: [Tex-music] PMX 2.613 (was RE: all-staves transposition in PMX 2.610)

2011-06-30 Thread Hermann Hinsch
Am Mittwoch, 29. Juni 2011, 17:57:38 schrieb Philipp Neukel:
> Hello,
> 
> I have tried to compile the source on my mac using gcc and gfortran, but I
> never get through:
> 
> $$
> 
> pmx2613.for:735.72:
> 
> call getarg(1,jobname,idum) ! May need to replace this w/ next l

Commernt out this line and use the next one

Hermann

> 1
> Error: Too many arguments in call to 'getarg' at (1)
> pmx2613.for:748.72:
> 
>   call getarg(2,jobname,idum) ! May need to replace this w/ next

Do the same as above

> 1
> Error: Too many arguments in call to 'getarg' at (1)
> 
> $$
> 
> Whether I use Mac OS X (10.6.8 + Developer Tools / XCode) or an Ubuntu Live
> CD (10.10) is of no concern. After cd to the folder I state
> 
> $ gfortran pmx2613.for
> 
> What am I doing wrong? I am rather new to compiling myself, so my mistakes
> could be basic.
> 
> Thanks,
> Philipp
> 
> Am 29.06.2011 um 17:42 schrieb Don Simons:
> > Good catch, Cornelius! I think I have it fixed in the newly posted beta:
> > 
> > http://www.icking-music-archive.org/software/pmx/pmx2613.zip
> > 
> > --Don Simons
> > 
> > ---
> > TeX-music@tug.org mailing list
> > If you want to unsubscribe or look at the archives, go to
> > http://tug.org/mailman/listinfo/tex-music
> 
> ---
> TeX-music@tug.org mailing list
> If you want to unsubscribe or look at the archives, go to
> http://tug.org/mailman/listinfo/tex-music

---
TeX-music@tug.org mailing list
If you want to unsubscribe or look at the archives, go to 
http://tug.org/mailman/listinfo/tex-music