On Musical Scale Rationalization

Already the ancient Greek philosophers discovered that the consonance of musical intervals is related to the complexity of the corresponding frequency ratios. Modern psychoacoustic and neurological research provides us with explanations why simple frequency ratios might be important for our perception of intervallic relationships, even though many tunings only approximate these “just” intervals. By rationalizing a (non-rational) musical scale the harmonic relationships can be made explicit and can then be used in various applications ranging from algorithmic composition to automatic transcription. The first general scale rationalization algorithm based on a certain harmonicity measure and a complete enumeration approach was proposed by the composer Clarence Barlow. This paper introduces the notion of “subadditive” consonance measures to give a general formulation of the problem, and proves that the problem is NP-complete. The paper also describes a new algorithm for scale rationalization, based on clique search in graphs, and points out possible applications such as the graphical visualization of scales and algorithmic composition. 1 Motivation and background This paper discusses one of the fundamental problems in the mathematical theory of music which has been with us at least since the time of the ancient Greek philosophers. According to the written records, some 2500 years ago Pythagoras was the first to point out the importance of simple frequency ratios in the definition of the major musical intervals such as the octave (2/1), the fifth (3/2) and the fourth (4/3). This work formed the basis of many later developments of musical scales and tunings during the medieval times and the modern age until today. It has also been observed that, at least for the kinds of harmonic sounds produced by instruments commonly used in Western music, the “pleasantness” or “consonance” of an interval is somehow correlated with the complexity of its frequency ratio. While this observation is not undisputed and is still the subject of investigations, psychoacoustic and neurological research have provided us with possible explanations for this phenomenon. Helmholtz proposed that the consonance of two complex tones depends on the beats between adjacent overtones of the two harmonic series (Helmholtz 1983). The perceived roughness of adjacent sine tones was later studied more thoroughly and explained with the concept of the critical band (Plomp and Levelt 1965). By summing up the pairwise dissonances of all involved partials one obtains a dissonance function for pairs of complex tones which, for harmonic sounds, attains its local minima at simple fundamental frequency ratios (Sethares 2005). Neurological research suggests another possible explanation, namely that the processing of sound in early stages of the auditory signal path involves nonlinear resonances leading to phase-locked activation patterns of neural oscillators, a process which tends to map frequency relationships in the auditorial input to nearby simple integer ratios (Large and Tretakis 2005). This gives rise to an interesting mathematical problem: What exactly is a “simple” ratio, and is it possible to “rationalize” a given sequence of (possibly irrational) pitches in such a manner that only simple integer ratios are used? An abundance of different “consonance” or “harmonicity” measures have been proposed to answer the first question, such as Euler’s gradus suavitatis (Euler 1739), Helmholtz’s harmoniousness measure (Helmholtz 1983), James Tenney’s harmonic distance (Chalmers 1993) and Clarence Barlow’s harmonicity function (Barlow 2001b). However, to our knowledge, Barlow was the first to also point out an algorithm to rationalize arbitrary (non-rational) scales using complete enumeration of possible solutions derived from a precomputed set of possible tuning alternatives. Our contribution in this paper is that we introduce the notion of “subadditive” harmonicity measures which allows us to treat many of the existing consonance measures in a uniform setting. We then go on to prove that a certain formulation of the scale rationalization problem is NP-complete and thus brute force algorithms like the one by Barlow are probably the best we can do if we want to find an optimal solu-