I've just realized that there is a way to allow MIDI 128th notes without PMX
completely choking. But the resulting MIDI file will be flawed.  The
fundamental quantum of MIDI time is a "MIDI tic" which PMX defines once and
for all as 1/15 of a 64th note or 1/120 or a quarter note. Since that makes
a 128th note equal to 7.5 tics, which is not an integer, there's a problem
right away. But that's not the reason PMX was choking. Rather, it's because
PMX puts in a fixed-length gap at the end of every note, subtracting the gap
from the length of the note. The default is 10 tics, which is 2/3 of a 64th,
but longer than a 128th, so the logic was breaking down. You can forestall
the locigal problem by shortening the gap to something less than 7.5. The
command is e.g. Ig5 . With that the code will run. But for one thing, you're
stuck with that tinier gap at the end of every note. (I haven't tested
whether you can change it on the fly.) And for another thing, a flaw now
comes about because a 128th cannot be represented exactly. As things now
stand, PMX will always round 7.5 in the same direction. So if there are more
128ths in one voice than the others, they will get out of phase. Here's an
example where you can hear that things get out of whack at the end:

=====================================
2 2 2 4 2 4 0 0
1 5 20 0


bt
.\
Ig5
b43 d /
g84d g1x8 a b c d c b a g84d g1x8 a b c d c b a /
b43 d /
g84d g1x8 a b c d c b a g84d g1x8 a b c d c b a /
b43 d /
g84d g1x8 a b c d c b a g84d g1x8 a b c d c b a /
b43 d /
g84d g1x8 a b c d c b a g84d g1x8 a b c d c b a /
d24 d d d /
f24 f f f /
======================================

If there were the same number of 128th in each voice, then they would come
back together:

======================================
2 2 2 4 2 4 0 0
1 5 20 0


bt
.\
Ig5
b43 d /
g84d g1x8 a b c d c b a g84d g1x8 a b c d c b a /
b43 d /
g84d g1x8 a b c d c b a g84d g1x8 a b c d c b a /
g84d g1x8 a b c d c b a g84d g1x8 a b c d c b a /
b43 d /
g84d g1x8 a b c d c b a g84d g1x8 a b c d c b a /
b43 d /
d24 d d d /
f24 f f f /
=======================================

At this point someone might be wondering if the quantum problem comes up in
more mundane situations with xtuplets, and the answer is well, sort of,
depending on your definition of mundane.  Since a quarter note is 120 tics,
you can divide it evenly by 2,3,4,5, or 6, but not 7. I anticipated this
one, and tried to build special logic for just that case (quarter-note
septuplets) to keep them lined up. If that works the way it should, you
won't get the quantum disconnect until you divide a quarter by 9. That one
will not be fixed.

--Don Simons


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Hermann
> Hinsch
> Sent: Wednesday, June 13, 2007 11:12 AM
> To: Werner Icking Music Archive
> Subject: Re: [TeX-Music] 128th notes within PMX
>
>
> Am Mittwoch, 13. Juni 2007 16:48 schrieb Christian Mondrup:
> > Don Simons wrote:
> > > The error appears to be caused by trying to make a MIDI file. It's not
> > > likely I'll fix it any time soon, as it would require major
> revision of
> > > the MIDI timing scheme. If you can live without MIDI 128th notes, you
> > > could make a separate version of the pmx file for the MIDI.
> They should
> > > otherwise compile OK.
> >
> > Rather than maintaining different versions of the pmx file the ABC
> > preprocessor abcpp can be used for branching between MIDI and score
> > compilation within a single file. See the introduction to abcpp in the
> > tips and tricks section,
> > http://icking-music-archive.org/software/pmxtricks/abcpp.html
>
> Hi Christian,
>
> I will try this possibility later because I think that it will
> take some time
> to study this feature.
>
> Hermann
>
> _______________________________________________
> TeX-music mailing list
> [EMAIL PROTECTED]
> http://mailman.daimi.au.dk/mailman/listinfo/tex-music
>


_______________________________________________
TeX-music mailing list
[EMAIL PROTECTED]
http://mailman.daimi.au.dk/mailman/listinfo/tex-music

Reply via email to