Tonal analysis of musical works

Musical works encod­ed on the Bol Processor (using “sim­ple notes” as per English, Italian/Spanish/French and Indian con­ven­tions) can be analysed in terms of har­mon­ic or melod­ic intervals.

Musical aspects are dis­cussed after a descrip­tion of the process. 

In the final sec­tion, we present a single-click method for eval­u­at­ing the ade­qua­cy of all doc­u­ment­ed tun­ing sys­tems to a giv­en musi­cal work. A demo of this analy­sis is on page Bach well-tempered tonal analy­sis.

Basic process

This com­pu­ta­tion is launched by but­ton ANALYZE INTERVALS at the bot­tom of the ‘Data’ window:

The machine found a ‘-cs.tryTunigs’ dec­la­ra­tion on top of the data con­tent, indi­cat­ing that it should pick up def­i­n­i­tions of tonal scales con­tained in that Csound resource. These def­i­n­i­tions are only acces­si­ble if ‘-cs.tryTunigs’ has been opened less than 24 hours ago: these files are stored in the ‘temp_bolprocessor’ fold­er auto­mat­i­cal­ly cleaned up of old stor­age. Click the ‘open’ link if necessary.

The ana­lyt­i­cal process will be demon­strat­ed with a sin­gle phrase of François Couperin’s Les Ombres Errantes import­ed from a MusicXML score — read page Importing MusicXML scores. This exam­ple is small enough for a visu­al check of the tech­ni­cal process, although too short to derive any mean­ing­ful musi­cal inter­pre­ta­tion of the result.

The musi­cal item reads as fol­lows in Bol Processor nota­tion (English con­ven­tion) — read page Polymetric struc­tures.


_rndtime(20) {_tempo(13/15) _vel(64){3, _legato(20) C5 _legato(0) {1/4,C5 B4 C5}{3/4,B4} _legato(20) Eb5,{1/2,Eb4}{5/2,G4 D4 F4 C4 Eb4},Eb4 D4 C4}} {_tempo(13/15) _vel(64){4, _legato(0) {1/4,Eb5 D5 Eb5}{3/4,D5} _legato(20) C5 _legato(0) {1/4,C5 B4 C5}{3/4,B4}{1/8,C5 B4}{7/8,C5},{4,B3 F4 Eb4 G4 D4 F4 C4 Eb4},B3 Eb4 D4 C4}}

Beginning of “Les Ombres Errantes”
Scale “Rameau en sib”

Sound pro­duc­tion made use of the Csound resource file ‘-cs.tryTunings’ in which the tonal scale ‘rameau_en_sib’ is found — read page Comparing tem­pera­ments. This scale pre­sum­ably pro­vides the best tun­ing for this piece when per­formed on a “harpsichord-like” Csound instrument.

The machine picked up a def­i­n­i­tion of the tonal scale in a tem­po­rary copy of ‘-cs.tryTunings’. The sig­nif­i­cant con­tent of this def­i­n­i­tion is the set of tonal posi­tions in the scale shown on the pic­ture — read page Microtonality.

Clicking the ANALYZE INTERVALS but­ton yields the fol­low­ing display:

Analysis of melod­ic and har­mon­ic inter­vals in a brief frag­ment of “Les Ombres errantes”

The table above con­tains a sum­ma­ry of match­ing inter­vals: pairs of notes played in sequence (melod­ic) or super­posed (har­mon­ic), with a dis­tinc­tion between ascend­ing and descend­ing melod­ic inter­vals. These match­ings may be ver­i­fied on the graph­ic dis­play of this item:

Intervals are list­ed in decreas­ing order of rel­e­vance. Thus, melod­ic inter­val ‘C’ down to ‘B’ occured dur­ing 20.3 beats, scored high­est. Ascending melod­ic inter­vals ‘B’ to ‘F’ and ‘D’ to ‘B’ are the least fre­quent ones. Scores below 5% of the max­i­mum one in the col­umn will be ignored in the graph­ic display.

Harmonic (left) and melod­ic (right) intervals

Interestingly, the high­est scores of har­mon­ic inter­vals in this musi­cal phrase are minor thirds such as ‘D’/‘B’ and ‘C’/‘Eb’. The fifth ‘C’/‘G’ is scored only 1.6 beats, which is 18% of the high­est score.

The detec­tion of a “har­mon­ic inter­val” is based on com­par­isons of their start and end dates with options that can be mod­i­fied. Let us call $start1, $end1, $start2 and $end2 the tim­ings of two notes. We assume $start2 >= $start1 owing to a pre­lim­i­nary chrono­log­i­cal sort­ing of the list of notes. Function matching_intervals() does the fol­low­ing to assess har­mon­ic intervals:

$duration1 = $end1 - $start1;
$duration2 = $end2 - $start2;
$overlap = $end1 - $start2;
$smallest_duration = $duration1;
if($duration2 < $duration1) $smallest_duration = $duration2;

if($smallest_duration < $min_dur) return FALSE;
if($start1 + ($duration1 / 2.) < $start2) return FALSE;
if($overlap < ((1 - $ratio) * $smallest_duration)) return FALSE;
return TRUE;

This func­tion elim­i­nates brief over­laps of time inter­vals, as cre­at­ed for instance by slurs inter­pret­ed as _legato() per­for­mance con­trols when import­ing MusicXML scores — read details. It also elim­i­nates notes with dura­tions less than $min_dur option­aly set to 500 mil­lisec­onds. Thus, for instance, brief notes such as ‘C5’, ‘B4’, ‘Eb5’ etc. will be dis­card­ed. Finally, it checks that $over­lap is greater than a frac­tion of the small­est dura­tion, with $ratio set to 0.25 by default. Another option which is not shown here is the max­i­mum tonal dis­tance berween two notes, set to 11 semi­tones by default.

The con­di­tions for match­ing melod­ic inter­vals are similar:

if($start2 > ($end1 + $max_gap)) return FALSE;
if($start1 + ($duration1 / 2.) >= $start2) return FALSE;
if($overlap >= ($ratio * $smallest_duration)) return FALSE;
return TRUE;

Parameter $max_gap (typ­i­cal­ly 300 mil­lisec­onds) is the max­i­mum delay between the end of the first note and the begin­ning of the next one.

All para­me­ters can be mod­i­fied before launch­ing again the process. These set­tings will be dis­cussed later:

Default set­tings for tonal analysis


Detailed tonal analysis

To check the sequence of time inter­vals in great detail it is pos­si­ble to acti­vate the “Display all dates” option yield­ing a detailed analysis.

All match­ing inter­vals are list­ed. It is not prac­ti­cal to use this option on large musi­cal items…

Dates are in sec­onds, round­ed to 0.1 s, although more accu­rate val­ues are tak­en into account. In fact, all time cal­cu­la­tions are per­formed on inte­ger ratios, just as in Bol Processor’s console.

The result is always arguable. For instance, some melod­ic or har­mon­ic inter­vals may appear “acci­den­tal” rather than significant.

For this and oth­er rea­sons, it may be nec­es­sary to fig­ure out more options asso­ci­at­ed with musi­cal and per­for­mance styles.

Graphic display

Melodic and har­mon­ic tonal inter­vals are dis­played with the back­ground of the tonal scale used for the per­for­mance. Here it would be ‘rameau_en_sib’, although an equal-tempered scale would be used by default.

Clicking the links to har­mon­ic inter­val images (see above pic­ture) yields the fol­low­ing three graphs — in sep­a­rate and resiz­able windows:

Display of har­mon­ic inter­vals. The ‘rameau_en_sib’ scale is in the middle.

Intervals are shown as gold high­light­ings with widths pro­por­tion­al to their rel­a­tive scores. On the left­most pic­ture, these gold­en seg­ments are drawn behind fifths, major and minor thirds marked on the scale. For this rea­son the yel­low high­light­ing of link between Eb and G, behind the green link of a har­mon­ic major third, is less vis­i­ble on the full picture.

Minor thirds (ratio 6/5) have been added in the set­tings. For this rea­son, the ones avail­able on this scale are dis­played as black seg­ments. These addi­tion­al ratios are list­ed on the top right of each picture.

Restricted analysis

If a MusicXML file has been import­ed along with mea­sure num­bers (notat­ed [—1—], [—2—] etc.), these can be used to restrict the analy­sis to a sub­set of the score.

Below is the set­ting of mea­sures #1 to #32 (the Aria) in J.S. Bach’s Goldberg Variations:

Restricting the tonal analy­sis to the Aria in Goldberg Variations makes sense because oth­er vari­a­tions, due to their high speed, do not dis­play har­mon­ic inter­vals longer than the min­i­mum dura­tion fixed in the set­tings (500 ms).

Musical discussion

Tonal analy­sis with the help of Bol Processor aims at sup­port­ing the choice of a tun­ing sys­tem best fit­ting a musi­cal piece — a tem­pera­ment as fig­ured out by Baroque musi­cians. This issue is addressed on page Comparing tem­pera­ments.

We first describe a visu­al method for esti­mat­ing (rather than mea­sur­ing) the ade­qua­cy of a tun­ing sys­tem for the per­for­mance of musi­cal works import­ed from MusicXML scores — read the page on this sub­ject. In the next sec­tion, we will show how to com­pare all can­di­date scales in an auto­mat­ic way, tak­ing into account rel­e­vant para­me­ters revealed in this section.

Take for instance J.S. Bach’s Prelude 1 in C major for which some his­tor­i­cal infor­ma­tion (report­ed by Asselin, 2000 p. 142) sug­gest­ed the choice of a Kirnberger tem­pera­ment. Which one? 

Harmonic tonal inter­vals of Bach’s 1st pre­lude ver­sus Kirnberger II and Kirnberger III tun­ing systems

The full rep­re­sen­ta­tion of har­mon­ic tonal inter­vals is shown above and matched against two dif­fer­ent scales described by Kirnberger (Asselin, 2000 p. 90, 93). The match­ing looks bet­ter on the right one (Kirnberger III). For instance, inter­val ‘D’ - ‘A’ is clos­er to a “pure” fifth (702 cents) on Kirnberger III (697) than on Kirnberger II (691). Another sig­nif­i­cant match­ing is the har­mon­ic major third ‘F’ - ‘A’. Other inter­vals are sim­i­lar with respect to these scales.

A care­ful lis­ten­ing to both ver­sions might con­firm this mechan­i­cal analysis:

Kirnberger II
Kirnberger III

The same crude analy­sis does not yield a notice­able result for François Couperin’s Les Ombres Errantes. Harmonic inter­val analy­sis may be of less rel­e­vance because this item is glob­al­ly more per­ceived as sequences of melod­ic inter­vals, includ­ing minor thirds and major sec­onds. This is vis­i­ble on the graph of melod­ic intervals:

Melodic inter­vals of “Les Ombres Errantes” (full performance)

Matching this graph with the ‘rameau_en_sib’ scale does not reveal inter­est­ing pat­terns for the sim­ple rea­son that nei­ther minor thirds nor major sec­onds have been tak­en into account on this scale in terms of “just into­na­tion” — read page Just into­na­tion: a gen­er­al frame­work. Even though we may assume that a Pythagorean major sec­ond (ratio 9/8) sounds more “con­so­nant” than a har­mon­ic one (ratio 10/9), there is no rea­son for sys­tem­at­i­cal­ly assert­ing that the har­mon­ic minor third (ratio 6/5) is “bet­ter” than the Pythagorean one (ratio 32/27).

The pic­ture on the left side reveals that fre­quent melod­ic inter­vals of major thirds do high­light har­mon­ic major thirds (ratio 5/4) of this scale.

We need to check inter­vals small­er than major thirds on tonal scales. If we instruct the machine to check inter­vals close (with­in ± 10 cents) to the har­mon­ic minor third (ratio 6/5), the pre­ced­ing graphs are dis­played as follows:

Melodic inter­vals of “Les Ombres Errantes” (full per­for­mance) with black mark­ings of “good” minor thirds (6/5) on a ‘rameau_en_sib’ temperament

The pic­ture on the left side reveals that all minor thirds used in this per­for­mance coin­cide with­in ± 10 cents with har­mon­ic minor thirds (ratio 6/5) of the scale, which is an incen­tive to admit that the ‘rameau_en_sib’ scale would be a fair (if not the best) tun­ing option for Les Ombres Errantes.

A counter-example is the match­ing of Les Ombres Errantes with a pure-minor-thirds tem­pera­ment designed dur­ing the 16th cen­tu­ry (Asselin 2000 p. 82, see image). Below are the graphs of match­ing melod­ic (left) and har­mon­ic (right) inter­vals, along with black lines mark­ing har­mon­ic minor thirds (ratio 6/5):

Melodic (left) and har­mon­ic (right) inter­vals of “Les Ombres Errantes” against a pure-minor-thirds temperament
“Les Ombres Errantes” with a pure minor thirds tem­pera­ment (16th century)

The main draw­back of this ‘pure_minor_thirds’ tem­pera­ment is the very low posi­tion of ‘Ab’ meant to pro­duce a con­so­nant sequence of minor thirds: ‘Ab’ - ‘B’ - ‘D’ - ‘F’. Yet ‘Ab’ - ‘B’ is not a melod­ic inter­val found in this piece, nor ‘Db’ - ‘E’ and ‘E’ - ‘G’ which are well ren­dered by the ‘pure_minor_thirds’ tem­pera­ment. Mismatches are also vis­i­ble on har­mon­ic inter­vals — and easy to detect by lis­ten­ing. We may con­clude that the pure minor thirds tem­pera­ment is nei­ther the best not the worst tun­ing sys­tem for this musi­cal work, although com­par­ing sound pro­duc­tions sug­gests that it is sig­nif­i­cant­ly less good than the ‘rameau_en_sib’ scale.

Comparing graphs is easy with the detached resiz­able pic­tures pro­duced by the Bol Processor.

A “deaf musicologist’s” approach

The analy­sis shown so far replaced a com­par­i­son of sound ren­der­ing — read page Comparing tem­pera­ments — with a visu­al pattern-matching issue. We made it clear that musi­cians and instru­ment tuners of the Baroque peri­od were try­ing to achieve con­so­nance in terms of sim­ple fre­quen­cy ratios for fifths (close to 3/2) and har­mon­ic major thirds (close to 5/4). This approach and its under­ly­ing assump­tions are dis­cussed on page Just into­na­tion: a gen­er­al frame­work.

Further, one might be tempt­ed to assert that a “just-intonation” minor third should be har­mon­ic (ratio close to 6/5), yet the deci­sion should stay open. To this effect, it is pos­si­ble to enter an addi­tion­al set of melod­ic and har­mon­ic inter­vals which the ana­lyst esti­mates sig­nif­i­cant for the eval­u­a­tion of tonal scales. Each inter­val is set by an inte­ger ratio — which may be as com­plex as necessary.

A com­par­a­tive pat­tern match­ing will assign a numer­ic score to every scale assessed for its fit­ting with the musi­cal work. This makes it pos­si­ble to sort can­di­date scales. Still, two sep­a­rate scores are required, one for melod­ic and the next one for har­mon­ic inter­vals. A weighed sum of scores is there­fore used for sort­ing the list of scales.

This method has been imple­ment­ed in the Tonal analy­sis process. We com­pared all scales defined in ‘-cs.tryTunings’ — con­tain­ing notably all tem­pera­ments doc­u­ment­ed by Pierre-Yves Asselin — in terms of their ade­qua­cy for the ren­der­ing of melod­ic and tonal inter­vals in François Couperin’s Les Ombres Errantes:

Matching scales for “Les Ombres Errantes”

Great result! The machine con­firms that scale ‘rameau_en_sib’ is the best can­di­date for the inter­pre­ta­tion of Les Ombres Errantes. Its scores are sig­nif­i­cant­ly bet­ter for both melod­ic and har­mon­ic inter­vals. (Altogether, 45 tun­ing schemes have been tried.) 

By default, the scor­ing of melod­ic and har­mon­ic inter­vals only takes into account per­fect fifths (3/2) and har­mon­ic major thirds (5/4) as “good” inter­vals, with respec­tive weights of 2 and 1, and wolf fifths (40/27), wolf fourths (320/243) and Pythagorean major thirds (81/64) rat­ed as “bad” inter­vals weigh­ing respec­tive­ly -2, -2 and -1. All these weights can be mod­i­fied as shown on the above picture.

We repeat the com­par­i­son with the addi­tion­al option of har­mon­ic minor thirds (6/5) as melod­ic intervals:

Matching scales, includ­ing har­mon­ic minor thirds (ratio close to 6/5) for melod­ic intervals

Expectedly, all melod­ic scores increased but the win­ner remained. If we add the Pythagorean major sec­ond (ratio close to 9/8) we get the following:

Matching scales, includ­ing ratios 6/5 and 9/8 for melod­ic intervals

The ‘rameau_en_sib’ scale is now chal­lenged by ‘sauveur’ for melod­ic inter­vals, but its har­mon­ic score remains higher.

Note that scales Abmaj and Cmin are iden­ti­cal, which explains their equal scores.

A visu­al com­par­i­son of scales with melod­ic inter­val high­light­ings shows that there is lit­tle dif­fer­ence between these tem­pera­ments with respect to the per­for­mance of Les Ombres Errantes. Since ‘sauveur’ tem­pera­ment had been designed in 1701 by the (hear­ing impaired?) French math­e­mati­cian Joseph Sauveur, it is not unlike­ly that it could be used for the com­po­si­tion of Les Ombres Errantes in 1730.

Comparison of ‘rameau_en_sib’ and ‘sauveur’ tem­pera­ments for melod­ic inter­vals in “Les Ombres Errantes”, with addi­tion­al ratios 6/5 and 9/8 dis­played as black lines.

Scale ‘rameau_en_sib’ again scores as good as ‘sauveur’ if the Pythagorean minor third (ratio close to 32/27) is tried as a melod­ic inter­val (both ascend­ing and descend­ing) in replace­ment of ratio 6/5… This is due to the usage of ‘F’ - ‘Ab’ ren­dered as a Pythagorean minor third by ‘rameau_en_sib’, yet not by ‘sauveur’.

Many more checks can be done by chang­ing the weights assigned to occur­rences of melod­ic and har­mon­ic ratios. Finding the best set­tings requires a thor­ough study of the musi­cal score — this is where human musi­col­o­gists come back to the scene!

Ears (plus exper­tise of the score) might make a final decision:

“Les Ombres Errantes”, Rameau en sib temperament
“Les Ombres Errantes”, Sauveur temperament

The ana­lyt­i­cal process we are fol­low­ing is a kind of reverse engi­neer­ing… Evidently, com­posers did not look for a suit­able tem­pera­ment after cre­at­ing a musi­cal work. It is more real­is­tic that they com­posed works on exist­ing instru­ments, with the effect that sets of pieces pro­duced by the same com­pos­er (using the same instru­ment) at a giv­en peri­od obeyed implic­it melod­ic and har­mon­ic con­straints best fit­ting the tun­ing of their instrument(s).

Comparative study

Let us exam­in again J.S. Bach’s Prelude 1 in C major for which Kirnberger III had (visu­al­ly) been elect­ed as a bet­ter match than Kirnberger II. Including ratios 6/5 and 9/8 in eli­gi­ble melod­ic up/down inter­vals, and 6/5 as a har­mon­ic inter­val, yields the fol­low­ing clas­si­fi­ca­tion of tun­ing schemes:

Classification of scales for the inter­pre­ta­tion of J.S. Bach’s Prelude 1 in C major

The win­ner is undoubt­ed­ly ‘sauveur’ although the har­mon­ic score is iden­ti­cal for six tem­pera­ments, yet ‘kirnberger_3′ rates much less.

Keep in mind that this has been obtained by declar­ing ratios close to 6/5 as eli­gi­ble con­so­nant melod­ic and har­mon­ic inter­vals. Read page Bach well-tempered tonal analy­sis for a dis­cus­sion of this hypothesis.

Sauveur’s tem­pera­ment is the best fit because of its high pro­fi­cien­cy in har­mon­ic minor thirds (6/5) and Pythagorean major sec­onds (9/8). It also has a com­plete set of per­fect fourths and fifths (3/2) except for the wolf fourth ‘D#’ - ‘G#’ which is close to 477 cents (instead of 498). Fortunately, this inter­val is nev­er used in Bach’s piece:

Matching melod­ic inter­vals of J.S. Bach’s Prelude 1 in C major against Sauveur’s temperament
J.S. Bach’s Prelude 1 in C major per­formed by Bol Processor + Csound with Sauveur’s temperament

This ren­der­ing can be com­pared (in terms of tune­ful­ness) with a human per­for­mance on a real harpsichord:

J.S. Bach’s Prelude 1 in C major played on the copy of an instru­ment built by Hans Moerman in Antwerpen (1584). Source: Wikipedia licence CC BY-SA.

Unsurprizingly, J.S. Bach’s Fugue 1 in C major shares the same pref­er­ence for ‘sauveur’, with oth­er tun­ing schemes fol­low­ing in a dif­fer­ent order. All fugues in this series of works (books I and II) have been asso­ci­at­ed with pre­ludes of the same key.

The tonal analy­sis of J.S. Bach’s Prelude 2 in C minor again selects ‘sauveur’ under the same eval­u­a­tion cri­te­ria — includ­ing ratios 6/5 (melod­ic and har­mon­ic) and 9/8 (melod­ic up/down). The clas­si­fi­ca­tion is utter­ly dif­fer­ent but the win­ner is unchanged, even though it is chal­lenged by ‘rameau_en_sib’ for its har­mon­ic score.

J.S. Bach’s Prelude 2 in C minor per­formed by Bol Processor + Csound with Sauveur’s temperament

Note that the Cmin scale has a bad rate due to melod­ic inter­vals. It beats Sauveur’s tem­pera­ment with respect to har­mon­ic inter­vals, but these are rel­a­tive­ly less fre­quent in this pre­lude. This clas­si­fi­ca­tion might be quite dif­fer­ent if some ratios (such as 9/8) are ignored for eval­u­at­ing melod­ic inter­vals. Even ratios close to Pythagorean thirds (81/64) might sound accept­able in quick melod­ic move­ments — read page Bach well-tempered tonal analy­sis.

J.S. Bach’s Fugue 2 in C minor again selects ‘sauveur’.

We get the same result with J.S. Bach’s Prelude 6 in D minor (ran­dom choice). Note the strik­ing­ly high melod­ic scores of ‘sauveur’:

J.S. Bach’s Prelude 6 in D minor per­formed by Bol Processor + Csound with Sauveur’s temperament

J.S. Bach once claimed that he could play his entire reper­toire on the instru­ment he had tuned by him­self. This sounds like squar­ing the cir­cle, and many hypothe­ses have been advo­cat­ed to solve this prob­lem for das Wohltemperierte Clavier.

These exam­ples sug­gest that Sauveur’s tem­pera­ment could be Bach’s choice. Although there is lit­tle chance that the German com­pos­er (1685-1750) had heard about research work of the French physi­cian (1653-1716), the sys­tem­at­ic con­struc­tion of this tem­pera­ment — a sin­gle sequence of fifths dimin­ished by 1/5 com­ma (see image and read Asselin, 2000 p. 80) — sug­gests that any com­pos­er might fig­ure it out independently.

In order to check (and chal­lenge) this hypoth­e­sis we com­plet­ed the tonal analy­sis of 24 pre­ludes and fugues in books I and II of The Well-Tempered Clavier using the same set­tings. Read page Bach Well-tempered tonal analy­sis. This large-spectrum analy­sis requires a device for batch pro­cess­ing which we describe now.

Batch processing

In order to analyse the tonal­i­ty of a large num­ber of musi­cal works we need to cre­ate a Data page con­tain­ing the names of all pages con­tain­ing the Bol Processor scores of these items. For instance, page “-da.index_preludes_book_I” reads as follows:

// All Bach preludes



When read­ing this page, the Tonal analy­sis pro­ce­dure opens each data file and picks up the Bol Processor score it con­tains. To facil­i­tate this, option Batch pro­cess­ing may be checked in the settings.

In the batch-processing mode, the machine will not dis­play the whole set of tonal scales for each analysed musi­cal work. If the score con­tains a spec­i­fi­ca­tion for a tonal scale — a _scale(some_scale, 0) instruc­tion — the list of pref­ered scales is dis­played down to the spec­i­fied one. If the spec­i­fied scale comes first in the clas­si­fi­ca­tion, the fol­low­ing next 2 fol­low­ing scales are list­ed. If no scale is spec­i­fied, only the 10 best-matching scales are listed:

Batch pro­cess­ing of “-da.index_preludes_book_I
Items #2 and #3 con­tain the spec­i­fi­ca­tions of tonal scales sauveur and Dbmaj respec­tive­ly.
This pref­er­ence is con­firmed by the analy­sis of item #2 but it is not the case with item #3.

At the bot­tom of the page, a but­ton SHOW RESULTS dis­plays a HTML file — which can be down­loaded — con­tain­ing all results:

End of batch pro­cess­ing. Clicking SHOW RESULTS dis­plays the entire result set.

The HTML page also dis­plays the set­tings of the analy­sis and it can be down­loaded, along with a CVS file of the same fig­ures which lends itself to sta­tis­ti­cal graph­ic display.

Results for the analy­sis of all pre­ludes and fugues of The Well-tempered Clavier are pub­lished and dis­cussed on page Bach well-tempered tonal analy­sis.

Does it apply to western classical music?

The analy­sis of tonal inter­vals and of match­ings with doc­u­ment­ed tun­ing sys­tems (tem­pera­ments) makes sense with respect to Baroque music, tak­ing for grant­ed that com­posers and instru­ment tuners were try­ing to achieve a max­i­mum con­so­nance in the per­for­mance of their musi­cal reper­toire. The ques­tion remains open whether it pro­duces an equal­ly reli­able (and use­ful) analy­sis of musi­cal works in more recent periods.

Indeed, launch­ing the ana­lyt­i­cal process is tech­ni­cal­ly pos­si­ble once the score has been import­ed to the Bol Processor. Let us try Beethoven’s Fugue in B flat major (cir­ca 1830). We may set up har­mon­ic major thirds (6/5) and Pyhagorean major sec­onds (9/8) as sig­nif­i­cant melod­ic inter­vals for the eval­u­a­tion. This yields the following:

Matching Beethoven’s Fugue in B flat major against doc­u­ment­ed scales

The best score — once again — is that of Sauveur’s tem­pera­ment, notably owing to ascend­ing melod­ic inter­vals. In case per­form­ers do attempt to achieve ratios 9/8, 6/5, 5/4 and 3/2, then ‘sauveur’ might be the best rep­re­sen­ta­tion of the “tun­ing scheme” they have in mind.

The equal-tempered scale comes last with scores of 3529, 1680 and 240 for ascend­ing melod­ic, descend­ing melod­ic and har­mon­ic inter­vals respec­tive­ly. Part of the expla­na­tion lies in the com­par­i­son of both scales as back­grounds of har­mon­ic intervals:

Comparing the equal-tempered scale (left) and Sauveur’s tem­pera­ment (right) for the per­for­mance of Beethoven’s Fugue in B flat major

The most vis­i­ble dif­fer­ence is the usage of almost per­fect har­mon­ic major thirds (ratio 5/4) on Sauveur’s scale (see image) instead of Pythagorean major thirds (approx. ratio 81/64) on the equal-tempered scale (see image). The for­mer have been assigned weighs (+1) and the lat­ter (-1). Background yel­low lines indi­cate that these inter­vals are used quite often.

Melodic inter­vals in Beethoven’s Fugue in B flat major

A draw­back of Sauveur’s scale is the wolf fourth ‘D#’ - ‘G#’ (approx. 477 cents), yet this inter­val is not fre­quent on the score.

Many oth­er remarks could be done com­par­ing the scores of melod­ic inter­vals, and the entire process (which took almost 8 min­utes) could be launched again with dif­fer­ent set­tings of weighs assign­ing more or less impor­tance to par­tic­u­lar inter­vals. After all, we do not know whether an expert play­er of a stringed instru­ment would per­form minor thirds at inter­vals 6/5, 32/27, tem­pered, or any oth­er val­ue, and even more whether these val­ues depend on the harmonic/melodic con­text of each musi­cal phrase.

This sug­gests that we should­n’t get too excit­ed about a (still prim­i­tive) tonal analy­sis tool when it comes to sophis­ti­cat­ed tonal material…


Asselin, P.-Y. Musique et tem­péra­ment. Paris, 1985, repub­lished in 2000: Jobert. Soon avail­able in English.

Musicians inter­est­ed in con­tin­u­ing this research and relat­ed devel­op­ment may use Bol Processor BP3’s beta ver­sion to process musi­cal works and imple­ment more tun­ing pro­ce­dures. Follow instruc­tions on page Bol Processor ‘BP3’ and its PHP inter­face to install BP3 and learn its basic oper­a­tion. Download and install Csound from its dis­tri­b­u­tion page.

Leave a Reply

Your email address will not be published. Required fields are marked *