All--

There are several rather unlikely cases of horizontal spacing that 
crash PMX, and others that lead to ridiculous output.  As I've been 
thinking about how to revise the horizontal algorithm, I realize that 
for some situations I don't even know what spacing I want, let alone 
how to achieve it in PMX.  So I'd like to solicit opinions from the 
list.  

To open this discussion, let me first explain a few things about the 
existing algorithm.  For a single-voice score, IMHO the existing 
algorithm is entirely adequate, and any proposed set of rules for 
multiple voices should reduce to the existing single-voice rule when 
there is only one voice.  The rule is very simple.  If t is the time 
duration (in whole notes), then the number of elemskips l is 
sqrt(32*t).  So a half note has l=4; an eighth l=2.  For xtuplets the 
same rule is used.  For example, one note of an eighth-note triplet 
has t=1/24, so l=1.155 .  If on the other hand t is the *entire* 
duration of a n-tuplet, the length would be sqrt(32*n*t) (an exercise 
for the reader).

For multiple voices with no xtuplets, the existing algorithm is also 
fine.  You just break up time into a set of consecutive intervals 
defined by the starts and stops of ALL the notes in a bar or line, and 
assign a length sqrt(32*t) to each time interval.  

To go one step further, if in a multiple voice score only one voice 
(at a time) has an xtuplet, the existing rule also works fine, with 
the additional requirement that xtuplet notes are always equally 
spaced.  The entire xtuplet has a natural length sqrt(32*n*t) where 
now t is the duration of the entire xtuplet.  To set up the horizontal 
spacing, begin by ignoring the xtuplets, break up time into intervals 
as before.  Now compare the natural length of any xtuplet to the sum 
of natural lengths of the intervals it spans.  If the former is 
bigger, scale up the lengths of the intervals; if the latter is 
bigger, scale up the horizontal spacing of the xtuplet.

Notice that because of the requirement of equal spacing for xtuplets, 
you get different horizontal spacing for example with 

c43   c8 c /
c84 c c  c /

and

c43 c8 c /
c24x4 c c c /

In fact, in the latter, the 3rd member of the quadruplet in voice 2 
will not align with the 2nd eighth in voice 1.  But IMHO that's OK.

The problems all arise when there are xtuplets in more than one voice. 
I don't even have a reasonable proposal that would cover ALL such 
cases (and PMX should be able to handle all situations that can be 
notated within it's other restrictions).  Here one case that doesn't 
even go through PMX:

c43   c2x4 d e d   c4  /
c24x4 d e d  cx4 d e d / 

One strong possibility for this particular case is spacing just as if 
the quadruplets were eighths, namely, 8 equal time intervals each with 
l=2 .  But even knowing that, it's difficult to come up with a general 
rule or algorithm that leads to that result and (remember) it must be 
consistent with the other rules I've already mentioned.  

So to focus the discussion, consider this slightly modified example:

c43   c2x5 d e d c  c4  /
c24x3 d e   cx7 d e f e d c / 

There are two questions.

(1) The easy one: What should the spacing be?  

(2) The hard one: What is the general set of rules that leads to the 
answer (1) and is consistent with the existing PMX rules?

I'll give a free copy of PMX to the first person who comes up with 
good answers to both. 

--Don Simons

Reply via email to