Re: \csh, \cfl, \cna in M-Tx/PMX

2000-08-31 Thread Christian Mondrup

"Simons, Don" wrote:
 
 "\\def\cautna{\let\bignat\bigna\def\bigna##1{\cna{##1}\let\bigna\bignat}}\"
 

Even if Christof Biebricher earlier today condemned cautionary
accidentals as 'bad habit' your nice little macro (including its
counterparts for sharps and flats) have come in just in time for my
current composing project. There I practice another 'bad habit' of
frequently changing keys and thus at some places want to remind the
performers of an accidental introduced earlier in a bar. And I *dont*
want to use editorial accidentals in that case because they, at least to
me, signify something different. For example in my editions of
renaissance music (Ravenscroft, Pedersøn etc.) I insert editorial
accidentals where the original source for some reason don't have them
but where I - as an editor - think they ought to be.

By experiment I realized that the results of \cautna and friends even
get horizontally offset when I apply a pmx offset suffix on the
'ordinary' accidentals:-)
-- 
Christian Mondrup, Computer Programmer
Scandiatransplant, Skejby Hospital, University Hospital of Aarhus
Brendstrupgaardsvej, DK 8200 Aarhus N, Denmark
Phone: +45 89 49 53 01



RE: \csh, \cfl, \cna in M-Tx/PMX

2000-08-30 Thread Simons, Don

 Alexander V. Voinov [SMTP:[EMAIL PROTECTED]] wrote
 
I've come across a real example, which contains an accidental in
parenthesis (don't know [the English for] its musical name). 

cautionary accidental

I found a hack, which temporarily
turns a (half) note to a zbreve, 

!?  how did \zbreve enter the picture???

May I ask somebody to help me write one or two macros which I would use,

Suppose (in PMX syntax) you have the input "cn44" and you want to convert
the natural to a cautionary natural.  First you ought to look in the
unaltered TeX source to check which MusiXTeX command is being used to place
the original natural.  Suppose it's \bigna{...} .  Then to replace the
natural by a cautionary natural you would use (again, in PMX syntax)

"\let\bignat\bigna\def\bigna#1{\cna{#1}\let\bigna\bignat}\ cn44"

If you want to define a macro, you could use

"\\def\cautna{\let\bignat\bigna\def\bigna##1{\cna{##1}\let\bigna\bignat}}\"

at the top of the input file, then

"\cautna\ cn44"

in the body.  I haven't tested any of these but I think they'll be OK.
There could still be problems with horizontal spacing if the line is
crowded, because PMX will think there's a natural there, and \cna might be a
little bit wider.  In that case you would need to insert extra horizontal
space with X...

--Don Simons





Re: \csh, \cfl, \cna in M-Tx/PMX

2000-08-30 Thread Werner Icking

 Date: Wed, 30 Aug 2000 11:12:51 -0700
 From: "Alexander V. Voinov" [EMAIL PROTECTED]

 I've come across a real example, which contains an accidental in
 parenthesis (don't know [the English for] its musical name). I use M-Tx,

cautionary accidental

 which is great for the type of music (vocal) which I type. But I failed
 to find a proper notation for the type of accidental, which in MusiXTeX
 is expressed by \cna and friends. [...]

The PMX equivalent is "oen"/"oes"/"oef" as "ornament". This display the 
cautionary accidental on top of the note or on top of the staff whatever
ist higher.

 May I ask somebody to help me write one or two macros which I would use,
 this way, for example:
 
 | .  \bignameanscna\ d8n . |
 
 or
 | .  \bignameanscna\ d8n \bignameansbigna\ . |

I'm not sure whether I correctly understand what you want, but maybe
the following PMX-code may help you (I'm not so used to M-Tx).
It defines a TeX-Macro \cntry\ which make the next PMX-generated
accidental into a cautionary accidental. I'm not sure whether it
works with grace notes and it will not work with chords if there
is more than one note with an accidental. And if you use PMX to
generate Midi then the sound may be other than printed.

1 1 3 4 3 4 0 -2
1 2 20 0

t
./

Abr

\\let\bignasav\bigna\
\\let\bigshsav\bigsh\
\\let\bigflsav\bigfl\
\\let\nasav\na\
\\let\shsav\sh\
\\let\flsav\fl\

\\def\ctnrest{\let\bigna\bignasav\let\bigsh\bigshsav\let\bigfl\bigflsav\
 \\let\na\nasav\let\sh\shsav\let\fl\flsav}\
\\def\ctnry{\
\\def\bigna##1{\ctnrest\cna{##1}}\
\\def\bigsh##1{\ctnrest\csh{##1}}\
\\def\bigfl##1{\ctnrest\cfl{##1}}\
\\def\na##1{\ctnrest\cna{##1}}\
\\def\sh##1{\ctnrest\csh{##1}}\
\\def\fl##1{\ctnrest\cfl{##1}}}\

d45s dn df \ctnry\ ds \ctnry\ dn \ctnry\ df ds dn df /
L2M e45s en ef \ctnry\ es \ctnry\ en \ctnry\ ef es en ef /


The 2nd line shows that \cfl does not work correctly with
relative accidentals if the flat is turned into a double flat.

Daniel, do you hear me?

  \cdfl generates correctly:  (bb)
  If \cfl together with \relativeaccid has to generate something like
  \cdfl then the result looks bad:  (b)b
  
Here's the test case:

\generalsignature{-2}
\startextract\NOtes\cdfl e\qa e\en\endextract
\relativeaccid
\startextract\NOtes\cfl e\qa e\en\endextract
\bye
\generalsignature{-2}
\startextract\NOtes\cdfl e\qa e\en
\generalsignature1\changecontext
\Notes\cdsh f\qa f\en\endextract
\relativeaccid
\generalsignature{-2}
\startextract\NOtes\cfl e\qa e\en
\generalsignature{1}\changecontext
\Notes\csh f\qa f\en\endextract
\bye

-- Werner




RE: \csh, \cfl, \cna in M-Tx/PMX

2000-08-30 Thread Simons, Don

Werner Icking [SMTP:[EMAIL PROTECTED]] wrote

The PMX equivalent is "oen"/"oes"/"oef" as "ornament". This display the 
cautionary accidental on top of the note or on top of the staff whatever
ist higher.

As I use the terms, there is a difference between cautionary accidentals and
editorial accidentals.  The pmx commands "oen", "oen?", etc are editorial
accidentals, which are placed above the staff, without parentheses, and with
or without a "?".  A cautionary accidental is placed in the staff with
parentheses, and never includes a "?".  There is no PMX command for
cautionary accidentals (although there probably should be one :)) The
posting I just made shows how I would write a general macro to replace an
ordinary accidental with a cautionary one.  

Again, as *I* use the terms, there is a very clear difference between
editorial and cautionary accidentals.  Editorial ones are where the editor
is convinced that the composer did not enter an accidental where he should
have, or entered one where he shouldn't have.  The "?" may be appended to
the editorial accidental if the editor is not quite 100% certain that the
composer made a mistake.

On the other hand, cautionary accidentals never affect whether an accidental
should or should not be played.  They are simply warnings to the player to
be careful and follow the usual rules.  If all players always followed the
usual rules then cautionary accidentals would be unnecessary.  

The PMX MIDI file generator ignores all inline TeX and it ignores all
editorial accidentals.  If cautionary accidentals are entered using the
macro I defined in my earlier posting, the MIDI will observe the accidental
because PMX will see it as an ordinary accidental.  But according to what I
wrote in the previous paragraph, the note should already have an "inherited"
accidental from earlier in the bar, so even without any explicit accidental
the MIDI processor--which does know the usual rules--would handle it
properly.

Finally, let me mention that I recently introduced a "MIDI-only" accidental
into PMX.  One situation this is good for is where an editor has inserted an
editorial accidental and wants it to be observed in the MIDI file.  In order
to get the MIDI processor to include the accidental, you could code for
example "cni44 oen".  The natural would not be printed beside the note,
would appear above the note, and would be observed in the MIDI.

--Don Simons