Neil Killeen wrote:

> I want to set a lot of these :
> 
>     ---3---
>    /       \
> 
>    --------
>    |  -|  |
>    |   |  |
>    o.  o  o
> 
> i.e. 8th_dot, 16th, 8th in a triplet
> 
> PMX cannot yet do this.  

Based on this comment, I've added this capability to PMX.  But I'm
holding off distributing the new version until I finalize another new
set of capabilities based on another of Neil's suggestions,
automatically positioning accidentals on chord notes.  Even though I've
taken a "brute-strength" approach, it's been very complex, but I now
have a crude, tentative working version.  To continue honing it, I'd
like to ask the list--and especially Neil--to send me pmx sources with
examples in which you had to spend time arranging such accidentals to
avoid crashes.

My approach is as follows, once the note locations in the chord are
set.  I make a list of all possible permutations of the order in which
the accidentals are posted. There are n! such permutations--2 for 2
accidentals, 720 for 6, etc.  Then I try each ordering in turn.  For a
given ordering, the first accidental is placed in its normal position,
the second as far to the right as it can go without crashing into the
first, and so on.  I do not yet allow for any vertical shifts and I've
only done it for large accidentals, but I have worked out fairly precise
representations of the outlines of the accidentals for use in deriving
the minimum horizontal shift that avoids a crash.  For each ordering I
compute a figure of merit.  I'm currently using the sum of squares of
the required offsets.  Then I choose the ordering that minimizes this
figure of merit.  If anyone has suggestions for other factors that
should be considered, it may be possible to modify the definition of the
figure-of-merit.  Or if anyone has an alternate suggestion for a
completely different algorithm or set of rules that leads to a final
choice of positions (for all possible circumstances!) I'd be happy to
hear it.

Once the accidental-positioning part is worked out, there are other
items that need to be addressed before the job is done.  Horizontal
notehead positions should be selected automatically. Extra space may
needs to be added for the shifted mass of accidentals.  And a set of
rules needs to be worked out for when any of the new automatism should
be applied.  This last point has to do with backward compatibility: I do
not want to over-ride any manual accidental or note-head position shifts
that may have been used in an old score.  So I'm basically thinking
about disabling the automatism if there are *any* manually inserted
accidental position tweaks or horizontal notehead shifts in a particular
chord, *unless* an explicit tag is included along with the accidental or
notehead shift.  If such a tag is included, then the accidental tweak
will be *added* to the automatic one for that accidental, and any
non-tagged manual adjustments will be ignored.

Comments?

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

Reply via email to