[Top][All Lists]

[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: Wed, 22 Sep 2010 00:25:31 +0200

On 21 Sep 2010, at 21:31, Benkő Pál wrote:

In algebraic terms, choose a neutral n between m and M. The total pitch system will be i m + j M + k n, where i, j, k are integers. But the staff system only has the pitches i' m + j' M. When taking the difference with the staff note, reducing the degree to 0, and taking away the sharps/ flat (a
multiple of M - m), there will result a multiple n - m or n - M.

a minor point: wouldn't it be clearer to use d (degree) and a (alteration) instead of M and m? d should be a second, i.e. M (or m), while a should
be the augmented prime, i.e. M - m.
then multiples of d gives the staff system (very roughly equivalent to
the diatonic scale), linear combinations of d and a would give the usual chromatic system (all notes that can be notated with sharps and flats),
and for microtonal and exotic music one should use (one or several) n.

I think this is what LilyPond has now, using d and M in E12 originally.

But it becomes complicated when adding pitches. If one has seconds s_1, ..., s_k, then there is an accidental for each difference s_j - s_i and each s_i - s_j. With just m, M and n, one gets besides sharp M- m, flat m-M, also n-m, n-M, m-n, M-n. All four are used in Turkish music, but this system can handle it algebraically by adding just one second n.

In this system, d can always be computed. So it is not needed as a variable to carry around.

Another motivation is musical. One is typically not playing the accidental but the neutral interval. So it is easier to describe the music using seconds. An example of playing an accidental is major chord followed by a minor chord. But it is still more convenient to think of the minor chord built up by a minor and a major third rather than an alteration of the major chord. When playing the minor chord it has no relation to the major chord

anyway, I'm a big fan of using such a system: I've tried Pythagorean
and meantone MIDI-output by defining alterations, and MIDI was all
right, but the score had all the naturals which weren't defined to
be exactly zero (i.e. all except a); your system distinguishes nicely
between pitch systems and tuning (thoretical pitch and its physical

Yes, this is another point. If creating music with these linear combinations of seconds, one can plug in values later, and it is easy to retune the piece. This is so because the staff system was created to admit different tunings.

There is another part how to compute these seconds, which we have not yet come to. Traditionally, a system is defined by the pure fifth P5 = m+3M and the octave P8 = 2m+5M. Writing a matrix equation
  (1 3)(m) = (P5)
  (2 5)(M)   (P8)
the intervals of m and M can be computed by inverting the matrix on the left hand side.

It is convenient switch to other defining intervals. For example extended quarter-comma meantone can be defined by instead of P5 setting the major third M3 = 2M to the interval ratio 5/4. It leads to another 2x2-matrix to invert.

Now this generalizes to to a sequence of seconds: one gets a larger matrix to invert. So one can pick whatever defining intervals one wants, the pitches can be rather arbitrary recomputed.

When doing exact intervals, I use rational numbers with roots augmented. These are the numbers of the form: a product of primes with rational exponents. This is for exact intervals, to make sure there are no round-off errors. Otherwise, if one just wants to compute pitches for playing, it is better using floats - faster.

reply via email to

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