1. Introduction
Pythagorean tuning is a musical example of a rational approximation of an irrational number, the generator tone. A scale
tone ,
, is an iterate of the third harmonic of a fundamental frequency
(generally assumed as
),
, reduced to the range of frequencies of one octave
. In the logarithmic space of the frequencies, the scale
notes are
, i.e., the iterate minus its integer part (the integer part of
is the floor function
if
and the ceiling function
if
). Sometimes, it is useful to use backward iterates (
) in order to obtain tones as close as possible to simple ratios [
1], such as considering the class of the fifth harmonic
instead of
. The scale notes can be represented clockwise in the circle of the octave
(i.e., the interval
by identifying its endpoints, 0 representing the fundamental) and multiplied by 1200 to give their value in cents (¢).
Several mathematical approaches have been used to determine the number of tones of a
well-formed scale [
2,
3,
4], which will be reviewed in the next section. These approaches are also valid when the generator tone (
, for Pythagorean scales, although the scale can be interpreted as generated from the iterations of the third harmonic of the fundamental projected onto the octave or by its class
, i.e., the fifth.) is any positive real number, which is known as generalized Pythagorean tuning. Depending on the approach and on the number of generators, well-formed scales have also been referred to with different names, such as moments of symmetry [
5,
6],
gammes naturelles (in French) [
7,
8], etc. Here, by following [
9,
10], a monogenous well-formed scale with one generator
will be referred to as a
cyclic scale to simplify.
These mathematical approaches include several areas of numerical analysis, such as iterative methods [
11,
12], continued fraction approximations [
13], Farey sums, the Stern–Brocot tree and its dual, the Raney tree [
14,
15] or Calkin–Wilf tree [
16,
17], mechanical or Sturmian words [
18,
19,
20], entropy and interval regularity [
21,
22,
23,
24,
25], etc. Depending on whether we are focusing on the scale tones, their indices, their geometry, their intervals, etc., it is convenient to take into account one or several of these approaches.
A fundamental property of cyclic scales is that the partition of the octave induced by the scale notes has exactly two sizes of scale steps, and each number of generic intervals occurs in two different sizes, which is known as Myhill’s property [
26,
27]. In addition, the two elementary intervals are associated with two families of tones, the generic diatones and accidentals [
10]. Relying on their relative abundance, i.e., the proportion between the number of diatones and accidentals and their occupancy, i.e., the fraction of octave they occupy, the scales may show different properties, such as having more degrees of rotational symmetry for some specific intervals, ranging a wider part of the octave subdivided into regular intervals, both types of tones being well mixed or forming lumps, etc. Depending on the musical context, both kinds of diversity, for abundance and occupancy, are properties to evaluate.
In the current paper, scale diversity is studied by using the Shannon index based on entropy, and it is analyzed how this is related to the sequences of the best one-sided rational approximations of the generator tone.
The next sections are organized as follows. In
Section 2, several approaches explain how Pythagorean scales are built, being equivalent to computing the canonic continued fraction expansions of the generator. An iterative algorithm for determining the chain of cyclic scales is used to introduce the key indices that characterize a scale, namely the indices of the extreme tones
and the scale digit
. They will be related to the new concepts of
ruling index and the
lineage of scales.
Section 3 pays attention to the lineages and both types of tones and intervals by enumerating their properties and pointing out their relationship to the semiconvergents of the canonic continued fraction expansions of the generator.
Section 4 introduces the diversity indices, either for abundance
or occupancy
h, and derives their main properties when applied to cyclic scales.
Section 5 describes the behavior of
and
h in terms of the key indices of the cyclic scales. In particular, conditions for increasing or decreasing trends of the abundance and occupancy diversity indices along lineages are analyzed.
The relationship between the diversity indices and the partition entropy of the scale is provided in
Section 6.
Section 7 summarizes the conclusions and applies the previous results to describe the first lineages in Pythagorean tuning.
2. Generalized Pythagorean Tuning
2.1. A Geometric Approach
Without loss of generality, we can assume the note iterates as
for
, beginning with a certain
. Notice that to start the iterates with a negative value, say
with fundamental
, would be equivalent to the iterates
starting at
with fundamental
. The number tones of an
n-tone cyclic scale
is determined when the distance from
to
in the circle
is lower than the distance to the iterates
, with
, either by one side or by both sides, which is known as a
closure condition [
2,
3,
4]. Then,
is identified with
, by providing the scale with an algebraic structure of the factor group [
7].
By following the notation in [
9,
10], when the scale tones other than the fundamental
are ordered from lowest to highest pitch (say, in
cyclic order or
by ordinal) there are two extreme tones, the
minimum tone and the
maximum tone , which determine the two
elementary factors in the multiplicative space of frequencies, namely
(up the fundamental) and
(down the fundamental), so that
. For
, the indices satisfy
, all of them coprime. These factors have the corresponding
elementary intervals in the additive logarithmic space of notes,
and
, with
.
The tone , which does not belong to the scale , provides the closure condition, either , above the fundamental, or , below the fundamental.
Two parameters can be used to know whether closes above or below the fundamental. For , and by using the index (also ), the parameters are the scale closure, , which is a value close to 1, and the scale digit, , which takes values 0 or 1. Thus, () and (). The scale closure also satisfies , so that its value depends on the relative size of the elementary factors.
2.2. Best and Good Rational Approximations of
The above approach can be interpreted as being a convergent or semiconvergent of the canonic continued fraction expansion of .
The scales corresponding to the
best rational approximations (best approximation of the second kind [
28,
29])
of
are the convergents of its canonic continued fraction expansions (Best Approximation Theorem (e.g., [
30])). However, while the convergents are the best double-sided approximations, the semiconvergents are only the best one-sided approximations.
The quotient of indices
is a best approximation of
if one of the following cases takes place [
9]:
- (i)
If
, then
, and
- (ii)
If
, then
, and
The best approximations are associated with the best closure
. They provide
optimal scales. Then, by considering the
interval closure in
,
On the other hand, the
good rational approximations (best approximation of the first kind) are the convergents and some semiconvergents of the canonic continued fraction expansions. They generate
accurate scales [
23] and are associated with the best estimations of the generator
.
The set of best one-sided approximations is equal to the set of good one-sided approximations [
29] (Theorem 4.5). Therefore, both convergents and semiconvergents of the canonic continued fraction expansions of
are good one-sided approximations, according to one of these cases:
- (i)
If
, then
, and
That is, the closure above the fundamental means a left-sided approximation to .
- (ii)
If
, then
, and
The closure below the fundamental means a right-sided approximation to .
2.3. Iterations in Terms of the Indices m, M, and
Cyclic scales (whether optimal or not) form a chain,
In each link, the scale
is composed of the tones of
, the
generic diatones, in addition to the new
non-adjacent tones, the
generic accidentals [
10].
Based on the above approaches, cyclic scales can also be obtained from the following iterative process. Starting from the indices of the extreme tones
m and
M of
, with
(
), for the next cyclic scale in the chain
, these values are obtained as:
Therefore, according to (
1), one of the indices of the extreme tones always repeats. This happens while approximations are improving by one side, until reaching an optimal scale, then the approximations begin to improve by the other side.
It is worth mentioning the following theorem [
9] (Theorem 5.1).
Theorem 1. In the link , is optimal.
Definition 1. If R is the index of one of the extreme tones, all the scales sharing this index form the R-lineage (or, simply, lineage), and each scale represents a stage of the lineage. From the first repetition of R (second stage of a lineage) until the end of the lineage, R is the ruling index.
Table 1 displays the lineages for the first non-trivial Pythagorean scales (
) in terms of their
i-th ordinal. It is built according to the following algorithm and initial conditions, by assuming the null scale
with
, and the trivial scale
with
, which is composed of the fundamental tone alone. Obviously, the first non-trivial scale
with
, is formed by the class of the generator tone in addition to the fundamental, from which the others are generated:
The lineages may be noted as , , , , etc. From the foregoing code, by defining it is straightforward to see the following.
Lemma 1. For , and
- (a)
.
- (b)
.
- (c)
is the first of a lineage ⇔ and .
- (d)
In the -lineage, if is the first of the lineage (), then .
- (e)
is the first of a lineage ⇔
Therefore, owing to item (e), we reformulate Theorem 1,
Theorem 2. is the first of a lineage ⇔ is optimal.
And, owing to item (c),
Corollary 1. The number of tones of each optimal scale is the ruling index of a lineage.
2.4. Mechanical Words
The procedure to determine cyclic scales and their refinements is also related to the concept of mechanical or Sturmian words used in several approaches to the theory of well-formed scales and modes [
18,
19,
20], which are based on methods of combinatorics on words (e.g., [
31]).
A cyclic scale can be defined as a Christoffel word of the alphabet , associated with both elementary factors, with slope and length n. The octave is then represented by a word with M letters U and m letters D since . For cyclic scales, the first step of the octave must be U and the last step must be D. Each value n is associated with one word , for instance, , , .
Depending on the relative size of the elementary factors, the scale can be refined to form the next cyclic scale in the following way: if , by factorizing , otherwise by factorizing , and so on.
It is important to remark the following properties [
10] used in the next section:
If the generic accidentals are the tones obtained by increasing the previous one by a factor U, and come alone. Then, U is the accidental factor and D the diatonic factor.
If , the generic accidentals are the tones that are followed by a factor D and come alone. Then, D is the accidental factor, and U is the diatonic factor.
In a scale, the relative size of the elementary factors relies on (or ) and the role diatone/accidental relies on ; therefore, in , they are not related (in the link , depends on instead of ).
Consecutive optimal scales have alternate short and long elementary factors.
To better understand how the mechanical words are formed, we examine two examples, namely the successive cyclic scales and .
For , the indices of the extreme tones are , , and the associated word is . The next cyclic scale is for , where its first five iterates (its generic diatones) are the tones of the 5-tone scale. The indices of the extreme tones are , , with . The index of the minimum tone and its associated factor U are maintained. Therefore, in the 5-tone scale, the interval factorized to form the next scale is the one associated with the maximum tone, . Hence, the new tones of the 7-tone scale, i.e., its accidentals, are placed just at the beginning of a factor , and the generic diatones, just at the beginning of a factor U (note that the factors U are maintained and the factors come alone). Thus, . Remark that, in the 5-tone scale, the relative size of the elementary factors is . Since it is an optimal scale, in the next scale, this relationship will change according to so that the next letter to be split will be U.
Now, we take as reference the 7-tone scale, with associated word . The next cyclic scale is for , where the first seven iterates (its generic diatones) are the tones of the 7-tone scale. The new indices of the extreme tones are , , with . The index of the maximum tone is maintained, and so is the factor D. Therefore, in the 7-tone scale, the interval factorized is the one associated with the minimum tone, . Then, the generic accidentals of the 12-tone scale come just at the end of a factor (which come alone), and the generic diatones come at the end of a factor D. Thus, . Since the 7-tone scale is not optimal, in the next 12-tone scale, the relationship is still maintained, , so that the next letter to be split will also be U.
4. Shannon Diversity Index
In [
23], the concept of entropy was used to compare scale partitions and to classify them with regard to the regularity of their intervals. This involved the number of intervals together with their respective size, and it could be applied to cyclic and non-cyclic scales. The
bias of a cyclic scale was defined from its partition entropy as
. It was proven that scales with minimal bias were optimal. In this way, the partition entropy is related to the best rational approximations of the generator.
Entropy can also be applied to compare scales with regard to their composing tones and intervals separately or to determine lineages, which are organized as a kinship. Such an approach, as we have seen, is related to the alternating sides of the semiconvergents of the canonic continued fraction expansions of the generator.
A cyclic scale is composed of two populations, either for tones or intervals, associated with the generic diatones and accidentals. Regardless of how the tones or intervals are mixed, the proportion in which they are present—either in abundance or in the space the intervals occupy the octave—determines some kind of diversity that may have consequences in music.
There are several indices to quantify diversity. Here, we focus on the Shannon diversity index based on entropy [
32]. The original purpose of Shannon’s index was to determine the uncertainty in predicting the following letter of a given alphabet in a given string. Thus, the more letters there are, the more difficult it is to predict which letter will be next in the string. Similarly, the closer their proportional abundances in the string, the more difficult it will also be to predict the next letter.
If
S is the cardinality of the alphabet and
is the proportion of characters belonging to the
i-th type of letter in the string, the Shannon index is defined as
It is useful to remember the following three properties of the
z function, which will simplify the forthcoming operations:
For cyclic scales, the number of types of notes and intervals is fixed to
. What is variable is the proportion between generic diatones and accidentals. Since there are
m and
M notes and intervals of the respective types, then the whole scale plays the role of the string of the alphabet, with respective proportions
,
. Thus, with regard to abundances, by taking into account (
3), we write the diversity index as
Depending on the scale, the number of generic diatones is either m or M, always the greatest of both. Hence, the ratio of accidentals to the number of scale notes is always less than . These values depend on the scale digit . For two consecutive scales , with respective scale digits and , if , then is the number of generic diatones in , while if , this number is .
In the limiting case , then , which means that the uncertainty is maximum in predicting the type of one arbitrary scale note.
If we consider the n-tone equal temperament (i.e., regular) scale associated with the cyclic scale , which is a degenerate cyclic scale, it is still possible to distinguish between generic diatones and accidentals (likewise in the piano keys), although their associated intervals are of equal size.
Nevertheless, we must bear in mind that there are other degenerate cases. In terms of the interval closure
, the respective intervals fill in the octave as
Hence, if , then the n-tone scale is regular. However, when considering the equal temperament scales resulting from the degenerate cases and , then since there would only remain one type of scale tone. However, in such a case, we would not be dealing with an n-tone cyclic scale.
4.1. Abundance–Diversity Index
In the link
(
) of the chain of cyclic scales, the generic diatones are the first
iterates of
and the accidentals are the last
iterates (
). Then, it is useful to write the
abundance–diversity index as follows,
If
, obviously
. If
, then
, although it will always occur that
. Therefore, as shown in
Figure 2, in terms of the fraction of accidentals
(
), the diversity index
is an increasing, bijective function
.
In consequence, since the fraction of accidentals decreases from the second stage of a lineage up to the end (i.e., along an invariant ruling index), the abundance–diversity index also decreases (Lemma 5).
The contribution of the generic accidentals to the whole abundance–diversity index can be evaluated from the
accidental-abundance, as
Similarly, for the generic diatones, the
diatone-abundance can be defined as
4.2. Cumulative Abundance–Diversity Index
If instead of focusing on one link of the chain, we take into account all the links up to
, it is also possible to consider the successive accidentals of the partial chain
,
, as if they were of different types. In this way, the emphasis is placed even more on the generic accidentals of
than on its diatones, since these remain dissolved in the many accidentals of the previous scales to
. According to (
2), since
, the
cumulative abundance–diversity index is given by
Theorem 3. The cumulative abundance–diversity index satisfies Proof. Owing to the sub-additivity property of the entropy, we can evaluate separately the entropy of the partition corresponding to the last link of the chain,
, and the entropy coming from the remaining subpartitions, so that
According to (
6), the first two terms on the right-hand side match the index
, so that
By writing recursively the above expression, we get (
3). □
The cumulative abundance–diversity index is upper-bounded
in which the maximum would be attained if
,
.
The
cumulative accidental-abundance of
can be expressed as
The relationship between both accidental-abundance indices is straightforward to obtain by comparing (
7) and (
8),
Thus, by taking into account (
3), we obtain the following relationship.
Corollary 2. The accidental-abundance indices satisfy 4.3. Occupancy–Diversity Index
The other criterion to distinguish between generic diatones and accidentals is to consider the fraction of the octave that the intervals u and d occupy.
Let us remember that, if , the diatonic interval is d, which ends in a generic diatone. Then, the interval d does not change in the link . Each u-interval ends in an accidental.
Otherwise, if , the diatonic interval is u, which starts in a diatone. The interval u is maintained in this link. Each d-interval starts in an accidental.
For each cyclic scale, we gather all the
M u-intervals and the
m d-intervals, so that
and
. The
occupancy–diversity index is then given by
By taking into account (
5), the index
h can be written as follows,
Bearing in mind (
4), if
, we obtain the obvious result for
n-tone regular scales,
Lemma 3. If , then .
Although the number of accidentals is lower than
, their size is not restricted to less than half an octave since it relies on the sizes of
u and
d. This means that according to the shape of the entropy of
Figure 2, there are two values of
s providing the same index value. This is because
h depends on
, while
does not.
For fixed values
, the function
h can be written in terms of
as
Notice that, according to [
23] (Equations A4 and A7),
implies
. Then, it is also fulfilled
.
Then, it is immediate to prove the following equalities.
Lemma 4. - (a)
;
- (b)
;
- (c)
.
In this case, we cannot affirm that the occupancy–diversity index has a monotonous increasing or decreasing trend along the stages of an invariant ruling index. Along a lineage, one of the indices
m or
M is maintained, and so is the sign of
, until the penultimate (optimal) scale. Thus, the quantities
and
vary, the lower one, the greater the other. We shall see in
Section 5.2 that the beginning of a non-short lineage matches a local minimum of
h so that between two consecutive non-short lineages, the occupancy–diversity index first increases and afterwards decreases.
7. Conclusions
The present paper provides an application and interpretation of the best one-sided rational approximations of the generator tone to music. The semiconvergents of the canonic continued fraction expansions of the generator do not provide optimal scales with regard to the closure condition, but they do induce a regular subdivision of one of the elementary intervals until reaching a convergent, which determines scale lineages along the chain of cyclic scales.
By combining several approaches leading to Pythagorean tuning, what happens between the consecutive stages of a non-short lineage (with more than two scales) can be summarized as follows: (1) one of the indices of the extreme tones is maintained (the ruling index); (2) the smallest of the elementary intervals is maintained and the other is split into two, one with the same size as the smallest interval; (3) the tones of the previous scale (generic diatones) are maintained, and as many new tones as the ruling index are added (generic accidentals) in the following scale.
At the end of a lineage, the scale is regular by sections with at least two superdiatonic intervals (the more regular intervals, the more stages the lineage has) that are separated by a single subdiatonic interval.
Figure 3 displays the last scale of the lineage
. The white intervals are the superdiatonic intervals (23.46¢), and the gray intervals are the subdiatonic intervals (19.84¢). The penultimate scale of the lineage is always optimal, i.e., corresponds to a convergent of the continued fraction expansion of the generator tone, although in this case, the last 53-tone scale is also optimal, which endows the scale with very interesting properties, since, in addition, it is of minimum bias and very close to an equal temperament scale.
It has been proven that the sum of the ruling indices up to the i-th stage is the number of tones of . For the last scale of a lineage, the number of subdiatones and superdiatones match the number of tones of both previous optimal scales.
Such an organization induces a partition into the scale defined by the two types of tones and intervals. How this diversity varies along a lineage has been analyzed through the Shannon diversity index based on entropy, either for an abundance of tones, , or for occupancy of intervals, h.
During a lineage, along the stages with the same ruling index, the abundance–diversity index decreases, having a minimum at the end of a lineage. On the other hand, the occupancy–diversity index is low at the beginning of a non-short lineage after an optimal scale, meaning that there is a significant difference between the fraction of octave occupied by the diatonic and accidental intervals, in this way allowing the interval refinement. During the lineage, the occupancy–diversity index increases and decreases as the fractions of octave and change their relative proportions. Local minima of h take place at the beginning of non-short lineages.
Then, the regular refinement of one of the elementary intervals is determined by the beginning of a short lineage corresponding to a local minimum of h and by the end of a lineage corresponding to a local minimum of .
Figure 4 displays the trend of the diversity indices in Pythagorean tuning. We point out the most interesting cases of non-short lineages for music scales with a reasonable number of tones, so to say, with
.
Where . The lineage starts and ends at a local minimum of and h. In each new stage, 5 (ruling index) new tones are regularly added. In the 17-tone scale, the diatonic elementary interval of the 7-tone scale has been split into two regular intervals, so that between the five subdiatones of the 17-tone scale we may find 2 or 3 equally spaced superdiatones out of 12.
Where . The first stage is a local minimum of both and h, the last one is a local minimum of . In each next stage, 12 (ruling index) new microtones are regularly added. In the 53-tone scale, the diatonic elementary interval of the 17-tone scale has been split into three regular intervals, so that between the 12 subdiatones of the 53-tone scale, we may find 3 or 4 regularly distributed out of the 41 superdiatones.
Where . The first stage is a local minimum of h, and the last stage is a local minimum of both, and h. In each stage, 53 (ruling index) new microtones are regularly added. In the 359-tone scale, the diatonic elementary interval of the 94-tone scale has been split into five regular intervals, so that between the 53 subdiatones of the 94-tone scale, we may find 5 or 6 regularly distributed out of the 306 superdiatones.
In music, the lineage has the following interpretation. For each tone of the heptatonic scale C, D, E, F, G, A, B, one has the possibility to choose between two accidentals on each side, i.e., C♯, D♯, F♯, G♯, A♯, plus D♭, E♭, G♭, A♭, B♭. Using these alternative accidentals is known as expressive intonation.
Some Middle-East music systems, such as the Ottoman, follow a similar approach by using added tones in the lineage , where a selected row of tones are allowed to vary one Pythagorean comma up or down (23.46¢) to produce melodies with emotional intent or to tune to precise frequency ratios.
According to [
33] (and references therein), Al-Kindi (ca. 800-873) was the first to make use of the Abjad (Arabic shorthand for “ABCD”) pitch notation to denote finger positions on the ud for his 12-note approach, which was purely Pythagorean. It was the precursor to Urmavi’s 17-tone scale (1216-1294), which added five additional backward fifth iterations. This is an example of the lineage
. On the other hand, several extensions of the 17-tone scale by adding sets of 12 fifths either backward or forward (such as the Arel-Ezgi-Uzdilek and Yekta variants) end in the 53-tone Pythagorean scale, which is very close to the 53 equal divisions of the octave. This scale is a common grid embracing the previous tunings, with 9 commas per whole tone, and 53 commas per octave. This comma is Holdrian, i.e., 22.64¢ wide, which is less than one cent error to the Pythagorean comma. This is an example of the lineage
.
For fretless instruments, the last scale of a non-short lineage makes it easy to accurately determine the position of the superdiatones by referring them to the subdiatones. In general, from a music theory perspective, this scale has more flexibility in relation to symmetry rotations of specific intervals.