FRAPPE_Franc,ois-Nicolas_108324 wrote:
> 
> At the bars 3-4, there is two decrescendos.
> 
> For flute 1, it begins on the second note of the bar 3 (do) and ends on =
> the
> second note of the bar 4 (re)
> For flute 2, it begins on the fourth note of the bar 3 (re) and ends on =
> the
> fifth note of the bar 4 (sol)
> 
> But when I compile the mtx file, then pmx, and finally tex, I obtain an =
> dvi
> file where the two decrescendos are identical. In the dvi, the Flute 2 =
> has
> the same decresc. as flute 1 .... !
> 
> How to get the two decresc. differents ?
> 
This is a complicated issue which needs to be answered at the MusiXTeX
level, and I am not sure I am competent to do that.  So the following
explanation may contain some errors.

M-Tx translates < or > to \zchar{-6}{\icresc}, <. to \zchar{-6}{\tcresc} 
and >. to \zchar{-6}{\tdecresc} (of course the vertical position is not 
always -6).  When you say \icresc MusiXTeX remembers the x-coordinate
but does not yet typeset anything.  When you say \tcresc or \tdecresc
the whole symbol is calculated and typeset.  An \icresc remains in effect
until you get another \icresc.

In your case two \icresc's in different voices are generated, but you
have not yet used the first \icresc by the time the second one comes.
So the second one redefines the first and both decrescendos come out
the same.  (MusiXTeXperts: don't stop reading here, after I answer
Franc,ois's question I have another example I cannot understand.)

You can solve this problem by using the variable-length \decrescendo
which specifies the whole symbol at once.   Replace your last two music 
paragraphs by 

% 3
U: ~ ~ \decrescendo{11\elemskip}
e8 d+ l f |
U: \decrescendo{15\elemskip}
d+ m- f r |

% 4
U: ~        ~     p
( m4        r8 ) ( f1 r ) |
U: ~ ~  ~ ~ ~ 
( s1 fs s f s8 ) "r | 

to get the desired effect.  (In M-Tx 0.42 you will be able to write
">11" and ">15" for this.)

OK, this answers the question.  Now the part I don't understand. 
I first give a test score in M-Tx and then the MusiXTeX coding
for the notes in the bars containing \icresc and \tcresc.  Note that
the difference between the first and second music paragraph is that
the voices are reversed, and the difference between the last two
and the first two paragraphs is that everything goes at twice the
duration.

----------------- 8< -------------- 8< -----------------------
Style: Duet
Systems: 3
Composer: Not F. J. Haydn
Title: Crescendo Woes

U: @v < ~ ~ ~ ~ ~ ~ <.
     c8 d e f g a b g c0 
U: @v ~ ~ ~ < ~ ~ <.
     c8 b c d e f g f e0 

U: ~ ~ ~ < ~ ~ <.
 c8- b c d e f g f e0 
U: < ~ ~ ~ ~ ~ ~ <.   
  c8 d e f g a b g c0 

U: ~ ~ ~ < ~ ~ <.
  c4 b c d e f g f ( e0 e0 )
U: < ~ ~ ~ ~ ~ ~ <.
 c4- d e f g a b g ( c0 c0 )

U: < ~ ~ ~ ~ ~ ~ <.
  c4 d e f g a b g ( c0 c0 )
U: ~ ~ ~ < ~ ~ <.
 c4- b c d e f g f ( e0 e0 ) 
----------------- 8< -------------- 8< -----------------------
% bar  1
\def\NOtes{\vnotes2.00\elemskip}%
\def\NOTES{\vnotes5.66\elemskip}%
\NOtes\ibu1{'C}0\qb1C\qb1B\qb1C\zchar{-4}{\icresc}\tbu1\qb1D\ibl1F0\qb1E%
\qb1F\zchar{-4}{\tcresc}\qb1G\tbl1\qb1F&\zchar{-4}{\icresc}\ibu2d1\qb2c%
\qb2d\qb2e\tbu2\qb2f\ibu2{'a}0\qb2{`g}\qb2{'a}\qb2b\zchar{-4}{\tcresc}%
\tbu2\qb2{`g}\en%
...
% bar  3
\xbar
\NOtes\zchar{-4}{\icresc}\ibl1{'D}1\qb1C\qb1D\qb1E\tbl1\qb1F\ibl1{'A}0%
\qb1{`G}\qb1{'A}\qb1B\zchar{-4}{\tcresc}\tbl1\qb1{`G}&\ibu2c0\qb2c\qb2b%
\qb2c\zchar{-4}{\icresc}\tbu2\qb2d\ibu2f0\qb2e\qb2f\zchar{-4}{\tcresc}%
\qb2g\tbu2\qb2f\en%
...
% bar  5
\xbar
\NOTes\zchar{-4}{\icresc}\qu{'C}\qu D\ql E\ql F&\qu c\qu b\qu c%
\zchar{-4}{\icresc}\qu d\en%
% bar  6
\xbar
\NOTes\ql{'G}\ql{'A}\ql B\zchar{-4}{\tcresc}\ql{`G}&\qu e\qu f%
\zchar{-4}{\tcresc}\qu g\qu f\en%
...
% bar  9
\xbar
\NOTes\qu{'C}\qu B\qu C\zchar{-4}{\icresc}\qu D&\zchar{-4}{\icresc}\qu c%
\qu d\qu e\qu f\en%
% bar 10
\xbar
\NOTes\ql{'E}\ql F\zchar{-4}{\tcresc}\ql G\ql F&\qu g\qu{'a}\ql b%
\zchar{-4}{\tcresc}\qu{`g}\en%
----------------- 8< -------------- 8< -----------------------

What happens: 

  In bars 1 and 3 we get crescendod starting and ending at the notes
  as specified in the M-Tx original.  I think this is because the whole bar
  appears inside a single \NOtes...\en bracket and the \icresc ... \tcresc
  pair is local to each voice.

  In bars 5 and 6 both crescendos start at the fourth note (which is
  the one specified in the upper voice) and end at the note specified.
  I think this is because the \icresc's appear in a different 
  \NOtes...\en bracket and only the most recent value is retained.

  In bars 9 and 10 both crescendos start at the first note (which is
  the one specified in the upper voice) and end at the seventh note
  (which is the one specified in the lower voice).  I can understand 
  the start but not the end: I think the two crescendos should end
  at different notes.

Finally, another surprise: if you set the piece over four systems,
only bar 3 comes out right.  Here is the relevant MusiXTeX:
----------------- 8< -------------- 8< -----------------------
% bar  1
\def\NOtes{\vnotes2.00\elemskip}%
\def\NOTES{\vnotes5.66\elemskip}%
\NOtes\ibu1{'C}0\qb1C\qb1B\qb1C\zchar{-4}{\icresc}\tbu1\qb1D\ibl1F0\qb1E%
\qb1F\zchar{-4}{\tcresc}\qb1G\tbl1\qb1F&\zchar{-4}{\icresc}\ibu2c1\qb2c%
\qb2d\qb2e\tbu2\qb2f\ibu2{'a}0\qb2{`g}\qb2{'a}\qb2b\zchar{-4}{\tcresc}%
\tbu2\qb2{`g}\en%
...
% bar  3
\def\NOTes{\vnotes2.83\elemskip}%
\alaligne
\NOtes\zchar{-4}{\icresc}\ibl1{'D}1\qb1C\qb1D\qb1E\tbl1\qb1F\ibl1{'A}0%
\qb1{`G}\qb1{'A}\qb1B\zchar{-4}{\tcresc}\tbl1\qb1{`G}&\ibu2c0\qb2c\qb2b%
\qb2c\zchar{-4}{\icresc}\tbu2\qb2d\ibu2f0\qb2e\qb2f\zchar{-4}{\tcresc}%
\qb2g\tbu2\qb2f\en%
...
.r  5
\xbar
\NOTes\zchar{-4}{\icresc}\qu{'C}\qu D\ql E\ql F&\qu c\qu b\qu c%
\zchar{-4}{\icresc}\qu d\en%
% bar  6
\alaligne
\NOTes\ql{'G}\ql{'A}\ql B\zchar{-4}{\tcresc}\ql{`G}&\qu e\qu f%
\zchar{-4}{\tcresc}\qu g\qu f\en%
..
% bar  9
\alaligne
\NOTes\qu{'C}\qu B\qu C\zchar{-4}{\icresc}\qu D&\zchar{-4}{\icresc}\qu c%
\qu d\qu e\qu f\en%
% bar 10
\xbar
\NOTes\ql{'E}\ql F\zchar{-4}{\tcresc}\ql G\ql F&\qu g\qu{'a}\ql b%
\zchar{-4}{\tcresc}\qu{`g}\en%
----------------- 8< -------------- 8< ----------------------- 

I have no explanations here, except to guess that \alaligne does
something different from \xbar to the register containing the stored
value from \icresc.

Dirk

Reply via email to