Remove ambiguity?

metachromatic <[email protected]> Thu, 12 Mar 2026 12:28:47 -0700
Newsgroups gmane.comp.gnu.lilypond.devel
Message-ID <CAFwgTFi1kwWi=M9mb_FSB2FE=8_tDH8=u_D+vMzniA_id8+FGg@mail.gmail.com>
The effort to remove ambiguity from the parser seems admirable, but can't
possibly be achieved.

The C programming language has a far more stringent set of specifications
than Lilypond, yet the behavior of C compilers when encountering some C
code remains undetermined and computer-dependent. This proves true of every
programming language as far as I know.

In fact, this will *always* be the case with *any* programming language,
Lilypond included.

That no one seems to realize this remains astonishing.

Musical notation conventions prove far more flexible and under determined
than machine-readable programming languages. So it seems obvious that
eliminating ambiguity in parsing musical notation is an even more Herculean
task than the unsolved (and likely unsolvable) problem of eliminating
ambiguity from machine-readable compiler interpretations.

As just one obvious example, consider the musical notation 5/8 at the start
of a measure. Does this mean a meter of 5 beats of duration one eighth
note? Or does it mean a polytempo of 5 eighth notes in the time of eight
eighth notes?
This depends on how the computer notation program views a measure of music.

Some notation programs regard a measure of music as a rigid container of
fixed size -- Finale, for example, does not allow broken tuplets because
this allows the possibility of durations leaking over the barline. That
would mean that a measure of music might contain a fluid transient set of
durations, which Finale does not allow. Other music notation programs, like
Notability Pro, allow arbitrary broken tuplets within a measure of music,
permitting durations to seep over the barline from one measure to the next.
In Notability Pro, the definition of a measure of music becomes flexible --
it's no longer a fixed set of durations, but can vary arbitrarily in length
depending on the set of broken tuplets.

Lilypond falls somewhere in between. Because of the bug (caused by a
fundamentally flawed defective design based on defining note durations as
ratios of integers), there's a limit to the number of simultaneous broken
tuplets and tuplet values you can use in different simultaneous measures.
This does remove the ambiguity in time signatures!

Is a measure of 5/8 against another measure of 6/8 5 in the time of 8
against 6 in the time if eight? Or is a meter of 5 eighth notes against 6
in the time of eight? Or is it two polymeters, 5 eighth notes between every
down beat against 6 eighth notes between every downbeat?

This ambiguity can the only be resolved by context. If the barlines line
up, then we have polytempos, which measures holding differing numbers of
nominal eighth notes which actually differ in duration depending on which
measure we're looking at. If the barlines are staggered, so that 5/8
measures contain 5 eighth notes if the same duration as the 6/8 measures,
but with downbeats in different places depending on which measure we're
looking at, then we're dealing with polymeters where the duration of all
eighth notes is the same but the location of the downbeat differs depending
on which measure we're looking at.

These ambiguities are baked into Western musical notation and in Lilypond
they can only be determined by context. It's not obvious how to remove such
ambiguities regardless how much detail you specify in ancillary machine- or
human-readable instructions