The first section of this paper considers the mathematical and musical principles by which the shruti positions (note positions in the system of "just intonation") are determined. A system of shorthand tuning symbols is given by which the tuning procedures for each of the shruti positions is concisely expressed. Using these symbols to summarize the appropriate tuning procedures, the positions of the shrutis are given in tables of families.
Then follows a description of a simple mathematical model of the shruti-swara-grama-murchana system of Bharata, Dattila, and Sharangadeva. A study of the harmonic structure of the gramas (fundamental scales) reveals that the principle scale-types employed in Hindustani classical music form a 'main-sequence' of scales directly relatable to the harmonic structure of the ancient gramas. This is summarized in a table of the 'extended murchana series' of scales derivable from the Ma and Sa gramas.
Excerpts of an AI review of this paper (Academia, June 2025)
This paper presents a rigorous mathematical framework for understanding one of the most complex and foundational concepts in Indian classical music theory: the ancient system of shrutis (microtonal intervals) and their relationship to scales (gramas) and melodic types (jatis). Arnold's work bridges the gap between abstract musicological theory and practical application through innovative mathematical modeling and visual representation.
Theoretical Foundation and Methodology
Arnold begins by addressing a fundamental challenge in Indian music theory: the precise determination of shruti positions within the octave. The traditional system recognizes 22 shrutis as the basic building blocks of melody, but their exact tuning has remained contentious among scholars and practitioners. The author develops an elegant shorthand notation system that concisely expresses tuning procedures for each shruti position, making complex intervallic relationships accessible through symbolic representation.
The paper's mathematical approach is grounded in just intonation principles, using frequency ratios derived from the harmonic series. Arnold systematically works through the mathematical relationships that define each shruti, presenting detailed tables that show the frequency ratios, periods, and harmonic relationships for different families of shruti positions. This methodical approach provides unprecedented clarity to what has historically been a murky area of music theory.
The Physical Model
One of the paper's most innovative contributions is the description of a physical model consisting of two rotating wheels: a fixed outer wheel representing shruti divisions and a movable inner wheel representing grama scales. This tangible device allows musicians and theorists to visualize the complex relationships between different scale types and their harmonic implications. The model serves as both an analytical tool and a practical calculator for determining intervallic relationships between any two shruti positions.
The wheel design reflects deep understanding of the cyclical nature of musical intervals and demonstrates how ancient Indian theorists like Bharata, Dattila, and Sharangadeva conceptualized harmonic relationships. By making these abstract concepts physically manipulable, Arnold provides an invaluable pedagogical tool for understanding classical Indian music theory.
Historical Integration and Validation
Arnold validates his mathematical model against the writings of ancient theorists, particularly focusing on the grama-murchana system described in classical treatises. The paper demonstrates how the principle scale-types used in contemporary Hindustani classical music can be traced back to these ancient harmonic structures, forming what Arnold terms a "main-sequence" of scales directly related to the fundamental gramas.
This historical grounding lends credibility to the mathematical framework while simultaneously providing new insights into the evolution of Indian musical practice. The paper shows how modern ragas maintain harmonic relationships with their ancient predecessors, despite centuries of stylistic development.
Practical Applications and Limitations
The model's practical utility extends beyond theoretical analysis to performance applications. Arnold suggests the system can help determine interval relationships, study melodic movement in ragas, and understand harmonic consonance patterns. However, the paper acknowledges important limitations, particularly noting that actual performance practice in Indian classical music involves constant microtonal adjustments rather than fixed frequency relationships.
This recognition of the difference between theoretical models and living musical practice demonstrates Arnold's nuanced understanding of Indian music. The author appropriately positions the mathematical framework as a tool for understanding structural principles rather than a prescription for performance practice.
Significance and Impact
Arnold's work represents a significant contribution to ethnomusicology and music theory, providing the first comprehensive mathematical model of the ancient Indian tonal system. The paper successfully demonstrates that rigorous analytical methods can illuminate traditional music systems without diminishing their cultural authenticity or practical flexibility.
The integration of historical scholarship, mathematical analysis, and practical application makes this work valuable for multiple audiences: music theorists seeking analytical frameworks, performers wanting deeper understanding of raga structure, and scholars of Indian culture exploring the mathematical sophistication of classical treatises.
While the paper's technical nature may limit its accessibility to general readers, its methodological innovations and theoretical insights establish it as essential reading for anyone seriously engaged with Indian classical music theory or comparative musicology.
On electronic instruments such as the Bol Processor, microtonality is the matter of "microtonal tuning", here meaning the construction of musical scales outside the conventional one(s) …
Symbolic-numerical approaches lead to efficient and elegant solutions of constraint satisfaction problems with respect to symbolic and physical durations, …
The complete set of preludes and fugues by J.S. Bach known as The Well-tempered Clavier, books II and II, interpreted with presumably "optimal" tuning schemes …
Bol Processor grammars are characterisations of sequential events in terms of substring repetitions, homomorphisms, etc. Parsing techniques, stochastic production and recent developments of BP grammars are briefly described …
A linguistic model of tabla improvisation and evaluation derived from pattern languages and formal grammars has been implemented in the Bol Processor, a software system used in interactive fieldwork with expert musicians …
This paper deals with the scheduling of “sound-objects”, hereby meaning predefined sequences of elementary tasks in a sound processor, with each task mapped to a time-point …
Bernard Bel Knowledge acquisition and representation in music Thèse de doctorat en sciences. Université de droit, d'économie et des sciences …
Bernard Bel Journées d'Informatique Musicale 1996, Caen (France) Abstract Most computer music environments privilege music representations derived from western common …
This article analyzes the two-vina experiment as a thought experiment, exploring how ancient Indian scholars conceptualized musical intervals and scales without numerical values. It discusses the historical context, contrasting Indian mathematical and philosophical traditions with Western perspectives, and proposes an algebraic interpretation of the experiment to understand its implications for tuning systems and microtonality. The article also highlights the significance of circular representations in Indian music and the epistemological preference for empirical evidence in ancient Indian thought.
The first six chapters of Natya Shastra, a Sanskrit treatise on music, dance and drama dating from between 400 BCE and 200 CE, contain the premises of a scale theory that has long attracted the attention of scholars in India and the West. Early interpretations by Western musicologists followed the "discovery" of the text in 1794 by the philologist William Jones. Hermann Helmholtz’s theory of "natural consonance" gave way to many comparative speculations based on phenomena that Indian authors had earlier observed as inherent in the "self-production" (svayambhū) of musical notes (Iyengar 2017 p. 8).
Suvarnalata Rao and Wim van der Meer (2009) published a detailed account of attempts to elucidate the ancient theory of musical scales in the musicological literature, returning to the notions of ṣruti and swara which have changed over time up to present-day musical practice.
Accurate settings of Bel's Shruti Harmonium (1980)
In the second half of the 20th century, experimental work with frequency meters led to contradictory conclusions from the analysis of small samples of musical performances. It was only after 1981 that systematic experiments were carried out in India by the ISTAR team (E.J. Arnold, B. Bel, J. Bor and W. van der Meer) with an electronically programmable harmonium (the Shruti Harmonium) and later with a "microscope" for melodic music, the Melodic Movement Analyser (MMA) (Arnold & Bel 1983, Bel & Bor I985), which fed precise pitch data into a computer to process hours of music selected from historical recordings.
After several years of experimental work, it had become clear that although the intonation of Indian classical music is far from being a random process, it would be dangerous to judge an interpretation of the ancient scale theory on the basis of today's musical data. There are at least three reasons for this:
There are an infinite number of valid interpretations of the ancient theory, as we will show.
The concept of raga, the basic principle of Indian classical music, first appeared in literature around 900 CE in Matanga's Brihaddeshi and underwent gradual development until the 13th century, when Sharangadeva listed 264 ragas in his Sangitratnakara.
Drones were (probably) not in use at the time of Natya Shastra; the influence of the drone on intonation is considerable, if not dominant, in contemporary music performance.
The ancient Indian theory of scales remains useful for its insight into early melodic classification (the jāti system), which may later have given rise to the raga system. It is therefore best thought of as a topological description of tonal structures. Read Raga Intonation for a more detailed account of theoretical and practical issues.
The subject of this page is an interpretation of the experiment of the two vinas described in Chapter XXVIII.24 of the Natya Shastra. An analysis of the underlying model has been published in A Mathematical Discussion of the Ancient Theory of Scales according to Natyashastra (Bel 1988) which the following presentation will make more comprehensive.
The historical context
Bharata Muni, the author(s) of the Natya Shastra, may have heard of the theories of musical scales attributed to the "ancient Greeks". At any rate, Indian scholars were able to borrow these models and extend them considerably because of their real knowledge of arithmetic.
Readers of C.K. Raju — especially his excellent Cultural Foundations of Mathematics (2007) — know that Indian mathematicians/philosophers are not only famous for inventing positional notation which took six centuries to be adopted in Europe… They also laid out the foundations of calculus and infinitesimals, which were later exported to Europe by Jesuit priests from Kerala and borrowed/appropriated by European scholars (Raju 2007 pages 321-373).
The calculus first developed in India as a sophisticated technique to calculate precise trigonometric values needed for astronomical models. These values were precise to the 9th place after the decimal point; this precision was needed for the calendar, critical to monsoon-driven Indian agriculture […]. This calculation involved infinite series which were summed using a sophisticated philosophy of ratios of inexpressed numbers [today called rational functions…].
Europeans, however, were primitive and backward in arithmetical calculations […] and barely able to do finite sums. The decimal system had been introduced in Europe by Simon Stevin only at the end of the 16th c., while it was in use in India since Vedic times, thousands of years earlier.
C. K. Raju (2013 p. 161- 162)
This may be cited in contrast with the statements of western historians, among which:
The history of mathematics cannot with certainty be traced back to any school or period before that of the Greeks […] though all early races knew something of numeration […] and though the majority were also acquainted with the elements of land-surveying, yet the rules which they possessed […] were neither deduced from nor did they form part of any science.
W. W. Rouse Ball, A Short Account of the History of Mathematics. Dover, New York, 1960, p. 1–2.
So, it may seem paradoxical, given such an intellectual baggage, to write an entire chapter on musical scales without a single number! In A Mathematical Discussion of the Ancient Theory of Scales according to Natyashastra I showed a minimal reason: Bharata's description leads to an infinite set of solutions that should be formalised with algebra rather than a set of numbers.
The experiment
The author(s) of Natya Shastra invite(s) the reader to take two vina-s (plucked stringed instruments) and tune them on the same scale.
A word of caution to clarify the context: this chapter of Natya Shastra can be read as a thought experiment rather than a process involving physical objects. There is no certainty that these two vina-s ever existed — and even that "Bharata Muni", the author/experimenter, was a unique person. His/their approach is one of validation (pramāņa) by empirical evidence, in other words driven by the physically manifest (pratyakşa) rather than inferred from "axioms" constitutive of a theoretical model. This can be summed up as a "preference for physics over metaphysics".
Constructing and manipulating vina-s in the manner indicated by the experimenter appears to be an insurmountable technological challenge. This has been discussed by a number of authors — see Iyengar (2017 pages 7-sq.) Leaving aside the possibility of practical realisation is not a denial of physical reality, as formal mathematics would systematically dictate. Calling it a "thought experiment" is a way of asserting the connection with the physical model. Similarly, the use of circular graphs to represent tuning schemes and algebra to describe relationships between intervals are aids to understanding that do not reduce the model to specific, idealistic interpretations similar to the speculations about integers cherished by Western scientists. These graphs are intended to facilitate the computational design of instruments that model these imagined instruments — see Raga intonation and Just intonation, a general framework.
Let us follow Bharata's instructions and tune both instruments to a scale called "Sa-grama" about which the author explains:
The seven notes [svaras] are: Şaḍja [Sa], Ṛşbha [Ri], Gāndhāra [Ga], Madhyama [Ma], Pañcama [Pa], Dhaivata [Dha], and Nişāda [Ni].
It is tempting to identify this scale as the conventional western seven-degree scale do, re, mi, fa, sol, la, si ("C", "D", "E", "F", "A", "B"), which some scholars have done despite the erroneous interpretation of the intervals.
Intervals are notated in shruti-s, which can be thought of as an ordering device rather than a unit of measurement. Experiment will confirm that a four-shruti interval is greater than a three-shruti, a three-shruti greater than a two-shruti and the latter greater than a single shruti. In different contexts, the word "shruti" refers to note positions rather than intervals between notes. This ambiguity is also a source of confusion.
The author writes:
Śrutis in the Şaḍja Grāma are shown as follows: three [in Ri], two [in Ga], four [in Ma], four [in Pa], three [in Dha], two [in Ni], and four [in Sa].
Bharata uses 9-shruti (consonant) intervals: "Sa-Pa", "Sa-Ma", "Ma-Ni", "Ni-Ga" and "Re-Dha". He also defines another scale called "Ma-grama" in which "Pa" is one shruti lower than "Pa" in the Sa-grama, so that "Sa-Pa" is no longer consonant whereas "Re-Pa" is consonant because it is made up of 9 shruti-s.
Intervals of 9 or 13 shruti-s are declared "consonant" (samvadi). Ignoring the octave, the best consonance in a musical scale is the perfect fifth with a frequency ratio close to 3/2. When tuning stringed instruments, a ratio other than 3/2 will produce beats indicating that a string is out of tune.
Sa-grama and Ma-grama according to Natya Shastra. Red and green segments indicate the two chains of perfect fifths. Underlined note names denote 'flat' positions.
If the frequency ratios are expressed logarithmically with 1200 cents representing an octave, and further converted to angles with a full octave on a circle, the description of the Sa-grama and Ma-grama scales can be summarised on a circular diagram (see figure).
Two cycles of fifths are highlighted in red and green colors. Note that both the "Sa-Ma" and "Ma-Ni" intervals are perfect fifths, which discards the association of Sa-grama with the conventional western scale: the "Ni" should be mapped to "B flat", not to "B". Furthermore, the perfect fifth "Ni-Ga" implies that "Ga" is also "E flat" rather than "E". The Sa-grama and Ma-grama scales are therefore "D modes". This is why "Ga" and "Ni" are underlined in the diagrams.
Authors eager to identify Sa-grama and Ma-grama as a western scale have claimed that when the text says that there are "3 shruti-s in Re" it should be understood as between Re and Ga. However, this interpretation is inconsistent with the second lowering of the movable vina (see below).
We must avoid jumping to conclusions about the intervals in these scales. The two cycles of fifths are unrelated, except that the "distance" between the "Pa" of Ma-grama and that of Sa-grama is "one shruti":
The difference which occurs in Pañcama when it is raised or lowered by a Śruti and when consequential slackness or tenseness [of strings] occurs, will indicate a typical (pramāņa) Śruti. (XXVIII, 24)
In other words, the size of this pramāņa ṣruti is not specified. It would therefore be misleading to postulate its equivalence to the syntonic comma (frequency ratio 81/80). To do so reduces Bharata's model to "just intonation", indeed with interesting properties in its application to western harmony (see page), but with a questionable relevance to the practice of Indian music. As stated by Arnold (1983 p. 39):
The real phenomenon of intonation in Hindustani Classical Music as practised is much more amorphous and untidy than any geometry of course, as recent empirical studies by Levy (1982), and Arnold and Bel (1983) show.
The designation of the smallest interval as "pramāņa ṣruti" is of great epistemic importance and deserves a brief explanation. The semantics of "slackness or tension" clearly belong to "pratyakṣa pramāṇa", the means of acquiring knowledge through perceptual experience. More precisely, "pramāṇa" (प्रमाण) refers to "valid perception, measure and structure" (Wisdom Library), a notion of evidence shared by all traditional Indian schools of philosophy (Raju 2007 page 63). We will return to this notion in the conclusion.
An equivalent way of connecting the two cycles of fifths would be to define a 7-shruti interval, for example "Ni-Re". If the pramāņa ṣruti were a syntonic comma then this interval would be a harmonic major third with a ratioof 5/4. As mentioned in Just intonation, a general framework, the invention of the major third as a consonant interval dates back to the early 16th century in Europe. In Natya Shastra this 7-shruti interval was classified as "assonant" (anuvadi).
In all writings referring to the ancient Indian theory of scales, I have occasionally used "pramāņa ṣruti" and "syntonic comma" as equivalent terms. This is acceptable if one accepts that the syntonic comma can take values other than 81/80. Consequently, the "harmonic major third" should not automatically be assigned a frequency ratio of 5/4.
The picture above shows the two vina-s tuned identically on Sa-grama. Matching notes are marked with yellow dots. The inner part of the blue circle will be the moving vina in the following transpositions, and the outer part the fixed vina.
First lowering
Bharata writes:
The two Vīņās with beams (danḍa) and strings of similar measure, and with similar adjustment of the latter in the Şaḍja Grāma should be made [ready]. [Then] one of these should be tuned in the Madhyama Grāma by lowering Pañcama [by one Śruti]. The same (Vīņā) by adding one Śruti (lit. due to the adding of one Śruti) to Pañcama will be tuned in the Şaḍja Grāma.
In short, this is a procedure for lowering all the notes of the movable vina by one pramāņa ṣruti. First lower its "Pa" — e.g. make it consonant with the "Re" of the fixed vina — to obtain Ma-grama on the movable vina. Then readjust its entire scale to obtain Sa-grama. Note that lowering "Re" and "Dha" means revaluing the size of a pramāņa ṣruti while maintaining the 'Re-Dha' consonant interval. The result is as follows:
The two vinas after a lowering of pramāņa ṣruti
The picture illustrates the fact that there is no longer a match between the two vina-s.
Interpreting shruti-s as variables in some metrics
This situation can be translated into algebra. Let "a", "b", "c" … "v" be the unknown sizes of the shruti-s in the scale (see picture on the side). A metric that "translates" Bharata's model will be necessary to test it on sound structures produced by an electronic instrument — the computer. The scope of this translation remains valid as long as no additional assertion is made that is not rooted in the original model.
Using the symbol "#>" to indicate that two notes do not match, this first lowering can be summarised by the following set of inequalities:
s + t + u + v > m a + b + c > m d + e > m f + g + h + i > m n + o + p > m q + r > m
Sa #> Ni Re #> Sa Ga #> Re Ma #> Ga Dha #> Pa Ni #> Dha
Second lowering
The next step is another lowering by one shruti using a different procedure.
Again due to the decrease of a Śruti in another [Vīņā], Gāndhāra and Nişāda will merge with Dhaivata and Ṛşbha respectively, when there is an interval of two Śrutis between them.
Note that it is no longer possible to rely on a lowered "Pa" to evaluate a pramāņa ṣruti for the lowering. The instruction is to lower the tuning of the movable vina until either "Re" and "Ga" or "Dha" and "Ni" merge, which is claimed to be the same because of the final lowering of two shruti-s (from the initial state):
The two vina-s after the second lowering (2 shruti-s)
Now we have an equation which tells us that the two-shruti intervals are equal in size:
q + r = d + e
and five more inequations indicating the non-matching of other notes:
f + g + h + i > d + e a + b + c > d + e s + t + u + v > d + e n + o + p > d + e j + k + l + m > d + e
Ma #> Ga Re #> Sa Sa #> Ni Dha #> Pa Pa #> Ma
We should bear in mind that the author is describing a physical process, not an abstract "movement" by which the moving wheel (or vina) would "jump" in space from its initial to final position. Therefore, we pay attention to what happens and what does not happen during the tuning of the vina or the rotation of the wheel by looking at the trajectories of the dots representing the note positions (along the blue circle). Things that do not happen (mismatched notes) give rise to inequations that are necessary to make sense of the algebraic model.
This step of the experiment confirms that it is wrong to place Sa in the position of Ni in order to identify Sa-grama with the Western scale. In this case the corresponding notes would not be Re-Ga and Dha-Ni, but Ga-Ma and Ni-Sa.
Third lowering
Bharata writes:
Again due to the decrease of a Śruti in another [Vīņā], Ṛşbha and Dhaivata will merge with Şaḍja and Pañcama respectively, when there is an interval of three Śrutis between them.
The two vinas after the third lowering (3 shruti-s)
This leads to equation
n + o + p = a + b + c
and inequations:
s + t + u + v > a + b + c f + g + h + i > a + b + c j + k + l + m > a + b + c
Sa #> Ni Ma #> Ga Pa #> Ma
Fourth lowering
The procedure:
Similarly the same [one] Śruti being again decreased, Pañcama, Madhyama and Şaḍja will merge with Madhyama, Gāndhāra and Nişāda respectively when there is an interval of four Śrutis between them.
The two vinas after the fourth lowering (4 shruti-s)
This yields 2 equations:
j + k + l + m = f + g + h + i s + t + u + v = f + g + h + i
Algebraic interpretation
After eliminating redundant equations and inequations, the constraints are summarised as follows:
(S1) d + e > m (S2) a + b + c > d + e (S3) f + g + h + i > a + b + c (S4) j + k + l + m = f + g + h + i (S5) s + t + u + v = f + g + h + i (S6) n + o + p = a + b + c (S7) q + r = d + e
The three inequations illustrate the fact that the numbers of shruti-s denote an ordering of the sizes of the intervals between notes.
We still have 22 variables and only 4 equations. These variables can be "packed" into a set of 8 variables representing the "macro-intervals", i.e. the steps of the grama-s. In this approach the shruti-s are a kind of "subatomic" particles of which these "macro-intervals" are made… Now we need only 4 auxiliary equations to determine the scale. These can be provided by acoustic information where the intervals are counted in cents. First we express that the sum of the variables, the octave, is equal to 1200 cents. (A larger value, e.g. 1204, could be used to devise extended octaves).
(S8) (a + b + c) + (d + e) + (f + g + h + i) + (j + k + l) + m + (n + o + p) + (q + r) + (s + t + u + v) = 1200
Then we interpret all samvadi ratios as perfect fifths (ratio 3/2 = 701.9 cents):
(S9) (a + b + c) + (d + e) + (f + g + h + i) + (j + k + l) + m = 701.9 (Sa-Pa) (S10) (j + k + l) + m + (n + o + p) + (q + r) + (s + t + u + v) = 701.9 (Ma-Sa) (S11) (d + e) + (f + g + h + i) + (j + k + l) + m + (n + o + p) = 701.9 (Re-Dha) (S12) (f + g + h + i) + (j + k + l) + m + (n + o + p) + (q + r) = 701.9 (Ga-Ni)
including the "Re-Pa" perfect fifth in Ma-grama:
(S13) m + (n + o + p) + (q + r) + (s + t + u + v) + (a + b + c) = 701.9
S10, S11 and S12 can all be derived from S9. So these equations can be discarded. We still need one more equation to solve the system. At this stage there are many options in terms of tuning procedures. As suggested above, setting the harmonic major third to the ratio 5/4 (386.3 cents) would provide the missing equation. This is equivalent to setting the variable "m" to 21.4 cents (syntonic comma). However, this major third can be any size up to the Pythagorean third (81/64 = 407.8 cents), for which we would get m = 0.
Beyond this range, the two-vina experiment is no longer valid, but it leaves a large number of possibilities, including the temperament of some intervals, which musicians might spontaneously achieve in parallel melodic movements. A number of solutions are presented in A Mathematical Discussion of the Ancient Theory of Scales according to Natyashastra, and some of these have been tried on the Bol Processor to check musical examples for which they might provide adequate scales — see Raga intonation.
Extensions of the model
To complete his system of scales, Bharata needed to add two new notes to the basic grama-s: antara Gandhara and kakali Nishada. The new "Ga" is defined as "G" raised by 2 shruti-s. Similarly, kakali Ni is "N" raised by 2 shruti-s.
In order to position "Ni" and "Ga" correctly we must study the behaviour of the new scale in all transpositions (murcchana-s), including those beginning with "Ga" and "Ni", and derive equations corresponding to an optimal consonance of the scale. We end up with 11 equations for only 10 variables, which means that this perfection cannot be achieved. One constraint must be released.
One option is to release the constraints on major thirds, fifths or octaves, resulting in a form of temperament. For example, stretching the octave by 3.7 cents produces perfect fifths (701.9 cents) and harmonic major thirds close to equal temperament (401 cents) with a comma of 0 cents. This tuning technique was advocated by Serge Cordier (Asselin 2000 p. 23; Wikipedia).
An equal-tempered scale with octave stretched at 1204 cents. (Image created by Bol Processor BP3)
Another option is to get as close as possible to "just intonation" without changing perfect fifths and octaves. This is possible by allowing the comma (variable "m") to take any value between 0 and 56.8 cents. Limits are imposed by the inequations derived from the two-vina experiment.
These "just systems" are calculated as follows:
a + b + c = j + k + l = n + o + p = Maj - C d + e = h + i = q + r = u + v = L + C f + g = s + t = Maj - L - C m = C
where L = 90.25 cents (limma = 256/243), Maj = 203.9 cents (major wholetone = 9/8) and 0 < C < 56.8 (pramāņa ṣruti or syntonic comma)
This leads to the 53-degree scale called "grama" which we use as a framework for consonant chromatic scales suitable for pure intonation in western harmony when the syntonic comma is sized 81/80. Read Just intonation, a general framework:
The "grama" scale used for just intonation, with a syntonic comma of 81/80. Pythagorean cycle of fifths in red, harmonic cycle of fifths in green.
In BP3, the just-intonation framework has been extended so that any value of the syntonic comma (or the harmonic major third) can be set on a given scale structure. This feature is demonstrated on the Raga intonation page.
The relevance of circular representations
Circular representation of tāl Pañjābi, catuśrajāti [16 counts] from a Gujarati text in Devanagari script (J. Kippen, pers. communication)
It is safe to classify the two-vina experiment as a thought experiment, since it is unlikely that it could be carried out with mechanical instruments. Representing it on a circular graph (a movable wheel inside a fixed crown) achieves the same goal without resorting to imaginary devices.
Circular representations belong to Indian traditions of various schools, including the description of rhythmic cycles (tāl-s) used by drummers. These diagrams are meant to outline the rich internal structure of musical constructions that cannot be reduced to "beat counting" (Kippen 2020).
For example, the image on the side was used to describe the ţhekkā (cycle of quasi-onomatopoeic syllables representing the beats of the drum) of tāl Pañjābi which reads as follows:
Unfortunately, early printing technology may have made the publication and transmission of these learning aids difficult.
If Bharata's contemporaries ever used similar circular representations to reflect on musical scales, we suspect that archaeological traces might not be properly identified, as their drawings might be mistaken for yantra-s, astrological charts and the like!
Return to epistemology
Bharata's experiment is a typical example of the preference for facts derived from empirical observation over a proclaimed universal logic aimed at establishing "irrefutable proofs".
Empirical proofs are universal, not metaphysical proofs; eliminating empirical proofs is contrary to all systems of Indian philosophy. Thus elevating metaphysical proofs above empirical proofs, as formal mathematics does, is a demand to reject all Indian philosophy as inferior. Curiously, like Indian philosophy, present-day science too uses empirical means of proof, so this is also a demand to reject science as inferior (to Christian metaphysics).
Logic is not universal either as Western philosophers have foolishly maintained: Buddhist [quasi truth-functional] and Jain [three-valued] logics are different from those currently used in formal mathematical proof. The theorems of mathematics would change if those logics were used. So, imposing a particular logic is a means of cultural hegemony. If logic is decided empirically, that would, of course, kill the philosophy of metaphysical proof. Further, it may result in quantum logic, similar to Buddhist logic […].
C. K. Raju (2013 p. 182-183)
Yuktibhāşā's proof of the "Pythagorean" theorem. Source: C. K. Raju (2007 p. 67)
The two-vina experiment can be compared to the (more recent) physical proof of the "Pythagorean theorem". This theorem (Casey 1885 p. 43) was known in India and Mesopotamia long before the time of its legendary author (Buckert 1972 p. 429, 462). In the Indian text Yuktibhāşā (c. 1530 CE), a figure of a right-angled triangle with squares on either side and its hypothenuse is drawn on a palm leaf. The figure is then cut and rotated to show that the areas are equal.
Obviously, the proof of the "Pythagorean Theorem" is very easy if you are either (a) allowed to take measurements or, equivalently, (b) allowed to move figures around in space.
C. K. Raju (2013 p. 167)
This process takes place in several stages of moving figures, similar to the moving scales (or figures representing scales) in the two-vina experiment. The 3 single-shruti tone intervals can be compared to the areas of the 3 squares in Yuktibhāşā. The following comment would therefore apply to Bharata's procedure:
The details of this rationale are not our immediate concern beyond observing that drawing a figure, carrying out measurements, cutting, and rotation are all empirical procedures. Hence, such a demonstration would today be rejected as invalid solely on the ground that it involves empirical procedures that ought not to be any part of mathematical proof.
Bharata. Natya Shastra. There is no currently available English translation of the first six chapters of Bharata’s Natya Shastra. However, most of the information required for this interpretation has been reproduced and commented by Śārṅgadeva in his Sangita Ratnakara (13th century CE), translated by Dr R. K. Shringy, vol.I. Banaras 1978: Motilal Banarsidass.
Levy, M. Intonation in North Indian Music. New Delhi, 1982: Biblia Impex.
Raju, C. K. Euclid and Jesus: How and why the church changed mathematics and Christianity across two religious wars. Penang (Malaysia), 2013: Multiversity, Citizens International.
This article discusses the intricate concept of just intonation in music, exploring its historical interpretations and practical applications within the Bol Processor. It contrasts the "Greek" or Pythagorean approach, which emphasizes integer ratios and perfect fifths, with the ancient Indian grama-murcchana model, notable for its flexible, ear-based tuning system and avoidance of numerical ratios in its original formulation. The text explains how this Indian framework can be extended to Western harmony, creating optimally consonant 12-tone scales with subtle differences in enharmonic positions. Ultimately, the author suggests that while mathematical precision can define just intonation, artistic and perceptual experience often guides its most effective implementation, acknowledging that "perfection" might not always be the primary musical goal.
Just intonation (intonation pure in French) is a word used by composers, musicians and musicologists to describe various aspects of composition, performance and instrument tuning. They all point to the same goal of "playing/singing in tune" — whatever that means. Implementing a generic abstract model of just intonation in the Bol Processor is a challenge beyond our current competence… We approach it pragmatically by looking at some musical traditions that pursue the same goal with the help of reliable theoretical models.
A complete and consistent framework for the construction of just-intonation scales - or "tuning systems" - was the grama-murcchana model elaborated in ancient India. This theory has been extensively commented on and (mis)interpreted by Indian and Western scholars: for a detailed review see Rao & van der Meer 2010. We will show that an arguably acceptable interpretation yields a framework of chromatic scales that can be extended to Western classical harmony and easily handled by the Bol Processor — either producing Csound scores or real-time MIDI microtonality.
This page is a continuation of Microtonality but can be read independently.
Methods of tuning musical instruments have been documented in various parts of the world for over 2000 years. For practical and personal reasons we will concentrate on work in Europe and the Indian subcontinent.
Systems described as "just intonation" are attempts to create a tuning in which all tonal intervals are consonant. There is a large body of theoretical work on just intonation - see Wikipedia for links and abstracts.
Models are amenable to Hermann von Helmholtz's notion of consonance which deals with the perception of the pure sinusoidal components of complex sounds containing multiple tones. According to the theory of consonance, the frequencies of these upper partials are integer multiples of the fundamental frequency of the vibration. In mechanical musical instruments, this is close to reality when long strings are gently struck or plucked. However, this harmony is lacking in many wind instruments, especially reed instruments such as the saxophone or the Indian shehnai, and even less in percussion instruments or bells which combine several modes of vibration.
Therefore, if just intonation is invoked to tune a musical instrument, it must be analogous to a zither, a swara mandal, a harpsichord, a piano or a pipe organ, including electronic devices that produce similar sounds.
Perhaps because of their late "discovery" of calculus — actually "borrowed" from Indian, Persian and Arabic sources — Europeans cultivated a fascination with numbers strongly advocated by the Church as an image of "God's perfection". We may recall Descarte's claim that the length of a curve is "beyond human understanding" because π cannot be written as an integer ratio…
In the 17th century, the German mathematician Leibniz set forth the theory of "subconscious evaluation", defining music as "the pleasure of the soul that counts without knowing it". This was followed by the French musical theorist Jean-Philippe Rameau affirming that melody arises from harmony, making it possible "to perceive the relationships between numbers, as they arise throughout the universe".
Regardless of these speculations, musicians in real life had developed procedures for tuning their instruments by listening to intervals and selecting the ones that sounded right to them — see The two-vina experiment page.
After the development of musical acoustics, attempts were made to describe tuning schemes in terms of frequency ratios. This was a risky venture, however, because the dream of perfection led to the simplistic promotion of "perfect ratios". Seeking the kind of perfection embodied in numbers is the best way to produce bland music.
Although just intonation — intervals without beats — is now possible on electronic instruments, it is based on a narrow concept of tonality. This can be verified by listening to ancient Western music performed using different ear-based temperaments — see page Comparing temperaments — and even to Indian classical music — see page Raga intonation.
The “Greek” approach
Greek women playing ancient Harp, Cithara and Lyre musical instruments (source)
Models of vibrating strings attributed to the "ancient Greeks" suggest that frequency ratios of 2/1 (the octave), 3/2 (the major fifth) and 5/4 (the major third) produce consonant intervals, while other ratios produce a certain degree of dissonance.
The practice of polyphonic music on fixed-tuned instruments has shown that this perfect consonance is never achieved with 12 notes in an octave — the conventional chromatic scale. In Western classical harmony, it would require retuning the instrument according to the musical genre, the piece of music and the harmonic context of each melodic phrase or chord.
Imperfect tonal intervals produce unwanted beats because their frequency ratio cannot be reduced to simple 2, 3, 4, 5 fractions. A simple thought experiment, mythically attributed to Pythagoras of Samos, shows that this is inherent in arithmetic and not a defect in instrument design. Imagine the tuning of ascending fifths (ratio 3/2) by successive steps on a harp with octave shifts to keep the resulting note within the original octave. The frequency ratios would be 3/2, 9/4, 27/16, 81/64 and so on. At this stage, the note appears to be a major third although its actual ratio (81/64 = 1.265) is higher than 5/4 (1.25). The 81/64 interval is called the Pythagorean major third, which may sound "out of tune" in a conventional harmonic context. The frequency ratio (81/80 = 1.0125) between the Pythagorean and harmonic major thirds is called the syntonic comma.
Whoever devised the so-called "Pythagorean tuning" went further in their intention to describe all musical notes by cycles of fifths. Going further up, 243/128, 729/512… etc. effectively produces a full chromatic scale: C - G - D - A - E - B - F♯ - C♯ - G♯… etc. But in addition to the harsh sound of some of the resulting intervals, things get bad if one hopes to end the cycle on the initial note. If the series started on 'C', it will end on 'C' (or 'B#'), but with a ratio of 531441/524288 = 1.01364, slightly higher than 1. This gap is called the Pythagorean comma, which is conceptually different from the syntonic comma (1.0125), although their sizes are almost identical. This paradox is a matter of simple arithmetic: powers of 2 (octave intervals) never match powers of 3.
The attribution of this system to the "ancient Greeks" is, of course, pure fantasy, since they (unlike the Egyptians) didn't have any use for fractions!
A 19-key per octave (from "A" to "a") keyboard designed by Gioseffo Zarlino (1517-1590) (source)
Despite the comma problem, tuning instruments by series of perfect fifths was common practice in medieval Europe, following the organum which consisted of singing/playing parallel fifths or fourths to enhance a melody. One of the oldest treatises on "Pythagorean tuning" was published around 1450 by Henri Arnault de Zwolle (Asselin 2000 p. 139). In this tuning, major "Pythagorean" thirds sounded harsh, which explains why the major third was considered a dissonant interval at the time.
Because of these limitations, Western fixed-pitch instruments using chromatic (12-tone) scales never achieve the pitch accuracy dictated by just intonation. For this reason, just intonation is described in the literature as "incomplete" (Asselin 2000 p. 66). Multiple divisions (more than 12 per octave) are required to produce all "pure" ratios. This has been unsuccessfully attempted on keyboard instruments, although it remains possible on a computer.
The Indian approach
Bharata Muni's "Natya Shastra"
The grama-murcchana model was described in the Natya Shastra, a Sanskrit treatise on the performing arts written in India some twenty centuries ago. Chapter 28 contains a discussion of the "harmonic scale", which is based on a division of the octave into 22 shruti-s, while only seven swara-s (notes) are used by musicians: "Sa", "Re", "Ga", "Ma", "Pa", "Dha", "Ni". These can be mapped onto conventional Western music notation "C", "D", "E", "F", "G", "A", "B" in English, or "do", "re", "mi", "fa", "sol", "la", "si" in Italian/Spanish/French.
This 7-swara scale can be extended to a 12-degree (chromatic) scale by means of diesis and flat alterations, which raise or lower a note by a semitone. Altered notes in the Indian system are commonly called "komal Re", "komal Ga", "Ma tivra", "komal Dha" and "komal Ni". The word "komal" can be translated as "flat" and "tivra" as "diesis".
The focus of 20th century research in Indian musicology has been to 'quantify' shruti-s in a systematic way and to assess the relevance of this quantification to the performance of classical raga.
Presentation of the S52 in November 1980 during the Sigma festival in Bordeaux. In the presence of Alain Daniélou, André Kudelski and Claude Cellier. Source: Semantic Daniélou
A striking point in the ancient Indian theory of musical scales is that it does not rely on numerical ratios, be they frequencies or lengths of vibrating strings. This point was overlooked by "colonial musicologists" because of their lack of insight into Indian mathematics and their fascination with a mysticism of numbers inherited from Neopythagoreanism.
In the mid-20th century, the French musicologist Alain Daniélou described "the Indian scale" as a set of 53 intervals per octave based on integer frequency ratios of 2, 3, and 5. His demonstration of raga phrases played on the S52 electronic keyboard instrument, built by Kudelski to this specification, was a painful experience for a musically trained audience — I attended it in Paris in 1980…
As reported by Jonathan Barlow (personal communication, 3/9/2013, links my own):
The ustads in India from way back considered that they followed Pythagoras, but early on they made the discovery that trying to tune by numbers was a losing game, and Ibn Sina (Avicenna) (980-1037 AD), who was their great philosopher of aesthetics, said in plain terms that it was wiser to rely on the ears of the experts. Ahobala tried to do the numbers thing (and Kamilkhani) but they are relegated to a footnote of 17th C musicology.
Bharata Muni, the author(s) of the Natya Shastra, may have heard of "Pythagorean tuning", a theory that Indian scientists could have expanded considerably, given their expertise in the use of calculus. Despite this, not a single number is quoted in the entire chapter on musical scales. This paradox is discussed on my page The Two-vina experiment. In A Mathematical Discussion of the Ancient Theory of Scales according to Natyashastra, I showed a minimal reason: Bharata's description leads to an infinite set of solutions, which should be formalised with some algebra, rather than a set of integer ratios.
How (and why) should the octave be divided into 22 (or 23) micro-intervals when most Indo-European musical systems only name 5 to 12 notes? Some naive ethnomusicologists have claimed that Bharata's model must be a variant of a presumed Arabic "quartertone system", or even a tempered scale with 22 intervals… If so, why not 24 shruti-s? Or any arbitrary number?
The two-vina experiment produces shruti-s of unequal sizes for a simple reason: No sum of microtones of 54.5 cents (1200 / 22) in a 22-degree equal tempered scale would produce an interval close to 702 cents — the perfect fifth that gives consonance (samvadi) to musical scales. (Read below for the definition of the cent as a logarithmic unit.)
In the (thought?) experiment described in Bharata's Natya Shastra (chapter 28), two vina-s — stringed instruments similar to zithers — are tuned identically. The author suggests lowering all the notes of one instrument by "one shruti" and they give a list of notes that will match between the two instruments. The process is repeated three more times until all the matches have been made explicit. This gives a system of equations (and inequations) for the 22 unknown variables.
However, a new equation is needed, which Bharata's model does not provide. Interestingly, in Natya Shastra the major third is classified as "assonant" (anuvadi). Setting its frequency ratio to 5/4 (harmonic major third) is therefore a reduction of this model. In fact, the harmonic major third is a discovery of European musicians in the early 16th century, when fixed-pitch keyboard instruments had become popular (Asselin 2000 p. 139). Nonetheless, many musicologists take it for granted in their interpretation of the Indian model. […] thirds were considered interesting and dynamic consonances along with their inverse, sixths, but in medieval times they were considered dissonances unusable in a stable final sonority (Wikipedia).
The reduction of Bharata's model to a Pythagorean/harmonic tuning scheme, as proposed by E. James Arnold (1985), does not fit with the flexibility of intonation schemes in Indian music — see page Raga intonation. Experimental work on musical practice is not "in tune" with this interpretation of the ancient shruti system. In fact, it should be interpreted as a "flexible" framework in which the variable parameter is the syntonic comma, namely the difference between a Pythagorean major third and a harmonic major third. Adherence to the two-vina experiment only implies that the comma takes its value anywhere between 0 and 56.8 cents (Bel 1988a).
Building tonagrams on the Apple II from tonal data collected by Bel's MMA (1982)
➡ Measurements in cents refer to a logarithmic scale. Given a frequency ratio 'r', its cent value is 1200 x log(r) / log(2). The octave (ratio 2/1) is 1200 cents, and each semitone (in equal temperament) is 100 cents.
The construction and evaluation of raga scale types based on this flexible model is explained on my page Raga intonation.
Extending the Indian model to Western harmony
One incentive for applying the Indian framework to Western classical music is that both traditions have given priority to the consonance of perfect fifths associated with a 3/2 frequency ratio. In line with the Western approach, let us define the harmonic major third as an interval of 5/4 (384 cents). This results in a syntonic comma of 81/80 (close to 21.5 cents). The system of equations derived from the two-vina experiment is complete, and it yields two additional sizes of shruti-s: the Pythagorean limma (256/243 = about 90 cents) and the minor semitone (25/24 = about 70 cents).
These intervals were known to Western musicologists who were trying to find just intonation scales that could be played on keyboard instruments (12 degrees per octave). Gioseffo Zarlino (1517-1590) is a well-known contributor to this theoretical work. His "natural scale" was an arrangement of the three natural intervals yielding the following chromatic scale — named "just intonation" in "-to.tryScales":
A "just intonation" chromatic scale derived from Zarlino's model of "natural scale" (Image created by Bol Processor)
In 1974, E. James Arnold, inspired by the French musicologist Jacques Dudon, designed a circular model to illustrate the transposition of scales (murcchana) in Bharata's model. Below is the sequence of intervals (L, C, M…) over an octave as derived from the two-vina experiment.
The outer crown of Arnold's model for his interpretation of the grama-murcchana system. The Pythagorean series of perfect fifths is drawn in red and the harmonic series of perfect fifths is drawn in green. The dotted blue line is a harmonic major third.
Positions R1, R2 etc. are labelled with abbreviations of names Sa, Re, Ga, Ma, Pa, Dha, Ni. For example, Ga ("E" in English) can have four positions, G1 and G2 being enharmonic variants of komal Ga ("E flat" = "mi bémol"), while G3 and G4 are the harmonic and Pythagorean positions of shuddha Ga ("E"= "mi") respectively.
The notes of the chromatic scale have been labelled using the Italian/Spanish/French convention "do", "re", "mi", "fa"… rather than the English convention to avoid confusion: "D" is associated with Dha ("A" in English, "la" in Italian/French) and not with the English "D" ("re" in Italian/French).
Frequency ratios are illustrated by pictograms showing how each position can be derived from the base note (Sa). For example, the pictogram near N2 ("B flat" = "si bémol") shows 2 ascending perfect fifths and 1 descending major third.
Cycles of perfect fifths have been marked with red and green segments. The red series is generally called "Pythagorean" — containing G4 (81/84) — and the green one "harmonic" — containing G3 (5/4). The blue arrow shows a harmonic major third going from S ("C" = "do") to G3. Both cycles are identical, with the harmonic and Pythagorean positions differing by 1 syntonic comma.
Theoretically, the harmonic series could also be constructed in a "Pythagorean" way, by extending the cycles of perfect fifths. Thus, after 8 descending fifths, G3 ("E" = "mi") would be 8192/6561 (1.248) instead of 5/4 (1.25). The difference is a schisma (ratio 1.001129), an interval beyond human perception. It is therefore more convenient to show simple ratios.
The framework implemented in Bol Processor deals with integer ratios, which allows for high accuracy. Nevertheless, it deliberately erases schisma differences. This is the result of approximating certain ratios, e.g. replacing 2187/2048 with 16/15.
Note that there is no trace of schisma in the classical Indian theory of musical scales; there wouldn't be even if Bharata's contemporaries had constructed them via series of rational numbers, because of their decision to disregard infinitesimals as "non-representable" entities (cf. Nāgārjuna's śūniyavāda philosophy, Raju 2007 p. 400). If 2187/2048 and other complex ratios of the same series were deemed impractical, the Indian mathematician/physicist (following the Āryabhaţīya) would replace them all with "16/15 āsanna (near value)"… This is an example of Indian mathematics designed for calculation rather than proof construction. In the Western Platonic approach, mathematics aimed at "exact values" as a sign of perfection, which led its proponents to face serious problems with "irrational" numbers and even with the logic underlying formal proof procedures (Raju 2007 p. 387-389).
This diagram, and the moving grama wheel that will be introduced next, could be built with any size of the syntonic comma in the range 0 to 56.8 cents (Bel 1988a). The two-vina experiment implies that L = M + C. Thus, the syntonic comma is also the difference between a limma and a minor semitone. To build a framework for the flexible model, simply allow all harmonic positions to move by the same amount in the direction of their Pythagorean enharmonic variants.
While major thirds would be 1 comma larger if a Pythagorean interval (e.g. G4, ratio 81/64) were chosen instead of a harmonic one (G3, ratio 5/4), major fifths also differ by 1 comma, but the Pythagorean fifth (P4, ratio 3/2) is larger than the harmonic one (P3, ratio 40/27). The latter has been called the wolf fifth because its use in melodic phrases or chords is said to sound "out of tune", with a negative/evil magical connotation.
No position on this model requires more than 1 ascending or descending major third. This makes sense to instrument tuners who know that tuning perfect fifths by ear is an easy task that can be repeated in several steps — here a maximum of 5 or 6 up and down. Tuning a harmonic major third, however, requires a little more attention. It would therefore be unrealistic to imagine a precise tuning procedure based on a sequence of major thirds — although this can be achieved with the aid of electronic devices.
At the top of the picture (position "fa#") we notice that neither of the two cycles of fifths closes on itself due to the presence of a Pythagorean comma. The tiny difference (schisma, ratio 1.001129) between Pythagorean and syntonic commas is illustrated by two pairs of positions: P1/M3 and P2/M4.
Another peculiarity at the top of the picture is the apparent disruption of the sequence L-C-M. However, remembering that L = M + C, the regularity is restored by choosing between P1/M3 and P2/M4.
Approximations have no effect on the sound of musical intervals, since no human ear would appreciate a schisma difference (2 cents). However, other differences must remain explicit, since integer ratios indicate the tuning procedure by which the scale can be constructed. Thus the replacement integer ratio may be more complex than the "schismatic" one, as in the case of R1, ratio 256/243 instead of 135/128, because the latter is built with a simple major third above D4 instead of belonging to the Pythagorean series.
Tuning Western instruments
The problem of tuning fixed pitch instruments (harpsichord, pipe organ, pianoforte…) has been well documented by the organ/harpsichord player, builder and musicologist Pierre-Yves Asselin (2000). In his practical approach, just intonation is a background model that can only be approximated on 12-degree scales by temperament — compromising the pure intervals of just intonation to meet other requirements. Temperament techniques applied to the Bol Processor are discussed on the Microtonality and Comparing temperaments pages.
Source: Pierre-Yves Asselin (2000 p. 61)
The column at the centre of this picture, with notes within ellipses, is a series of perfect fifths which Asselin called "Pythagorean".
Series of fifths are infinite. Selecting seven of them (in the middle column) creates a scale called the "global diatonic framework" (milieu diatonique global, see Asselin 2000 p. 59). In this example, the frameworks are those of "C" and "G" ("do" and "sol" in French).
Extending series of perfect fifths beyond the sixth step produces complicated ratios that can be approximated (with a schisma difference) to those produced by harmonic major thirds (ratio 5/4). Positions on the right (major third up, first order) are one syntonic comma lower than their equivalents in the middle series, and positions on the left (major third down, first order) are one syntonic comma higher.
It is possible to create more columns on the right ("DO#-2", "SOL#-2" etc.) for positions created by 2 successive jumps of a harmonic major third, and in the same way on the left ("DOb#+2", "SOLb#+2" etc.), but these second-order series are only used for the construction of temperaments — see page Microtonality.
This model produces 3 to 4 positions for each note, a 41-degree scale, which would require 41 keys (or strings) per octave on a mechanical instrument! This is one reason for the tempering of intervals on mechanical instruments, which amounts to selecting the most appropriate 12 positions for a given musical repertoire.
This tuning scheme is displayed on scale "3_cycles_of_fifths" in the "-to.tryTunings" tonality resource of Bol Processor.
Series of names have been entered, together with the fraction of the starting position, to produce cycles of perfect fifths in the scale. Following Asselin's notation, the following series have been created (trace generated by the Bol Processor):
From 4/3 up: FA, DO, SOL, RE, LA, MI, SI, FA#, DO#, SOL#, RE#, LA#
From 27/20 down: FA+1, SIb+1, MIb+1, LAb+1, REb+1, SOLb+1
This was more than enough to determine the 3 or 4 positions of each note, since several notes can reach the same position at a schisma distance. For example, "REb" is in the same position as "DO#-1". The IMAGE link shows this scale with (simplified) frequency relationships:
The "3_cycles_of_fifths" scale: a graphical representation of three series of perfect fifths used to perform Western music in "just intonation" according to Asselin (2000). (Image created by Bol Processor)
Compared to the model advocated by Arnold (1974, see figure above), this system accepts harmonic positions on either side of the Pythagorean positions, which means that Sa ("C" or "do"), like all unaltered notes, can take three different positions. In Indian music, Sa is unique because it is the fundamental note of every classical performance of a raga, fixed by the drone (tanpura) and tuned to suit the singer or instrumentalist. However, we will see that transpositions (murcchana-s) of the basic Indian scale(s) produce some of these additional positions.
A tuning scheme based on three (or more) cycles of perfect fifths is a good grid for constructing basic chords in just intonation. For example, a "C major" chord is made up of its tonic "DO", its dominant "SOL" a perfect fifth higher, and "MI-1" a major harmonic third above "DO". The first two notes can belong to a Pythagorean series (blue marks on the graph) and the last one to a harmonic series (green marks on the graph). Minor chords are constructed in a similar way, which will be explained later.
This does not completely solve the problem of playing tonal music with just intonation. Sequences of chords must be correctly aligned. For example, should one use the same "E" in "C major" and in "E major"? The answer is "no", but the rule must be made explicit.
How is it possible to choose the right one among the 37 * 45 = 2 239 488 chromatic scales shown in this graph?
In the approach of Pierre-Yves Asselin (2000) — inspired by the work of Conrad Letendre in Canada — rules were derived from options validated by listeners and musicians. Conversely, the grama framework exposed below is a "top-down" approach — from a theoretical model to its evaluation by practitioners.
The grama framework
Using Bharata's model — see page The two-vina experiment — we can construct chromatic (12-degree) scales in which each tonal position (out of 11) has two options: harmonic or Pythagorean. This is one reason to say that the framework is based on 22 shruti-s. In Indian musicological literature, the term shruti is ambiguous, as it can mean either a tonal position or an interval.
In Bol Processor BP3 this "grama" framework is edited as follows in "-to.12_scales":
The 22-shruti framework as per Bharata's model with a syntonic comma of 22 cents (see full image)
We use lower-case labels for R1, R2 etc. and append a '_' after labels to distinguish enharmonic positions from octave numbers. So, "g3_4" means G3 in the fourth octave.
Two options for each of the 11 notes yields a set of 211 = 2048 chromatic scales. Of these, only 12 are "optimally consonant", i.e. they contain only one wolf fifth (smaller by 1 syntonic comma). These 12 scales are the ones used in harmonic or modal music to experience maximum consonance. The author(s) of Naya Shastra had this intention in mind when they described a basic 12-tone "optimal" scale called "Ma-grama". This scale is called "Ma_grama" in tonality resource "-to.12_scales":
The "Ma-grama" basic chromatic scale built on the 22-shruti framework (see full image)
Click on the IMAGE link on the "Ma_grama" page to obtain a graphical representation of this scale:
The Ma-grama chromatic scale, Bol Processor graphic display
In this picture the perfect fifths are blue lines and the (unique) wolf fifth between C and G is a red line. Note that positions marked in blue ("Db", "Eb" etc.) are Pythagorean and harmonic positions ("D", "E" etc.) appear in green. Normally, a "Pythagorean" position on this framework is one where neither the numerator nor the denominator of the fraction is a multiple of 5. Multiples of 5 indicate jumps of harmonic major thirds (ratio 5/4 or 4/5). This simple rule is broken, however, when complex ratios are replaced by simple equivalents at a distance of one schisma. Therefore, the blue and green markings on the Bol processor images are mainly used to facilitate the identification of a position: a note appearing near a blue marking could as well belong to the harmonic series with a more complex ratio, bringing it close to the Pythagorean position.
It will be important to remember that all the notes of the Ma-grama scale are in their lowest enharmonic positions. Other scales are created by raising a few notes by a comma.
This Ma-grama is the starting point for the generation of all "optimally consonant" chromatic scales. This is done by transposing perfect fifths (upwards or downwards). The visualisation of transpositions becomes clear when the basic scale is drawn on a circular wheel which is allowed to move within the outer crown shown above. The following is Arnold's complete model, showing the Ma-Grama in the basic position, producing the "Ma01" scale:
The fixed (outer) and movable (inner) shruti wheels in position for the "M1" transposition of Ma-grama, which produces the "Ma01" scale
This positioning of the inner wheel on top of the outer wheel is called a "transposition" (murcchana).
Intervals are shown on the graph. For example, R3 ("D" = "re") is a perfect fifth to D3 ("A" = "la").
The "Ma01" scale produced by this M1 transposition produces the "A minor" chromatic scale with the following intervals:
C l Db c+m D c+l Eb c+m E c+l F c+m F# c+l G l Ab c+m A c+l Bb c+m B c+l C
m = minor semitone = 70 cents
l = limma = 90 cents
c = comma = 22 cents
The "A minor" chromatic scale produced by the M1 transposition of Ma-grama (i.e. "Ma01")
This construction of the "A minor" scale corresponds to the Western scheme for the production of just intonated chords: the fundamental "A" (ratio 5/3) is "LA-1" on the "3_cycles_of_fifths" scale, which is in the "major third upwards" series as well as its dominant "MI-1", while "C" (ratio 1/1) belongs to the "Pythagorean" series.
At first sight, the scale constructed by this M1 transposition also resembles a "C major" scale, but with a different choice of R3 (harmonic "D" ratio 10/9) instead of R4 (Pythagorean "D" ratio 9/8). To produce the "C major" scale, "D" should be raised to its Pythagorean position, which amounts to R4 replacing R3 on Bharata's model. This is done by using an alternative root scale called "Sa-Grama" in which P4 replaces P3.
P3 is called "cyuta Pa" meaning "Pa lowered by one shruti" — here a syntonic comma. The wheel representation suggests that other lowered positions may later be highlighted by the transposition process, namely cyuta Ma and cyuta Sa.
At the bottom of the "Ma01" page on "-to.12_scales", all the intervals of the chromatic scale are listed, with the significant intervals highlighted in colour. The wolf fifth is coloured red. Note that when the scale is optimally consonant, only one cell is coloured red.
Harmonic structure of the "Ma01" transposition of Ma-grama, as displayed by the Bol Processor
Ma01 tuning scheme, displayed by the Bol Processor
A tuning scheme is suggested at the bottom of page "Ma01". It is based on the (purely mechanical) assumption that perfect fifths are tuned first within the limit of 6 steps. Then harmonic major thirds and minor sixths are highlighted, and finally Pythagorean thirds and minor sixths can also be taken into account.
Exporting a major chromatic scale with the sensitive note raised by 1 comma
We can use "Ma01" as a 23-degree microtonal scale in Bol Processor productions because all the notes relevant to the chromatic scale have been labelled. However it is more practical to extract a 12-degree scale with only labelled notes. This can be done on the "Ma01" page. The image shows the exportat of the "Cmaj" scale with 12 degrees and a raised position of D.
Using "Cmaj" for the name makes it easy to declare this scale in its specific harmonic context. In the same way, a 12-degree "Amin" can be exported without raising the "D".
"D" ("re") is therefore the sensitive note when switching between the "C major" scale and its relative "A minor".
In all 12-degree exported scales it is easy to change the note convention — English, Italian/Spanish/French, Indian or key numbers. It is also possible to select diesis in replacement of flat and vice versa, as the machine recognises both options.
Producing the 12 chromatic scales
A PowerPoint version of Arnold's model can be downloaded here and used to check the transpositions produced by the Bol Processor BP3.
Creating "Ma02" as a transposition of "Ma01"
To create successive "optimally consonant" chromatic scales, the Ma-grama should be transposed by descending or ascending perfect fifths.
For example, create "Ma02" by transposing "Ma01" from a perfect fourth "C to F" (see picture). Nothing else needs to be done. All the transpositions are stored in tonality resource "-to.12_scales". Each of these scales can then be used to export a minor and a major chromatic scale. This procedure is explained in detail on the page Creation of just-intonation scales.
To get the "C minor" scale, we need to create "Ma04" by using four successive descending fifths (or ascending fourths). Note that writing "C to F" on the form does not always produce a perfect fourth transposition because the "F to C" interval may be a wolf fifth! This happens when going from "Ma03" to "Ma04". In this case, select, for example, "D to G".
From "Ma04" we export "Cmin". Here comes a surprise:
The "C minor" scale derived from the "Ma04" transposition of Ma-grama
The intervals are those predicted (see "A minor" above), but the positions of "G", "F" and "C" have been lowered by one comma. This was expected for "G" because of the replacement of P4 by P3. The bizarre situation is that both 'C' and 'F' are one comma lower than what seemed to be their lowest (or only) position in the 22-shruti model. The authors of Natya Shastra had anticipated a similar process when they invented the terms "cyuta Ma" and "cyuta Sa"…
This shifting of the base note can be seen by moving the inner wheel. After 4 transpositions, the position M1 of the inner wheel will correspond to the position G1 of the outer wheel, giving the following configuration:
The "Ma04" transposition of Ma-grama showing lowered C, F and G
This shift of the tonic was presented as a challenging finding in our paper (Arnold & Bel 1985). Jim Arnold had done experiments with Pierre-Yves Asselin playing Bach's music on the Shruti Harmonium and both liked the shift of the tonic on minor chords.
Two options for tuning a "C minor" chord. Source: Asselin (2000)
Pierre-Yves himself mentions a one-comma lowering of "C" and "G" in the "C minor" chord. However, this was one of two options predicted by his theoretical model. He tested it by playing the Cantor electronic organ at the University, and reports that musicians found this option to be more pungent — "déchirant" — (Asselin 2000 p. 135-137).
The other option (red on the picture) was that each scale be "aligned" in reference to its base note "C" ("DO"). This alignment (one-comma raising) can be done clicking button "ALIGN SCALE" on scale pages wherever the basic note ("C") is not at position 1/1. Let us listen to the "C major"/ "C minor" / "C major" sequence, first "non-aligned" then "aligned":
"C major"/ "C minor" / "C major" sequence, first non-aligned then aligned
Clearly, the "non-aligned" version is more pungent than the "aligned" one.
This choice is based on perceptual experience, or "pratyakṣa pramāṇa" in Indian epistemology — see The two-vina experiment. We take an empirical approach rather than seeking an "axiomatic proof". The question is not which of the two options is true, but which one produces music that soundsright.
Checking the tuning system
Checking a chord sequence
The construction of just intonation using the grama-murcchana procedure needs to be checked in typical chord sequences such as the "I-IV-II-V-I" series discussed by Pierre-Yves Asselin (2000 p. 131-135):
After trying out five options suggested by his theoretical model, the author chose the one preferred by all the musicians. This is the intonation they spontaneously choose when singing, without any special instruction. This version also corresponds to Zarlino's "natural scale".
The best option for a just-intonation rendering of the "I-IV-II-V-I" harmonic series (Asselin 2000 p. 134)
In the preferred option, the tonics "C", "F" and "G" belong to the Pythagorean series of perfect fifths, except "D" in the "D minor" chord which is one comma lower than in "G major".
In the picture, the triangles with the top pointing to the right are major chords, and the one pointing to the left is the "D minor" chord.
Asselin (2000 p. 137) concludes that the minor mode is one syntonic comma lower than the major mode. Conversely, the major mode should be one syntonic comma higher than the minor mode.
This is fully consistent with the model constructed by grama-murcchana. Since minor chromatic scales are exported from transpositions of Ma-grama with all its degrees in the lowest position, their base notes are also driven to the lowest positions. However this requires a scale "adjustment" in the cases of "Ma10", "Ma11" and "Ma12" so that no position is created outside the basic Pythagorean/harmonic scheme of the Indian system. Looking at Asselin's drawing (above), this means that no position would be picked up in the 2nd-order series of fifths in the rightmost column with two successive ascending major thirds resulting in a lowering of 2 syntonic commas. This process is explained in more detail on the page Creation of just-intonation scales.
Let us listen to the production of the "-gr.tryTunings" grammar:
First we hear the sequence of chords in equal temperament, then in just intonation.
The "I-IV-II-V-I" harmonic series in equal-tempered and just-intonation
The identity of the last occurrence with Asselin's favourite choice is marked by frequencies in the C-sound score: "D4" in the third chord (D minor) is one comma lower than "D4" in the fourth chord (G major), while all other notes (e.g. "F4") have the same frequencies in the four chords.
To summarise, the tonic and dominant of each minor chord belong to the "lower"harmonic series of perfect fifths appearing in the right-hand column of Asselin's drawing reproduced above. Conversely, the tonic and dominant of each major chord belong to the "Pythagorean" series of perfect fifths in the middle column.
Checking note sequences
Switches for (programmable) enharmonic adjustments on Bel's Shruti Harmonium (1980)
The rules for determining the relative positions of major and minor modes (see above) deal only with the three notes that define a major or minor chord. Transpositions (murcchana-s) of the Ma-grama produce basic notes in the same positions, but these are also chromatic (12-degree) scales. Therefore, they also establish the enharmonic positions of all the notes that would be played in that harmonic context.
Do these comply with just intonation? In theory, yes, because the 12 chromatic scales obtained by these transpositions are "optimally consonant": each of them contains no more than a wolf fifth.
In 1980, James Arnold conducted experiments to verify this theoretical model using my Shruti harmonium, which produced programmed intervals to an accuracy of 1 cent. Pierre-Yves Asselin played classical pieces while Jim manipulated switches on the instrument to select enharmonic variants.
Listen to three versions of an improvisation based on Mozart's musical dice game. The first one is equal-tempered, the second one uses Serge Cordier's equal-tempered scale with an extended octave (1204 cents, see Microtonality) and the third uses several different scales to reproduce a just intonation. To this end, variables pointing to scales based on the harmonic context have been inserted in the first grammar rules:
An example of Mozart's musical dice game, equal-temperedThe same example, equal-tempered scale with octave stretched at 1204 centsThe same example in just intonation
Scale comparison
At the bottom of the pages "-to.12_scales" and "-to.Mozart", all scales are compared for their intervalic content. The comparison is based on fractions where these have been declared, or on floating-point frequency ratios otherwise.
The comparison confirms that the "Amin" chromatic scale is identical to "Fmaj".
By raising "D" in "Ma01" we have created "Sa01", the first transposition of the Sa-grama scale. From "Sa01" we can make "Sa02" etc. by successive transpositions (one fourth upwards). But the comparator shows that "Sa02" is identical to "Ma01".
Similarly, the transpositions "Ma13", "Ma14" etc. are identical to "Ma01", "Ma02" etc. The series of chromatic scales is (as expected) circular, since "Ma13" returns to "Ma01".
Comparison of scales stored in "-to.12_scales"
For more details on frequencies, block keys, etc., see the Microtonality page.
Is this perfect?
This entire page is devoted to tonal systems defined in terms of whole-numbered ratios (i.e. rational numbers) measuring tonal intervals. There were at least two strong incentives for the idea that any "pure" tonal interval should be treated as a ratio of two whole numbers, such as 2/1 for the octave, 3/2 for a "perfect" fifth, 5/4 for a "harmonic" major third, etc.
The history of music (in the West) goes back to ideas attributed to the Greek philosopher "Pythagoras" (see above) , who believed that all things were made of [rational] numbers. This approach stumbled upon the impossibility of making the octave correspond to a series of "perfect fifths"…
As we found out — read above and The Two-vina experiment — this approach was not followed in India despite the fact that Indian scientists were significantly more advanced than the Greeks in the field of calculus (Raju C.K., 2007).
Another incentive to the use of rational numbers was Hermann von Helmholtz's notion of consonance (1877) which became popular after the period of Baroque music in Europe, following the initial claim of a "natural tonal system" by Jean-Philippe Rameau in his Traité de l'harmonie réduite à ses principes naturels (1722). The development of keyboard stringed instruments such as the pipe organ and the pianoforte had made it necessary to develop a tuning system that met the requirements of (approximately) tuneful harmony and transposition to support other instruments and the human voice. It was therefore logical to abandon a wide variety of tuning systems, especially those based on temperament, and to adopt equal temperament as the standard. By this time, composers were no longer exploring the subtleties of melodic/harmonic intervals; harmony involving groups of singers and/or orchestra paved the way for musical innovation.
Looking back to the Baroque period, many musicologists tend to believe that the tuning system advocated by J.S. Bach in The Well-tempered Clavier must have been equal temperament… This belief can be disproved by a systematic analysis of this corpus of preludes and fugues on an instrument using all the tuning systems en vogue during the Baroque period — read the page The Well-tempered Clavier.
Composers and instrument makers did not tune "by numbers", as tuning procedures were not documented (see Asselin P-Y., 2000). Rather, they tuned "by ear" in order to achieve a perceived regularity of sets of intervals: the temperament in general. This was indeed a break with the "Pythagorean" mystique, because these temperaments cannot be reduced to frequency intervals based on integer ratios.
For instance, Zarlino’s meantone temperament — read this page — is made of 12 fifths starting from “E♭” (“mi♭”) up to “G#” (“sol#”) diminished by 2/7 of a syntonic comma (ratio 81/80). The frequency ratio of each fifth is therefore
which cannot be reduced to an integer ratio. In the same way, the twelve intervals of the equal temperament scale are expressed in terms of irrational frequency ratios.
Overture
The goal of just intonation is to produce "optimally consonant" chords and sequences of notes, a legitimate approach when consonance is the touchstone of the highest achievement in art music. This was indeed the case in sacred music, which aimed for a "divine perfection" guaranteed by the absence of "wolf tones" and other oddities. In a broader sense, however, music is also the field of expectation and surprise. In an artistic process, this can mean departing from "rules" — just as poetry requires breaking the semantic and syntactic rules of a language…
Even when chords are perfectly consonant and conform to the rules of harmony (as perceived by the composer), note sequences may deviate from their theoretical positions in order to create a certain degree of tension or to make a better transition to the next chord.
When the Greek-French composer Iannis Xenakis - known for his formalised approach to tonality - heard Bach's First Prelude for Well-Tempered Clavier played on the Shruti Harmonium in just intonation, he declared his preference for the equal-tempered version! This made sense for a composer whose music had been praised by Tom Service for its "deep, primal rootedness in richer and older phenomena even than musical history: the physics and patterning of the natural world, of the stars, of gas molecules, and the proliferating possibilities of mathematical principles" (Service T, 2013).
This article focuses on the Bol Processor as a tool for creating and manipulating musical scales beyond the standard twelve-tone equal temperament. It details how the software handles real-time MIDI and Csound for microtonal tuning, explaining concepts like just intonation and various historical temperaments such as Zarlino's and BACH temperament. The article also discusses the implementation of scales with more than 12 degrees, referencing ancient Indian musicology’s grama-murcchana model and demonstrating how to compare different tunings. Ultimately, the document showcases the software's flexibility in manipulating scales, and its utility for both musical composition and musicological research.
A just-intonation tuning scheme (presumably) used in Western harmony (Image created by Bol Processor)
Microtonality is a topic addressed by many musical systems that deal with tonal intervals: the use of microtones — intervals smaller than a semitone, also called "microintervals". It can also be extended to include any music that uses intervals not found in the common Western tuning of twelve equal intervals per octave. In other words, a microtone can be thought of as a note that falls between the keys of a piano tuned to equal temperament (Wikipedia).
👉 From version 3.0.6 (August 2024) BP3 is able to handle microtonality in real-time MIDI as well as in Csound. — read the Check MIDI microtonality page for practical details.
A brief presentation
On electronic instruments such as the Bol Processor, microtonality is a matter of "microtonal tuning", here meaning the construction of musical scales alien to the conventional one(s).
Equal temperament is an intuitive model that divides the octave (frequency ratio 2/1) into 12 "equal" intervals called semitones. Each semitone has a frequency ratio of 2 1/12 = 1.059. Tonal intervals are generally expressed on a logarithmic scale, which gives the ratio 2/1 a value of 1200 cents. Each semitone is therefore worth 100 cents in a conventional scale system.
An equal tempered scale is useful for making a piece of music sound the same when transposed to another key. However, its intervals do not correspond to the (presumably) "natural" intervals constructed from whole-number frequency ratios using the numbers 3, 4, 5. These simple ratios give the impression of consonance because the frequencies of the upper partials (harmonics) can coincide: if two strings vibrate at a frequency ratio of 3/2 (a "perfect fifth"), the 3rd harmonic of the lowest vibration is at the same frequency as the 2nd harmonic of the higher vibration.
In an equal tempered scale, the harmonic major third (C-E) of 400 cents has a ratio of 1.26 instead of 1.25 (5/4). The major fifth (C - G) also sounds slightly "out of tune" with a ratio of 1.498 instead of 1.5 (3/2). These mismatches can produce beats that are considered unpleasant in harmonic contexts.
When tuning stringed instruments (such as the piano), octaves can be stretched a little to compensate for a slight inharmonicity of the upper partials produced by vibrating strings (in higher octaves), as advocated by Serge Cordier. A value of 1204 cents sounds fair, with the added advantage of making fifths sound "perfect" in a 3/2 ratio. With this setting, the frequency ratio of the stretched octaves is 2(1204/1200) = 2.0046. This effect can be reproduced in electronic instruments such as digital pianos that imitate mechanical ones. We will see how it can be implemented in the Bol Processor BP3.
Cembalo Cromatico (University of the Arts Bremen). A 19-key-per-octave instrument with electromechanical commands.
Musicologists agree that equal temperament was never exactly achieved on classical instruments such as pipe organs and harpsichords. Rather, instrument tuners have developed rules for reproducing the most pleasing intervals in particular musical contexts. In other words, a mechanical instrument should be tuned according to a style and repertoire of music. Pierre-Yves Asselin (2000) has published a detailed compilation of tuning techniques used by European musicians and instrument makers over the past centuries — listen to examples on the page Comparing temperaments. The same flexibility can be achieved with sounds produced by "algorithms".
Outside of Western classical music, a wide variety of tonal systems deliberately reject 12-tone-per-octave tonality. Arabic-Andalusian music is often described as a "quartertone" system, which divides the octave into 24 intervals. Equal tempered scales of 7 degrees have been identified on various traditional African instruments. The grama-murcchana theoretical model of tonal music in India claims the use of 22 shruti-s, presumably microintervals of unequal size (see below).
Many unconventional systems have been invented and applied to contemporary music, often departing from octave-repeating scales. See for, example, the Bohlen-Pierce scale, which is based on a 3/1 interval (a "tritave") divided into 13 grades/notes — see the MIDI microtonality page. All these scales can be implemented in the Bol Processor.
The scale() operator in Bol Processor BP3
We'll be discussing the use of scales in the context of Csound, although the same is possible in the real-time MIDI and MIDI file environment — read this page. When using MIDI, the machine recognises that MIDI microtonality mode is required as soon as it sees a "scale()" operator. If a tonal resource (a "-to" file) is specified in the grammar or data, all scales listed in the resource will be accessible.
For geeks: Csound scores are flexible in the way they represent tonal positions. A common convention is the octave point pitch class. For example, the note "A4" would be assigned the tonal position "8.09", meaning that it is the 9th note in the 8th octave (in the English convention). This value produces a note at the diapason frequency (usually 440 Hz) on a Csound instrument. It is also possible to specify the note position by its frequency in cycles per second (cps mode). This allows a high level of accuracy as frequencies are expressed in floating point format. For example, "A4" is equivalent to "440.0". Accuracy better than 1‰ is not noticeable. As explained on page Csound tuning in BP3, it is possible to send notes in both the octave point pitch class and cps formats to the same Csound instrument. In fact, microtonal scores will only use cps. The cps mode is also used by BP3 whenever the diapason frequency is not exactly 440 Hz. To make all frequencies visible on Csound scores, for example, set the diapason to "400.01"…
Let us take a simple example to demonstrate the use of multiple scales. The grammar is:
In this grammar, the same sequence is repeated three times in different tunings:
_scale(0,0) is the default tuning = 12-degree equal-tempered
_scale(piano, C4) refers to the "piano" scale
_scale(just intonation, C4) refers to a (so-called) "just-intonation" scale
Note "C4" appearing in these operators is the block key, here meaning the key that must correspond to its equal temperament value in the tuning set by the scale.
It may be necessary to listen several times to notice subtle differences:
A musical sequence repeated 3 times in equal-tempered, stretched octave ("piano") and "just intonation"
The sound is produced by the Csound instrument "new-vina.orc" designed by Srikumar Karaikudi Subramanian to imitate the Sarasvati vina, a long-stringed instrument played in South India — listen to his demo: Sarasvati vina. This type of instrument is capable of highlighting the finest tonal subtleties.
Beats are audible in the equal-tempered version, but slightly less so in the piano version, and almost absent in the just-intonation rendering. Looking at the Csound score makes it easy to check theoretical models:
In the Csound score, note names have been automatically replaced with their translations in the definitions of scales piano and just intonation (see below). For example, in the piano scale of this example, 'C4', 'D4', 'E4'… have been replaced by 'do3', 're3', 'mi3' with an additional 'p' marker: 'dop3', 'rep3', 'mip3'… In the same way, just intonation notes are labelled 'Cj4', 'Dj4', 'Ej4' etc. This renaming is optional since all these scales are made up of 12 degrees with identical key positions, but it is used here to make the Csound score more explicit.
The use of "C4" as a block key means that it is always played at a frequency of 261.630 Hz. Consequently, "A4" is at 440 Hz in the first occurrence and a little higher in the piano version due to the octave stretching with a ratio of 524.463 / 261.630 = 2.0046, which is 1204 cents.
Finally, we notice that, as predicted by the model, the perfect major fifth (C - G) produces the same positions (392.445 Hz) in the piano and just intonation scales.
In reality, the "just intonation" fragment in this example would be out of tune if we follow the framework of tonality proposed by Asselin (2000) and confirmed by an extension of the ancient grama-murcchana system in India. In the last "C minor" chord {C4, Eb4, G4, C5}, the notes "C4", "C5" and "G4" should be lowered by a syntonic comma. This means that playing "just intonation" in Western harmony requires more than a single just-intonation scale: each harmonic context requires its own specific tuning, which indeed cannot be achieved on keyboard instruments. A method for constructing just-intonation scales and using them in Bol Processor music is given on the Just intonation: a general framework page.
Looking at two scales
From the grammar page "-gr.tryScales" we can follow the tonal resource file "-to.tryScales" which contains scale definitions. Csound instrument definitions are contained in "-cs.tryScales", along with the instruction
f1 0 256 1 "vina-wave-table.aiff" 0 4 0
telling the Csound instrument to use the "vina" waveform. From August 2024, tonal resources and Csound instruments are stored in separate files, as microtonality is no longer reserved for Csound.
The following is a representation of the piano scale (Cordier's equal temperament):
The "piano" scale: 12-tone equal-tempered with an octave stretching of 4 cents (see full image). Note buttons for export/import of SCALA and KBM files.
All the intervals were set in a single click, after entering "1204" as the size of the octave in cents, which set the last ratio to 2.004 (approximately 501/250). The "INTERPOLATE" button was then clicked to calculate the intermediate ratios.
The scale is displayed as a circular graph by clicking on the "IMAGE" link:
The "piano" scale proposed by Serge Cordier. Note that the size of the whole circle is 1204 cents, not 1200!
The display confirms that the position of "G" ("solp") is in the ratio 3/2 or 702 cents. However, the tonal distance between "G" ("solp") and "D" ("rep") is slightly smaller (699 cents), which means that this scale is not a pure cycle of fifths, as the latter would have ended after 12 steps with an octave extended by a Pythagorean comma (scale "twelve_fifths" in "-to.tryScales"):
Cycle of 12 perfect fifths ending with the "last C" one Pythagorean comma higher (approximately 81/80 = 22 cents)
The basekey is the key used to produce basefreq. Here basefreq is set to 261.630 Hz for key #60 which is usually the "middle C" on a piano keyboard. The basefreq parameter has an effect on the pitch which is further adjusted by the value of the diapason entered in "-se.tryScales". If the diapason is set to 430 Hz, the frequency of "C4" would be 261.630 x 430 / 440 = 255.68 Hz.
The baseoctave parameter is not stored in the Csound function table, but it is required by the Bol Processor to name notes correctly. This scale uses the Italian/French note convention, where key #60 is called "do3" instead of "C4". Therefore baseoctave = 3.
Temperament
At the bottom of the "Scale" page is a form for constructing scales in musical temperament. The scope of this procedure is wider than usual because the interface permits the modification of any series of intervals, not just fifths and fourths.
Bol Processor procedures for the production of tempered scales (and all scales in general) can be used both to visualise/hear intervals and chords derived from a theoretical description of the scale, and to check that a procedure for tuning a mechanical instrument conforms to its theoretical description. Below is an example of both approaches applied to Zarlino's meantone temperament (tempérament mésotonique).
The long history of the temperament in European music is covered in Pierre-Yves Asselin's dissertation and publication (2000, p. 139-150). During the 16th and 17th centuries, European musicians tended to prefer "pure" major thirds (frequency ratio 5/4) at the cost of compromising the size of the fifths. This was called the "pure third meantone temperament" (tempérament mésotonique à tierces majeures pures) which was generally achieved by reducing the size of certain fifths by a fraction of the syntonic comma (Asselin 2000 p. 76). After this period, there was another fashion of using perfect fifths (frequency ratio 3/2) and compromising the size of major thirds in the same way. Both methods — and many more — are implemented in the Bol Processor. Algorithmic tuning is indeed easier to achieve than tuning a mechanical instrument!
Zarlino, theory
Let us try Zarlino's meantone temperament (Asselin 2000 p. 85-87) which was popular in the 16th and 17th centuries. It consists of 12 fifths starting from "E♭" ("mi♭") up to "G#" ("sol#") diminished by 2/7 of a syntonic comma — that is 6 cents.
➡ This should not be confused with Zarlino's "natural scale", an instance of just intonation.
Theoretically, this takes two steps from the previously known position "C".
First, we enter the starting note "do" and the sequence of fifths "do, sol, re, sol#," specifying a ratio of 3:2 with a -2/7 comma modification (see picture).
Then we do the same with fourths (descending fifths) starting from "do" ("C") down to "mi♭" ("E♭").
The result is displayed by clicking on the IMAGE link:
Zarlino's meantone temperament (source Asselin 2000 p. 85)
In this temperament, the harmonic major thirds (green connections on the graph) are equal and slightly smaller (384 cents) than the "pure" ones (ratio 5/4 or 386 cents). Semitones between unaltered and altered notes are equal (71 cents). All major tones are equal (192 cents) except "do#-mi♭" and "sol#-sib" (242 cents).
Noticeable dissonances are found in the "sol#-mi♭" fifth (746 cents, i.e. an extra 2 + 1/7 commas = 44 cents) and major thirds such as "sol#-do", "do#-fa", "fa#-sib" and "si-mi♭" which are larger (433 cents) than Pythagorean major thirds (408 cents). Obviously, these intervals are not intended to be used in the musical repertoire to which this tuning is applied…
Zarlino meantone temperament, table of intervals (in cents)
Comparison
A layperson might wonder whether small tonal adjustments — often less than a quarter of a semitone (i.e. 25 cents) — have any noticeable effect on musical works using these tuning systems. Comparative experiments are easy with the Bol Processor.
For example, let us play one (of a billion variations) of Mozart's musical dice game, with tuning options selected by activating a first rule in "-gr.Mozart":
// gram#1[1] S --> _vel(80)_tempo(3/4) _scale(0,0) A B // Equal temperament // gram#1[2] S --> _vel(80) _tempo(3/4) _scale(piano,0) A B // Equal temperament (Cordier) // gram#1[3] S --> _vel(80) _tempo(3/4) _scale(Zarlino_temp,0) A B // Zarlino's temperament // gram#1[4] S --> _vel(80) _tempo(3/4) Ajust Bjust // Just intonation
Musical productions are listed below. The random seed has been set to 998 (in "-se.Mozart") as this variation contains a greater number of chords, and the performance has been slowed down by "_tempo(3/4)".
It is important to remember that of these options, only the first three ones (temperaments) are accessible on fixed-pitch MIDI instruments with 12-degree keyboards. The last one (just intonation) requires a "retuning" of each harmonic content, which is possible if the instrument accepts pitchbender corrections — see page MIDI microtonality.
The first option (equal temperament) is the default tuning of most electronic instruments:
Equal temperament on Mozart's dice game
The second option is an equal temperament with octaves stretched by 4 cents, as advocated by Serge Cordier (see above):
Equal temperament with stretched octaves (Cordier)
The third option is Zarlino's temperament:
Zarlino's temperament
The last option is "just intonation":
Just intonation
Zarlino: a simulation of physical tuning
The tuning of mechanical instruments (such as a harpsichords) requires different procedures from the programming of "tempered" scales on the Bol processor. However, by using the computer, it is possible to quickly verify that the mechanical procedure would produce the expected result. Let us demonstrate this using Zarlino's temperament.
On the computer we had programmed a series of 7 ascending fifths diminished by a 2/7 comma from "do" to "do#". This is impossible to achieve "by ear" on a mechanical instrument. Pierre-Yves Asselin (2000 p. 86) revealed the method shown below.
First step
From "do", tune two successive major thirds. This results in a "sol#" which is positioned at a frequency ratio of 25/16 (773 cents) above "do".
This "sol#" is actually "SOL#+2" of the 2nd order harmonic fifths down series in Asselin's tuning framework (2000 p. 62) — see page Just intonation: a general framework. It is not exactly the one expected on Zarlino's meantone temperament, although it is close. It is labelled "sol2#".
Second step
From "sol2#" tune down a perfect fifth, resulting in "do#".
Be careful to program a perfect fifth, which is specified on the form as "add 0/1 comma". There is also a form for creating series of perfect fifths which can be used for this step.
The resulting "do#" (ratio 1.04166) is exactly 52/3/23, as expected in Zarlino's meantone temperament (Asselin 2000 p. 194).
Third step
Tune 7 equal fifths between "do" and "do#". Equalising fifths is a typical procedure for tuning mechanical instruments. Notes "sol", "re", "la", "mi", "si", "fa#" will be created. Here we specify that all intervals need to be close to the fraction 3/2, even though they will end up as fifths diminished by a 2/7 comma since we clicked the EQUALIZE INTERVALS button.
The missing notes "sol", "re", "la", "si", "fa#" are created. For the existing note "mi", the machine checks that its current position is close to the one predicted by the approximate fraction.
The graph shows that the calculated position of "mi" (ratio 1.248) is slightly different from its previous position (1.25), but this difference is negligible. We keep both positions on the graph, knowing that only one will occur in a physical tuning.
Fourth step
Now tune down 3 fifths from "do" to "mi♭", diminished by a 2/7 comma. This can be done by reproducing "by ear" intervals created in the previous step. Another method is to tune "mi♭" a harmonic major third below "sol" as shown on the form.
Fifth step
Once "mi♭" has been tuned we can tune three equal fifths (in fact diminished by 2/7 comma) between "mi♭" and "do". Again we use the "equalize intervals" procedure. At this stage, the positions of "si♭" and "fa" are created.
The result is shown in the graph below:
Zarlino's meantone temperament designed as a simulation of physical tuning
On this graph, the ratio 1.563 for "sol#" is close (within 7 cents) to 1.557 of Zarlino's temperament. On a mechanical instrument, since "mi" tuned by equalising fifths (3d step) was at position 1.248, adjusting the "mi-sol#" major third to a 5/4 ratio would set "sol#" at a better ratio (1.56).
More temperaments
All the temperaments listed in Asselin's thesis can be easily programmed on the Bol Processor. Take, for example, a classical meantone tuning (Asselin 2000 p. 76), popular in the 16th and 17th centuries, also known as Chaumont (Asselin 2000 p. 109). Its aim is to produce "pure thirds" (ratio 5/4). It consists of a series of fifths from "mi♭" ("E♭") to "sol#" ("G#") diminished by a 1/4 comma. The problem is that the tuning scheme — unlike Zarlino's meantone — does not start from "do" ("C"). There are two solutions.
The first solution is to divide the series of fifths into two parts: first create the series "do, sol, re, la, mi, si, fa#, do#, sol#" of ascending fifths, then the series "do, fa, si♭, mi♭" of descending fifths.
In the second solution, we directly create the series "mi♭, si♭, fa, do, sol, re, la, mi, si, fa#, do#, sol#" of ascending fifths, giving the graph shown below.
Classical / Chaumont meantone tuning positioned on mi♭
This tuning is correct but it cannot be used by the Bol Processor console because of the shift of the reference. Complicated procedures would be required to set the diapason (A4 frequency) to the desired standard and to assign the correct key numbers to the notes of the scale.
Fortunately, this problem is solved in a single click by resetting the base of the scale to note "do", which amounts to a rotation of the graph.
We take this opportunity to replace the Italian/French note convention with the English note convention.
The result is the classic meantone scale tuning which is notable for its large number of harmonic major thirds (circa 5/4, green lines):
The same methods can be used to implement another meantone temperament popular at the same time (16th-17th century) which aims to enhance pure minor thirds (Asselin 2000 p. 83). It can also be described as a series of ascending fifths from "mi♭" to "sol#" with a different adjustment: the fifths are diminished by 1/3 comma.
In this tuning, the minor thirds are sized 316 cents (harmonic minor third, frequency ratio 6/5) with the exception of "A#-C#", "D#-F#" and "F-G#" which are all 352 cents:
Pure minor-third meantone temperament
Source: Asselin (2000 p. 101)
The BACH temperament designed by Johann Peter Kellner for the music of the 18th century (Asselin 2000 p. 101-103) contains two varieties of fifths (see tuning scheme). It is therefore not a "meantone" temperament.
It can be programmed in 3 steps:
A series of descending fifths from "do-sol-re-la-mi", diminished by 1/5 comma;
A series of ascending perfect fifths from "do" to "sol♭";
An ascending perfect fifth from "mi" to "si".
The last interval is a remaining fifth "si-sol♭" ("B-G♭") diminished by exactly 1/5 comma (i.e. 697 cents).
The result is close to Werkmeister III (1691) (Asselin 2000 p. 94), with all positions close to the Pythagorean/harmonic series used for just intonation.
Werckmeister IV temperament Source: Asselin (2000 p. 96)
The procedures for tuning temperaments with the Bol Processor sometimes differ from those used for physical instruments. Examples are Werckmeister IV (Asselin 2000 p. 96) and Werckmeister V (p. 99). To tune Werckmeister IV on an instrument (see picture), we start by tuning the sequence G C F Bb Eb Ab Db Gb B E as perfect descending fifths. Then interpolate three fifths (diminished by 1/3 comma) between G and E. Then retune G so that G D becomes a perfect fifth, which reduces C G by 1/3 comma. The same is done on E so that A E becomes a perfect fifth and E B is diminished by 1/3 comma. Similar adjustments are made to retune Bb, and finally Ab and Db to obtain the intervals shown on the picture.
On the Bol Processor the same procedure can be followed if the 1/3 comma correction is replaced by 7 cents. Another procedure is to "add" intervals, which is acceptable on a digital model because of the accuracy. This procedure is automatically summarised at the bottom of the "scale" page:
Werckmeister IV temperament (Asselin 2000 p. 96) Added fifths down: “do,fa” starting fraction 1/1 Created meantone downward notes “fa,sib” fraction 3/2 adjusted -1/3 comma Created meantone downward notes “sib,mib,sol#” fraction 3/2 adjusted 1/3 comma Created meantone downward notes “sol#,do#” fraction 3/2 Created meantone downward notes “do#,fa#” fraction 3/2 adjusted -1/3 comma Created meantone downward notes “fa#,si” fraction 3/2 Created meantone downward notes “si,mi” fraction 3/2 adjusted -1/3 comma Created meantone downward notes “mi,la” fraction 3/2 Created meantone upward notes “do,sol” fraction 3/2 adjusted -1/3 comma Created meantone upward notes “sol,re” fraction 3/2
Werckmeister IV temperament
Let us compare some temperaments on ascending unaltered and descending altered scales…
Equal-tempered tuning, 20th centuryClassical (Chaumont) meantone temperament, 16th-17th centuryMeantone temperament, pure minor thirds, 16th-17th centuryBACH temperament (Kellner) 18th century
Eighteen temperaments described by Pierre-Yves Asselin (2000) have been programmed in the "-to.trTunings" tonal resource. These can be checked against various musical works, see the pages Comparing temperaments and Tonal analysis of musical works.
As Schlick's temperament is not fully documented, we have set "do-la♭" as a pure major third and "mi-sol#" as a major third augmented by a 2/3 comma. As a result, "sol#" and "la♭" remain distinct.
Tartini-Vallotti temperament (Asselin 2000 p. 104)
Implementations of temperaments in the Bol Processor cannot be used as a reference because (1) errors may have occurred and (2) it is important to know the musical repertoire for which each temperament was designed. See also chapter VIII of Musique et tempéraments (Asselin 2000 p. 139-180) for the history of temperaments and musical examples discussed in terms of instrument tuning.
Tartini-Vallotti temperament: the interval list
Circular graphs show noticeable intervals - perfect fifths, wolf fifths, harmonic and Pythagorean major thirds - in a wide range of uncertainty. For example, in the Tartini-Vallotti temperament shown above, "C-E" is listed as a harmonic major third (green segment), although it is slightly larger (+7 cents) than a "pure" major third (ratio 5/4). The safe way to check that this temperament matches its description is to read the deviations in the interval list (see picture).
D'Alembert-Rousseau temperament with series of slightly larger/smaller fifths
In a few temperaments the sizes of the fifths are not given explicitly, as the tuner is instructed to tune slightly larger (than perfect) or slightly smaller fifths. This is the case in the D'Alembert-Rousseau temperament (Asselin 2000 p. 119), where the series "do, fa, sib, mi♭, sol#" is expected to be slightly larger and "sol#, do#, fa#, si, mi" slightly smaller… In addition, the frame should be "complete", which implies the absence of a remaining comma fraction when closing the cycle of fifths.
In this example, the conditions were met by increasing the slightly larger fifths "do, fa, sib, mi♭, sol#" by 1/12 comma (+2 cents). To complete the cycle, the last series "sol#, do#, fa#, si, mi" was declared as equalised intervals. This resulted in the slightly smaller fifths being reduced by 2 cents to reflect the slightly larger ones. Incidentally, this -1/12 comma adjustment is also the one required to construct an equal-tempered scale.
The whole process of creating a scale is automatically recorded in the Comments section of the "scale" page, for example "d_alembert_rousseau":
D'Alembert-Rousseau temperament (Asselin 2000 p. 119) Created meantone upward notes “do,sol,re,la,mi” fraction 3/2 adjusted -1/4 comma Created meantone downward notes “do,fa,sib,mib,sol#” fraction 3/2 adjusted 1/12 comma Equalized intervals over series “sol#,do#,fa#,si,mi” approx fraction 2/3 adjusted 2.2 cents to ratio = 0.668
It took us about 8 minutes to understand the procedure and another 8 minutes to tune the scale according to D'Alembert-Rousseau…
For a comparison of temperaments applied to several pieces of Baroque music, see the page Comparing temperaments.
We will use a model from ancient Indian musicology to demonstrate divisions of more than 12 degrees per octave. This model is an interpretation of the description of the basic scales (grama) and their transpositions (murcchana) in Bharata Muni's Natya Shastra, a treatise dating from a period between 400 BCE and 200 CE — read the page The two-vina experiment.
The inner wheel of Arnold's model, analogous to the "Ma-grama" of Natya Shastra
E.J. Arnold (1982) had designed a device to demonstrate the transposition of scales in Bharata's model. The actual division of the octave is 23 steps, but this amounts to having 22 optional positions (shruti-s) since the base note has only one option.
The result can be described as 11 pairs of note positions giving 211 = 2048 possible chromatic scales. Of these, only 12 are "optimally consonant", i.e. with only one "wrong" major fifth, short by 1 syntonic comma (pramāņa ṣruti), which here, for simplicity, is 21 cents.. These 12 chromatic scales are the ones that can be used in harmonic or modal music to experience the best consonance.
Below is a picture of the "grama" scale as displayed by the BP3 editor:
A framework for just-intonation chromatic scales based on the grama-murcchana model in ancient Indian musicology (see full image). The syntonic comma (pramāņa ṣruti) has been set at 21 cents. The note "m4" is not marked.
In this scale we use the conventional Indian sargam notation: sa, re, ga, ma , pa, dha, ni, translated as "C", "D", "E", "F", "G", "A", "B". Note that "re" ("D"), for example, can be found in four positions: r1 and r2 are the two possibilities for "D♭", the first one (256/243) being called "Pythagorean" (derived from five descending fifths) and the second one (16/15) "harmonic" (derived from one descending fifth and one descending major third). Positions r2 and r3 are "D♮" (natural) with r3 being harmonic (10/9) and r4 being Pythagorean (9/8).
Tanpura: the drone of Indian musicians (manufactured in Miraj)
There are special cases (visible on the wheel model) where m3 is almost superimposed on p1 and m4 with p2, their difference being an inaudible schisma (32805 / 32768 = 1.00112 = 1.9 cents). We use m3p1 and m4p2 to denote these merged positions.
The intervals given in cents are those identified by Western musicologists: the Pythagorean limma (256/243 = 90 cents), the syntonic comma (81/80 = 22 cents) and the minor semitone (25/24 = 70 cents). This shows that a shruti, as described by Bharata, can be of 3 different sizes. However, in its application to Indian music, this model should be rendered "flexible" with a size of the syntonic comma (pramāņaṣruti) between 0 and 56.8 cents — see page The two-vina experiment.
Clicking on the IMAGE link displays a circular graphic representation of the "grama" scale:
The "grama" scale, an interpretation of the ancient Indian theory of musical scales
Let us play a diatonic scale according to the grama-murcchana model, an occurrence of Western just-intonation scales, and the piano stretched-octave tuning, again with "C4" (or "sa_4") as the block key. The grammar is called "-gr.tryShruti":
Diatonic scales in the grama-murcchana, just-intonation and tempered stretched-octave tunings
The differences are barely perceptible for a simple reason: the first two are identical, since this just intonation scale is a special case of grama-murcchana, while the piano scale is a fair approximation of the former. This can be seen in the following Csound score:
Time structure of the drone sequence (played 2 times)
Note the use of the _retro performance tool to reverse the order of the Full_scale sequence. The _legato(300) command extends the duration of notes up to three times their current duration. This produces a Droneseq sound structure similar to that of the Indian tanpura.
In the sound rendering of this example, a 279 Hz sample waveform of a Miraj tanpura was used to feed the Karplus-Strong algorithm.
The 23 positions of Bharata's grama-murcchana model interpreted as "just intonation"
Listening to this sequence makes it clear that treating a sequence of shruti-s as a "scale" is iconoclastic for the aesthetics of Hindustani music: most of these notes sound out of tune when played in relation to a drone (the tanpura). As discussed on page The two-vina experiment, the presence of a drone makes it unlikely that mutual consonance in melodic intervals will always prevail over consonance with the drone's upper partials. If the grama-murcchana system has any relevance to the performance of classical ragas — see page Raga intonation — then at the very least the model should be made flexible enough to accommodate the correct intonation in melodic movements.
Comparing scales
A scale comparison tool is available on the tonal resource page. Click on COMPARE TONAL SCALES and select the ones that need to be analysed.
Scales are compared 2 by 2, so that a set of n scales gives n2/2 results, which are displayed in tables. The following is a comparison of scales called Amin, Cmaj and equal_tempered. The first two ones are described on the page Just intonation: a general framework.
Comparison of three tonal scales
All comparisons are made on a 12-degree (chromatic) scale, measuring the sizes of perfect fifths — some of which may be wolf's fifths as explained on the just intonation page. The average difference of fifths is calculated by summing the squares of the differences between the sizes of fifths of identical degrees (counted in cents):
The distance between Amin and Cmaj is 8.9 cents and the distance between each of these scales and the equal-tempered one is almost 6 cents.
The second table is the result of a search for the smallest distance when transposing one of the scales by 1 to 11 semitones. Here we see that Amin (see picture) and Cmaj (see picture) are practically equivalent — they are harmonically related — since the difference goes down to 1.2 cents. The best matching version of Cmaj is constructed by transposing Amin up a fifth (7 semitones), thus moving 'C' to 'G'. For details of this procedure, see the section on Creation of just-intonation scales.
This device can be further developed to produce a classification of selected tonal scales highlighting similar/identical tuning schemes.
Another approach to tonal scale comparison is to assess the concordance between a musical work and the full set of documented tuning procedures: read the page Tonal analysis of musical works.
The syntactic model
Settings in "-se.tryOneScale"
The following are guidelines for a correct and useful implementation of microtonal scales in BP3. We follow simple sequences listed in "-gr.tryOneScale". This grammar is linked to "-to.tryOneScale" which contains a unique just intonation scale with its notes labelled "Cj", "Cj#", "Dj" etc. In "-se.tryOneScale", the Note convention has been set to 0 (English), the 'C4' key number to 60 and the Default block key to 60. All these parameters are important to reproduce the same effects. Read the Check MIDI microtonality page for practical details.
Rule #1: If only 1 microtonal scale is loaded with the grammar, it will be used by default in all productions.
The display of "Cj4" etc. makes it clear that just intonation has been used. This is also confirmed by ratio 436.137/261.630 = 1.666 = 5/3.
Why not use the note labels "Cj4", "Aj"' and "Gj4" in the grammar? This only works if, for example, the scale is specified:
S --> _scale(just intonation, Cj4) Cj4 Aj4 Gj4
This will give the same Csound score because the block key "Cj4" is set to 261.630 Hz in the scale definition. Using "Aj4" as the block key would give:
The frequencies are not explicit because the default Csound score format uses the octave point pitch-class representation, for example "A4" is the 9th pitch-class or the 8th octave (on a standard MIDI instrument). To make them explicit, just set the diapason in "-se.tryOneScale" to a slightly different value, for example 440.0001 Hz. This will produce:
We could expect the frequency of "C4" to be 261.630 Hz, but the value of 261.626 Hz differs due to rounding. The ratio of the difference is 261.630/261.626 = 1.000015 = 0.026 cents!
Rule #2: When parsing a sequence of notes, if a microtonal scale has been specified, the parser will first attempt to match the note against labels in the current microtonal scale. If there is no match, it will try to interpret the note according to the Note convention specified in settings.
The notes in the sequence "D4 F4 E4" are translated to the corresponding positions in the intonation scale. The result is visible in both the Csound score and the graphic.
This practice is only relevant to 12-degree tonal scales where positions are equivalent — albeit with slightly different frequency ratios. For example, since the matching is based on key numbers, feeding the "grama" (23-degree) microtonal scale (see above) with "C4 D4 E4" would produce "sa_4 r2_4 r4_4", where r2_4 is close to "C#4" and r4_4 is close to "D4". This makes sense because the key sequence is 60-62-64. There is currently no generic way of mapping note positions in scales with different divisions. An additional difficulty would be scales with an interval other than 2/1.
We will show later that rule #2 provides a flexibility that makes it very easy to insert enharmonic corrections in a musical score by selecting one of 12 just-intonation chromatic scales — see the page Just intonation: a general framework.
Rule #3: If the parser cannot identify a note in the current microtonal scale and against the note convention, it will try other microtonal scales previously loaded in the sequence.
Top of the "-gr.tryScales" grammar
This can be demonstrated with "-gr.tryScales". At the top of the grammar are listed the scales that will be sent to the console along with the grammar and instructions. Each scale becomes "active" in the grammar once a _scale() operator has declared it.
Let us try to produce:
S --> _scale(piano,dop4) fap3 _scale(just intonation,69) C4 rep4
Active scales are piano, then just intonation. There are no problems with note "fap3", which belongs to the piano scale, nor with "C4" which is known in the English note convention. As predicted by rule #2, the note "C4" is translated to its equivalent "Cj4" and played in just intonation.
Since the baseoctave of the scale piano is 3 (see the image above), the pitch of "fap3" will be close to that of "F4".
What happens to note "rep4"? If the piano scale had not been activated, this note would be rejected as a syntax error. However, following rule #3, the parser finds it in the piano scale. This results in the key number 74 since baseoctave = 3.
The note is interpreted as key #74 in the just intonation scale, displayed as "Dj5". This can be seen in the Csound score below and in the graphic.
As a result, notes found in a sequence are always interpreted as belonging to the scale declared immediately to the left, even if their label belongs to a different scale or note convention.
Therefore, it is not a good idea to mix notes belonging to different scales without declaring the scale before they occur. A "_scale()" declaration is best placed at the beginning of each sequence, especially at the beginning of the right argument of a rule.
The following are simple examples explaining the design of Csound scores containing instructions to control parameters that can vary continuously. We will use simple notes (no sound-object) and no Csound instrument file, so that all scores can easily converted into sound files using the "default.orc" orchestra file supplied with BP3.
Consider the following grammar with the metronome set to 60 beats per minute:
The graphic display does not show pitchbend controls:
Pianoroll and object display of "C5 D5 E5"
The _pitchcont instruction at the beginning instructs the interpreter to interpolate pitchbend values throughout whole sequence. This process can be interrupted with _pitchstep.
The _pitchrange(200) instruction indicates that the pitch may vary between -200 and +200 units, which are mapped to the MIDI standard values 0 and +16383 (both logarithmic). This is the range required by "default.orc", which counts intervals in cents. There are 1200 cents in an octave. So, _pitchbend(100) would raise the following note by one semitone.
Note: No pitchbend value is assigned to 'C5'. The default value is '0'. Notes 'D5' and 'E5' are preceded by _pitchbend(0), which assigns a '0' value. All pitchbend variations are assigned during the prolongation of 'D5'. How is this done?
The MIDI output is deceptive. Pitchbend assignments are not taken into account in this format:
"C5 D5 E5" in the MIDI output
However, the Csound output has taken all parameters into account:
"C5 D5 E5" (with pitchbend assignments) in the Csound output
How does Csound process this phrase? Let us look at the Csound score:
A table (Function Table Statement, see documentation) labelled f101 has been created by Bol Processor and inserted above 'D5' to specify variations of the pitchbend parameter. This table is called by the 10th argument of line 'D5'. Arguments 8 and 9 contain the start and end values of pitchbend according to "default.orc". These are 0 for all three notes.
The second argument of the table is the duration of its validity, here 1.000 seconds. The third argument (256) is its size — always a power of 2. The fourth argument "-7" specifies the GEN routine that Csound will use for its interpolation (see documentation). By default, GEN07 (linear interpolation) is used.
Numbers highlighted in red indicate the values of pitchbend during the variation: 0, 120, -150, 0. Numbers in black indicate the time intervals between two values. Note that 102 + 51 + 103 = 256.
All continuous parameters are handled in the same way by the Bol Processor when creating Csound scores. This includes standard MIDI controls (volume, pressure, modulation, panoramic, pitchbend) and any additional parameters defined in the Csound instrument file. See for example the page Sarasvati Vina.
Note
There is a workaround for playing the same piece with the correct pitchbend changes in MIDI. Change the rule to:
This is the same piece in a polymetric structure, with a line of silences '-' placed in the right places to receive pitchbend modifications. As pitchbend modifies all sounds on the current MIDI channel it will also modify 'D5' during its prolongation. The following is a MIDI rendering on PianoTeq — at a higher speed, so that 'D5' remains audible:
C5 D5 E5 in the MIDI format with pitchbend effects on D5
This page deals with the Bol Processor BP3 using an updated version of the Csound orchestra file "default.orc". Changes to the diapason ('A4' frequency) in the settings now affect the production of Csound scores.
In the revised Csound orchestra file, a few lines have been added to change the value of icps (oscillator frequency) according to that of the p4 argument:
if (p4 < 15.0) then icps = cpspch(p4) else icps = p4 endif
By default, this instrument receives the pitch value (argument p4) in the octave point pitch-class format — see documentation. In this case, the frequency depends only on the diapason set up in the Csound orchestra, or 440 Hz by default, i.e. cpspch(8.09) = 440.
To "tune" the Csound instrument to the diapason selected for the project in the Bol Processor BP3, if the base frequency is not exactly 440 Hz, p4 will contain the actual frequency of the note (cps format) instead of its octave point pitch-class value. The orchestra file "default.orc" can decide which format is used because (1) no note is ever sent above the 14th octave and (2) frequencies are never lower than 15 Hz. So, the value of p4 automatically makes the decision in "default.orc".
Let us try for example:
S --> A4 B4 C5
If the diapason is 440 Hz, we get the standard Csound score output:
This score shows the actual frequencies of the notes, for example 'A4' = 435 Hz. This sequence of notes will sound slightly lower than the previous one.
If the diapason is radically different from 440 Hz, the names of the notes will not change. Only the frequencies will be change accordingly. See for example the Csound score created with 'A4' = 300 Hz:
Let us now examine the changes in diapason when dealing with Csound objects. Take for example the object "a" in "-gr.tryCsoundObjects". The Csound score of its prototype (as shown in "-so.tryCsoundObjects") is a mix of 3 instruments:
t 0 120 i1 0 0.5 4.05 ; F0 i2 1.5 0.5 5.05 ; F1 i3 1.5 0.2 643.5 1 ; D#5 e
Instruments i1 and i2 use the octave point pitch-class format, while instrument i3 uses the direct cps format. This score has been created with 'A4' = 440 Hz which explains why 643.5 Hz is labelled D#5. The labelling of the notes is of minor importance as it will be revised when the performance Csound score is created.
When 'A4' = 440 Hz the Csound score of a performance of "a" exactly reflects the score in its prototype:
t 0.000 60.000 i1 0.000 0.250 4.05 90.000 90.000 0.000 0.000 0.000 0.000 ; F0 i2 0.750 0.250 5.05 0.000 0.000 90.000 90.000 0.000 0.000 0.000 ; F1 i3 0.750 0.100 643.50 1.000 ; D#5 s e
If the diapason is set to 500 Hz the Csound score of the performance will be:
t 0.000 60.000 i1 0.000 0.250 24.80 90.000 90.000 0.000 0.000 0.000 0.000 ; F0 i2 0.750 0.250 49.61 0.000 0.000 90.000 90.000 0.000 0.000 0.000 ; F1 i3 0.750 0.100 643.50 1.000 ; C#5 s e
Pianorolls with A4 = 440 Hz (left) and 500 Hz (right)
All pitches are now given in the cps format. The pitches of notes F0 and F1 would be changed in the sound output. However, the pitch of instrument i3 would remain at 643.50 Hz as set in the sound-object's prototype. As a result of the change in reference, the name of the note produced by i3 would now be 'C#5'. This change is reflected in the pianorolls (see image).
Important…
This automatic the pitch format selection does not work if you try to send a frequency lower than 15 Hz, as it would be the case for 'F0' in the previous example if the diapason was set to 300 Hz. This should never happen, however, as 15 Hz is below the range of audible sounds.
At the opposite end, octaves beyond 14 are way beyond the musical range since 'C15' is already more than 535 KHz…
This might have an incidence on Csound scores being used for producing anything else than music, although in this case the use of the octave point pitch-class format is very unlikely.
Changing middle C key number
"Middle C", or 'C4' in the English convention, is the key in the middle of a piano keyboard. By convention, its MIDI key number is 60, but this value can be changed in the settings.
For example, setting 'C4' to key #48 will cause all notes on a MIDI device to be one octave (12 semitones) lower . This does not change the Csound sound output. Playing "A4 B4 C5" with 'C4' other than 60 will produce the same sound output and the same Csound score, but in the cps pitch format:
When applied to Csound objects, changing 'C4' to a key number other than 60 will not change the note names or their actual frequencies, but it will use the cps pitch format. For example, playing "a" will result in the following Csound score:
t 0.000 60.000 i1 0.000 0.250 21.83 90.000 90.000 0.000 0.000 0.000 0.000 ; F0 i2 0.750 0.250 43.65 0.000 0.000 90.000 90.000 0.000 0.000 0.000 ; F1 i3 0.750 0.100 643.50 1.000 ; D#5 s e
The following short examples illustrate the usage of specific controls of the inference mechanism in grammars of Bol Processor (BP2 and BP3).
_destru
This instruction is useful in pattern grammars containing repetition and pseudo-repetition markers. For instance, the following grammar creates a sequence of two occurrences of variable "X" which may further be derived as "abc" or "de".
S --> (= X)(: X) X --> abc X --> de
In the first rule, (= ) is called a master parenthesis and (: ) a slave parenthesis — containing a copy of the former. This master-slave dependency is maintained throughout subsequent derivations.
The only eligible final derivations would be "abcabc" or "dede". However, the final string would be displayed for instance "(= abc)(: abc)". To obtain a usable string in which 'a', 'b', 'c' may be further instantiated as sound-objects, it is necessary to remove structural markers. The Bol Processor does it automatically once the final string has been created, i.e. there are no more candidate rules for further derivations. However, the user may want to display strings without their markers. Instruction _destru is used to this effect.
Let us consider for instance "-gr.tryDESTRU":
-se.tryDESTRU -al.abc // This grammar produces various patterns on alphabet …
RND gram#1[1] <2-1> S --> (= (= X) S (:X)) (: (= X) S (:X)) gram#1[2] <2-1> X --> Y gram#1[3] <2-1> X --> Y S Z gram#1[4] <2-1> X --> Z
ORD gram#2[1] LEFT S --> lambda [This is an erasing rule]
LIN _destru gram#3[1] X X --> abca gram#3[2] Z Y --> abc gram#3[3] Y Z --> cba gram#3[4] Y Y --> cbbc gram#3[5] Z Z --> lambda [This is an erasing rule]
The first rule in subgrammar #1 creates a self-embedding pattern in which the start symbol S is created again recursively. This recursivity might produce unlimited strings. To avoid this, each rule in subgrammar #1 is assigned initial weight "2" decreased by "1" once the rule has been fired. Therefore, no rule may be used more than 2 times. Subgrammar #2 contains a single rule deleting the left-over "S".
Subgrammar #3 destroys the structure by erasing all parentheses and master/slave markers, then it rewrites variables "X", "Y", "Z" as strings of terminal symbols. Tracing the production shows for instance that workstring
The following is a version of a Musikalisches Würfelspiel attributed to the Austrian composer Wolfgang Amadeus Mozart (1756-1791). The source is a manuscript published by B. Schott's Söhne (Mainz 39542) containing musical fragments and their correspondances to numbers selected by rolling two dice.
We will show an implementation of this game that works with both BP2.9.8 and BP3. The BP3 example has already been introduced in the page Bol Processor ‘BP3’ and its PHP interface. Here we will focus on the improvisational aspects.
The implementation took time because the score fragments were not available in digital format. Today, similar projects can be easily handled using MusicXML scores and the import procedure implemented in the Bol Processor BP3.
Set up options
Settings of "-gr.Mozart"
In the settings of the grammar "-gr.Mozart" (see picture), the option "Non-stop improvize" is checked. This means that the machine is expected to create and play new variations of the theme forever. On the BP3, in the absence of real-time MIDI, only 10 variations are produced, saved in a MIDI or Csound file and immediately available for listening via the interface players.
At the bottom of the settings, the note convention has been set to "French". At the top of it is the "seed for randomization" which deserves a comment.
Computers produce sequences of random numbers determined by successive calls to the rand() function in the C programming language. Another function called srand(x) reseeds the sequence with number "x": the seed. A given seed will produce the same sequence for subsequent calls of rand(). The only way to get unpredictable sequences is to use a different seed each time a random sequence is required. In other words, shuffle the cards. To do this, the Bol Processor picks up a seed in the time() function which returns the current date/time as an integer number.
Here, the seed is set to "999". Unless modified, the sequence of variations of Mozart's dice game should be identical (on the same computer). In order to generate random sequences we need to instruct the machine to reseed the sequence with an arbitrary number of its choice. By convention, this is done by setting the seed to 0.
The result
Below you can hear a sequence of 10 variations created with seed = 999. The MIDI file was downloaded and sent to a PianoTeq synthesiser tuned to equal temperament:
Ten variations of "-gr.Mozart" produced with seed = 999
I remember playing variations of "-gr.Mozart" to a team of music teachers who concluded enthusiastically: "That must be Mozart!"
You can also download the MIDI file and send it to a MIDI device. Below is another set of variations sent by BP2.9.8 to a Roland D-50 synthesiser whose split patch assigned notes to different instruments according to their tonal position:
Variations of "-gr.mozart" played on a split patch of Roland D-50
The same can be achieved by using _chan() or _ins() instructions in the grammar to assign instruments via reserved MIDI channels or their indices in Csound.
These examples are played on electronic instruments tuned to equal temperament. However, Bol Processor + Csound can produce the same by exploiting microtonality to produce works tuned in different temperaments or in pure intonation. Below is the same set of pieces using Zarlino's meantone temperament (Asselin 2000 p. 85):
Mozart's musical dice game in Zarlino's meantone temperament
Finally, "just intonation" can be achieved by retuning the instrument at each measure to match the harmonic context, as explained on the page Just intonation, a general framework. This gives the following interpretation — the best tuning, in my opinion:
Mozart's musical dice game in just intonation
The MIDI format does not allow for these precise context-sensitive microtonal adjustments.
The stochastic model
A challenging aspect of this game is that there is no equal probability of getting numbers in the range 2 … 12. For example, a sum of 7 is six times more likely than a sum of 2 or 12. The designer of this game may have been aware of this, as the less likely numbers have been mapped to musical sequences that sound more "dissonant".
In order to simulate the dice game, it was therefore necessary to assign weights to the rules that reflected the real probabilities. This was achieved in the grammar (below) by assigning weights K1, K2 etc. to all rules activated by dice rolls.
-se.Mozart
// Use a harpsichord or piano sound
LIN [Select rules randomly and apply from left to right]
gram#1[1] S --> _vel(80) A B gram#1[2] A --> A1 A2 A3 A4 A5 A6 A7 A8 A1 A2 A3 A4 A5 A6 A7 A'8 gram#1[3] B --> B1 B2 B3 B4 B5 B6 B7 B8 B1 B2 B3 B4 B5 B6 B7 B8
COMMENT: This is Mozart's musical dice game… [Source: B. Schott's Söhne, Mainz 39542]
Sound-object and pianoroll displays of a polymetric expression {{2,do3,sol3}{do3,mi3},mi5 re5 mi5 sol5 do6 sol5} produced by T162 in "-gr.Mozart"
Subgrammars #1 to #17 rewrite the work string — initially "S" — as strings of variables "A1", "A2", "B1", "T96" etc. The numbers of the "T-variables" are taken from tables in the game.
Subgrammar #18 rewrites each "T-variable" as a polymetric expression of terminal symbols (simple notes). For example, "la3" is equivalent to "A4" in English which is set to 440 Hz in "-se.Mozart". This instrument can be tuned.
The pictures show self-explanatory pianoroll and sound-object displays of the polymetric expression produced by "T162":
{{2,do3,sol3}{do3,mi3},mi5 re5 mi5 sol5 do6 sol5}
Octave numbering and diapason
When we captured notes from a MIDI keyboard to construct the rules for subgrammar #18, we had the Bol Processor set up incorrectly due to confusion over octave numbering in the English and French conventions.
In English, the "middle C" on a piano keyboard is called "C4" and its number is 60. In French, the key with the same number is called "do3". When we mistakenly called it "do4", all the notes were written an octave higher…
After fixing the problem on BP2, there were two ways to correct the octave shift:
Set the "Middle C" number to 48
Keep the standard "Middle C" = "C4" = 60 and transpose the whole piece down 12 semitones: S --> _transpose(-12) _vel(80) A B
We believe that the second solution makes more sense because it is based on a universal standard of key numbering.
Both solutions have the same corrective effect on the Csound score: only note names will change, for example "mi5" is replaced with "mi4" but both octave point pitch-class notations remain "9.04".
Settings on -gr.Mozart
On the Settings page the diapason (frequency of "A4") is set to 440 Hz which is the most common standard for tuning instruments. If "A4" was numbered 48 this frequency should be lowered to 220 Hz.
However, this diapason setting has no effect on the tonality of pieces produced by "-gr.Mozart" in MIDI format. The real-time MIDI stream or MIDI file will be played by MIDI devices — such as the MIDIjs javascript player — using their own default setting of "A4".
In the Bol Processor BP2, the frequency of "A4" also had no effect on the Csound output. In the orchestra file "default.orc", the oscillator parameter kpitch was derived from the octave point pitch-class parameter p4 via the function cpspch() also using the default 440 Hz diapason = cpspch(8.09) — see documentation. This has been changed in BP3, using an updated version of "default.orc". See Csound tuning in BP3 for more details.
References
Asselin, P.-Y. Musique et tempérament. Paris, 1985, republished in 2000: Jobert. Soon available in English.