lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lilypond's internal pitch representation and microtonal notation


From: Hans Aberg
Subject: Re: Lilypond's internal pitch representation and microtonal notation
Date: Tue, 21 Sep 2010 18:28:28 +0200

On 21 Sep 2010, at 16:52, Carl Sorensen wrote:

Here are scans from the relevant section of Stone's book. It explicitly *says* that natural+1/4 and sharp-1/4 are enharmonic equivalents, and that
the notation for those pitches must be chosen with care.

Another interpretation might be slightly sharp/flat, that is, not exact E24. Exact quarter-tones look like these, or some variation:
  http://en.wikipedia.org/wiki/Modern_musical_symbols#Quarter-tone_accidentals

Assume it is a small amount, denote the interval of the up (resp. down) arrow by n-m (resp. m-n), where n is a neutral second. Then sharp + down = (M-m)+(m-n) = M-n, which is an accidental that would be needed. And also flat + up = (m-M) + (n-m) = n-M. Call these large up and large down.

My algorithm produces the accidental as a combination of these four: up, down, large up and large down. But the accidentals can be rewritten. Here, I reasoned that it would be simplest first finding the smallest amount of accidentals and then rewrite them.

So if one gets a M-n, rewrite it to (M-m)+(m-n), add 1 to the number of sharps to typeset, and then select the symbol with the down arrow. Similarly, rewrite n-M to (m-M) + (n-m), add 1 to the number flats, and then select the symbol with the up arrow.

The implementation would need to just do the rewriting, because the selection is done by a map from positive coefficient linear combinations of pairs of seconds (which is the internal representation of accidentals). In other words, the rewriting is done as to make sure one is choosing from the set of existing symbols.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]