Optimal Tuning of Two-Dimensional Keyboards

We give a new analysis of a tuning problem in music theory, pertaining specifically to the approximation of harmonics on a two-dimensional keyboard. We formulate the question as a linear programming problem on families of constraints and provide exac…

Authors: Aricca Bannerman, James Emington, Anil Venkatesh

Optimal Tuning of Two-Dimensional Keyboards
Optimal T uning of Tw o-Dimensional Keyb oards Aricca Bannerman, James Emington, Anil V enk atesh Abstract W e giv e a new analysis of a tuning problem in m usic theory , p ertaining sp ecifically to the approximation of harmonics on a tw o-dimensional k eyb oard. W e formulate the question as a linear programming problem on families of constrain ts and pro vide exact solutions for many new k eyb oard dimensions. W e also show that an optimal tuning for harmonic approximation can b e obtained for any k eyb oard of given width, pro vided sufficien tly man y ro ws of o cta v es. 1 In tro duction In music theory , a temp erament is a system of tuning that is generated b y one or more regular pitc h in terv als. One of the primary factors in c ho osing a temp eramen t is the close appro ximation of the harmonic sequence. The Miracle temp eramen t, discov ered b y George Secor in 1974, is a t wo-dimensional temp eramen t that approximates the first elev en har- monics un usually well. In this pap er, w e giv e a new analysis of Secor’s Miracle temp eramen t problem. W e formulate the question as a linear programming problem on families of con- strain ts and pro vide exact solutions for k eyb oards of dimensions up to 15 × 100. W e further pro ve that for an y keyboard of given width, there exists a universal best temp eramen t that is realizable with finitely man y ro ws of k eys. In Section 2 of the article, we establish definitions and give historical context for the problem of approximating the harmonic sequence. In Section 3, w e present Secor’s math- ematical mo del of harmonic approximation and highligh t t wo wa ys of extending the ap- proac h. In Section 4, w e pro ve v arious technical lemmas that b ound the complexit y of our searc h algorithm, and outline the algorithm used to searc h for candidate solutions. In Section 5, we presen t and analyze our results and giv e a pro of of the main theorem. 2 Bac kground and Definitions W e first establish definitions of several k ey terms from music theory . • Giv en a m usical pitc h of frequency f , its n -th harmonic is the pitc h of frequency n · f . In general, an y musical note pro duced by a string or wind instrument will consist 1 of a sup erposition of frequencies: a fundamental frequency and some of its p ositiv e in teger m ultiples. • The difference b et ween tw o frequencies f 1 and f 2 , measured in c ents , is giv en by 1200 log 2 ( f 2 /f 1 ), where the factor of 1200 serves to normalize the in terv al b et ween t wo adjacen t piano notes to 100 cen ts. • Giv en a musical pitc h of frequency f , its pitch class is the set of all frequencies of the form 2 n · f for in tegers n . Musically , this represen ts the set of all pitches that differ from the original pitc h by a whole num b er of o cta ves. When multiple notes are play ed at once, their harmonics ma y align, resulting in conso- nance, or they ma y clash, resulting in dissonance. F or this reason, a w ell designed tuning system must include reasonable approximations of the harmonics. The most common tun- ing in W estern music is t welv e-tone equal temp erament (12-TET), whic h consists of tw elve equal sub divisions of the octav e. Since the generator of 12-TET sub divides the octav e, this tuning obtains the second harmonic (the o cta ve) exactly . By comparison, the third har- monic is not obtained exactly in 12-TET, but is still quite closely approximated. Nineteen steps of the generator of 12-TET results in a frequency that is 2 19 / 12 or 2.9966 times the fundamen tal frequency , quite close to the third harmonic’s m ultiple of 3. The cen t-wise difference in pitches is just -1.955, less than an untrained ear can detect. Not every harmonic is well approximated by 12-TET. T able 1 displays the deviation of 12-TET from eac h of the first eleven harmonics, excluding those that are obtained exactly . If instead of 12-TET we consider the tuning generated by the octav e and the third harmonic, the result is termed Pythagorean tuning. By construction, this system obtains sev eral harmonics exactly; how ev er, it has even worse appro ximation of others. Harmonic 12-TET Deviation Pythagorean Deviation 3 -1.955 0.000 5 +13.686 +21.506 7 +31.174 +27.264 9 -3.910 0.000 11 +48.682 +60.412 T able 1: Comparison of 12-TET and Pythagorean Harmonic Approximation. In practice, the w orst deviation determines the quality of the tuning system, since just one discordant note can ruin a chord. The ob jective therefore is to determine a tuning system whose worst deviation from the harmonic sequence is minimized. This observ ation leads to the following definition. Any temperament ac hieves some closest appro ximation of eac h harmonic. The magnitude of the difference b etw een a given harmonic and its closest appro ximation represen ts the deviation of the temp eramen t from that harmonic. 2 DEFINITION 2.1. F or a given finite set of harmonics, the harmonic deviation of a temp er ament is the lar gest of the deviations of the temp er ament fr om e ach of the given harmonics. George Secor w as interesting in finding equal temperame n ts with particularly small harmonic deviation from the first elev en harmonics (the cutoff of elev en is c hosen for historical reasons [3]). He first examined v arious families of temp eramen ts that jointly pro vided go od approximations of the harmonic sequence, even tually settling on the family of temp eraments with 31, 41, and 72 equal subdivisions [5]. Noting that these three tuning systems nearly coincide around 116 cents, he reasoned that a single tw o-dimensional temp eramen t generated by the o cta v e and an interv al near 116 cents might hav e similar harmonic deviation to that of the 31, 41, 72 family . F or practical reasons, he restricted his search to harmonics in relatively nearby o cta ves to the fundamen tal pitch. Given these restrictions, Secor determined that the t wo-dimensional temp eramen t generated by the o cta v e and the in terv al (18 / 5) 1 / 19 (116.716 cents) obtains an appro ximation of the first elev en harmonics with deviation of no more than 3.322 cen ts, a muc h b etter result than is obtained by 12-TET [4]. T able 2 provides a full comparison of the harmonic prop erties of 12-TET and Secor’s Miracle temp eramen t. Ov ertone 12-TET Deviation Miracle Deviation 3 -1.955 -1.658 5 +13.686 -3.322 7 +31.174 -2.257 9 -3.910 -3.322 11 +48.682 -0.591 T able 2: Comparison of 12-TET and Miracle Harmonic Approximation. 3 Mathematical Mo del 3.1 Secor’s Approac h Secor’s deriv ation made use of the following mathematical mo del. Given a tw o-dimensional temp eramen t generated by the o cta ve and some second interv al x , w e wish to determine v alues for x that minimize the harmonic deviation of the tuning. The deviation from each harmonic is represen ted b y a linear function in x . F or example, consider the third harmonic that is 1200 · log 2 (3) = 1901 . 955 cen ts ab o ve the fundamental pitc h; this harmonic can b e reac hed from the fundamen tal frequency b y adding one o cta v e plus six steps of size 116.992 cen ts. F or x near 116.992, the cen t deviation from the third harmonic is accordingly given 3 b y 6( x − 116 . 992). Eac h of the first eleven harmonics imposes such a linear constrain t on x . Ho wev er, the following observ ation establishes that even-v alued harmonics are redundant in the analysis, lea ving only the fiv e odd harmonics b et ween 3 and 11. OBSER V A TION 3.1. If a temp er ament has the o ctave as a gener ator, then its deviations fr om the o dd-value d harmonics c ompletely determine its harmonic deviation. Pr o of. Let f denote the fundamental frequency of the temp erament. Every even-v alued harmonic of f has frequency 2 k (2 n − 1) · f for some p ositiv e integers k and n . Supp ose the temp eramen t obtains deviation of d from the (2 n − 1) th harmonic, realized at some frequency g . Because the temperament has the o cta v e as a generator, it also generates the frequency 2 k g . But this frequency has deviation of d from the harmonic 2 k (2 n − 1) · f , since 1200 log 2  2 k (2 n − 1) · f 2 k g  = 1200 log 2  (2 n − 1) · f g  = d. Since each harmonic imp oses a linear constraint on x , the optimal v alue for x is the solution to the linear program given by these constrain ts. Secor obtained his result b y solving the following linear program by hand (T able 3). T able 3: Secor’s Linear Program. Harmonic Steps Constrain t 3 6 6( x − 116 . 992) 5 -7 − 7( x − 116 . 241) 7 -2 − 2( x − 115 . 587) 9 12 12( x − 116 . 993) 11 15 15( x − 116 . 755) As can b e seen from Figure 1, the generator that minimizes the greatest deviation from the harmonics has v alue around 116.716. Since the solution o ccurs at the in tersection of t wo constrain t lines, w e can solv e for the exact v alue. − 7  x + 1200 7 log 2 (5 / 8)  = 12  x − 1200 12 log 2 (9 / 4)  x = (18 / 5) 1 / 19 ≈ 116 . 716 . (1) Here it should b e noted that the absolute v alue of the deviation is to b e minimized, not the nominal v alue. In the case of Figure 1, it is purely coincidental that the nominal constrain ts were sufficient to visualize the minimax solution. More generally , eac h linear constrain t m ( x − x 0 ) is accompanied by its reflection − m ( x − x 0 ) in the linear program, an example of Chebyshev appro ximation [1]. F or con venience, we introduce the following definition. 4 h3 h5 h7 h9 h11 115.5 116.0 116.5 117.0 117.5 generator - 10 - 5 5 10 deviation Figure 1: Plot of Secor’s Linear Program. DEFINITION 3.2. Given a system of line ar c onstr aints of the form y = m ( x − x 0 ) , the minimax deviation of the system is the smal lest obtainable magnitude of y such that | y | ≥ | m ( x − x 0 ) | for e ach c onstr aint in the system. Secor’s result can b e generalized in tw o wa ys. Firstly , his w ork pertained only to tem- p eramen ts with generators near 116 cen ts. Secondly , his searc h only considered harmonics that were one or tw o octav es remo ved from the fundamental pitc h. T aken together, these t wo observ ations underlie the main result of this pap er. 3.2 Broadening the Searc h Since the Miracle temperament has the o cta ve as a generator, this pro vides an extra degree of freedom when appro ximating the harmonics. A given c hoice of generator x may p oorly appro ximate a harmonic in its natural o cta v e, but nearly coincide with that harmonic in the octav e b elo w. F or example, putting x = 117 cen ts pro vides a p oor appro ximation of the third harmonic at 1901.96 cents: the nearest miss of 25.95 cents is obtained after sixteen steps. How ev er, translating the harmonic down an o cta v e to 701.96 cen ts has a muc h b etter result: six steps of the same x -v alue arrives only 0.05 cents aw a y . This apparent inconsistency results from the fact that x generally does not sub divide the o cta v e evenly , so the deviation from each harmonic v aries dep ending on the o ctav e it is translated to. The consequence of this observ ation is that the search for go od harmonic approximation m ust not b e conducted on the level of pitc h class, but must instead consider eac h harmonic and all its octav e translates individually . 5 F or each harmonic pitch class, the set of all possible linear constrain ts is parametrized b y t wo quantities. The first of these is o ct , the n umber of o ctav es by which the harmonic is to b e translated; the second is sub div , the n um b er of steps of size x to be tak en in attempting to appro ximate the harmonic (with negativ e v alues allo wed for descending steps). In practice, most pairings of these parameters result in very p oor appro ximations. Generally sp eaking, only one or tw o v alues of sub div are viable for a given v alue of oct , so our algorithm determines these candidates and discards the others. This form ulation of the problem generalizes Secor’s work in tw o wa ys: generators distant from 116 cents are considered, and arbitrary octav e translates of harmonics are included in the search. While the search space defined in this wa y is infinite, not ev ery linear constrain t is equally v aluable. Heuristically , the larger the magnitudes of o ct and sub div , the larger a keyboard is required on whic h to ph ysically realize the corresp onding temp eramen t. It follo ws that the problem should b e solv ed in terms of the desired keyboard dimensions. In the following section, w e identify the optimal tuning for all reasonable dimensions of k eyb oard, which we tak e to b e b ounded generously b y 15 × 100. 1 4 Metho ds and Computation Giv en a k eyb oard of certain dimensions, the searc h space for our pro ject is the set of temp eramen ts that are r e alizable on this k eyb oard. In order for a temp eramen t to be realizable, its b est approximations of the o vertones m ust actually be a v ailable on the key- b oard. Heuristically , a temp eramen t whose second generator x is small will require a wider k eyb oard (i.e. more steps) in order to reach all the harmonics. Similarly , a temp eramen t that approximates harmonics in o cta ves distan t from the fundamental frequency will re- quire a taller keyboard (i.e. more rows). W e make these intuitions precise in the following finiteness lemma, which is essential to constructing the search space for the problem. LEMMA 4.1. F or e ach choic e of dimensions m × n , ther e ar e only finitely many temp er- aments r e alizable on a keyb o ar d of those dimensions. Pr o of. Since every candidate temp eramen t is obtained as a set of linear constraints, and eac h constraint is dra wn from a family that is parametrized by o ct and sub div , it suffices to show that o ct and sub div are b ounded in magnitude. F or each harmonic, the parameter sub div is b ounded in terms of n , the width of the keyboard. F or example, putting sub div = 10 and x = 190 cen ts pro vides a go od appro ximation of the third harmonic (1901.955 cen ts), and realizing this note requires elev en k eys (the fundamen tal note plus ten steps). In general, we hav e − n + 1 ≤ sub div ≤ n − 1. The parameter o ct is b ounded in terms of m , the height of the keyboard, but the precise b ound dep ends on which harmonic is used. F or example, the third harmonic naturally lies in the second o ctav e (since log 2 (3) = 1 . 585), so when oct = − 1, only one ro w is required. F or harmonic L , the num b er of o cta v es needed 1 A large pip e organ has keyboard dimensions of 4 × 61. 6 to translate to the first row is given b y −b log 2 ( L ) c . Consequen tly , the b ound on o ct is obtained as − m + 1 ≤ o ct + b log 2 ( L ) c ≤ m − 1. Eac h element of the searc h space is a set of fiv e linear constrain ts, one for eac h of the fiv e o dd harmonics b etw een 3 and 11. Each of these constraints is dra wn from a family that is parametrized by o ct and sub div . Given a k eyb oard of dimensions m × n , the b ounds imp osed on oct and sub div result in (2 n − 1)(2 m − 1) constrain ts in each of the fiv e families. Consequen tly , an initial b ound on the complexit y of the problem is [(2 n − 1)(2 m − 1)] 5 . Secor’s Miracle temperament is realized on a keyboard of dimensions 3 × 22, requiring 459 × 10 9 executions of the linear programming function. At current p ersonal computing sp eeds, anything more than 10 6 executions may result in unreasonably long run time. It is clear that substantial pruning of the searc h space is necessary in order to make progress. Most pairings of o ct and sub div result in p oor appro ximations of the harmonics. F or example, consider tw elv e sub divisions of the third harmonic (158.496 cen ts) paired with t wen t y sub divisions of the fifth harmonic (139.316 cents). The corresp onding linear con- strain ts are: y = 12( x − 158 . 496) y = 20( x − 139 . 316) . The minimax solution to this system is obtained at x = 146 . 508 cents, with an atro cious deviation of 143.854 cents from the harmonics. Ev en if subdiv had tak en its minim um mag- nitude of 1, the optimal deviation would still hav e b een half the difference in x -intercepts, or 9.590 cents. W e wish to mak e precise the intuition that constrain ts whose x -in tercepts are relatively distant cannot lead to comp etitive solutions. The follo wing lemma sets the stage by establishing a lo wer b ound on sub div with respect to the x -intercept. LEMMA 4.2. If y = m ( x − x 0 ) r epr esents an arbitr ary line ar c onstr aint in the se ar ch sp ac e, then it must hold that | m | ≥ d 1200 x 0 log 2 (9 / 8) e . Pr o of. The given linear constraint arises from subdividing one of the five harmonics in to m steps of size x 0 . Harmonics that are more distan t from the fundamental frequency require a greater n umber of steps to reac h. Therefore, a lo wer b ound on the magnitude of m is obtained when the harmonics are translated to b e as close to the fundamental frequency as p ossible (T able 4). In the most compact configuration of harmonics, the ninth harmonic is closest to the fundamen tal frequency with a deviation of 1200 log 2 (9 / 8) or 203 . 910 cents. Given a step size of x 0 , it takes at least d 1200 x 0 log 2 (9 / 8) e steps to reac h this harmonic. In order to classify generators as nearby or distan t, w e introduce the following parti- tion of the o ctav e. F or each p ositiv e integer j , let the j -th subinterv al of the o cta v e b e h 1200 j +1 , 1200 j  . W e would like to discard elements of the search space whose generators span 7 Harmonic o ct Distance (cen ts) 3 -2 -498.045 5 -2 386.314 7 -3 -231.174 9 -3 203.910 11 -3 551.318 T able 4: Pitch Class Distance from F undamen tal F requency . to o man y of these subinterv als; consequently , the following lemma sets forth a low er b ound on deviation from the harmonics in terms of j . LEMMA 4.3. Supp ose a system of line ar c onstr aints has x -inter c epts in h 1200 j +1 , 1200 j  and h 1200 j + k +1 , 1200 j + k  for p ositive inte gers j and k . Supp ose further that the slop es of these c onstr aints ar e m 1 and m 2 , r esp e ctively. The minimax deviation of the system is no less than 1200     m 1 m 2 m 1 − m 2     · k − 1 ( j + 1)( j + k ) . Pr o of. Let the x -in tercepts of the constraints b e denoted x 1 and x 2 , resp ectiv ely . If m 1 and m 2 ha ve opposite signs, the minimax solution of the system is obtained when m 1 ( x − x 1 ) = m 2 ( x − x 2 ). If the slop es hav e the same sign, the minimax deviation is instead obtained when m 1 ( x − x 1 ) = − m 2 ( x − x 2 ). Without loss of generalit y , supp ose m 1 > 0 and m 2 < 0. The minimax solution is giv en b y x = m 1 x 1 − m 2 x 2 m 1 − m 2 , whic h giv es rise to a minimax deviation of m 1 m 2 m 1 − m 2 ( x 1 − x 2 ) . Since x 1 ≥ 1200 j +1 and x 2 < 1200 j + k , conclude that x 1 − x 2 > 1200  1 j +1 − 1 j + k  . Algebraic simplification leads to the result. OBSER V A TION 4.4. The lower b ound in L emma 4.3 incr e ases monotonic al ly with k . Pr o of. The partial deriv ativ e of the low er b ound with resp ect to k is 1200     m 1 m 2 m 1 − m 2     · ( j + 1)( j − 1) ( j + 1) 2 ( j + k ) 2 whic h is nonnegativ e for all p ositiv e integers j . 8 The width of the k eyb oard imp oses a lo wer b ound on x -intercept, b ecause a smaller x -in tercept requires a greater n umber of steps to complete a single o ctav e. Since the scop e of this pro ject is limited to k eyb oards no greater than 100 k eys wide, we need only consider the first 100 subin terv als of the octav e. The follo wing fact, determined n umerically , resolv es the matter of determining whether t wo x -intercepts are sufficiently distant to b e discounted. F A CT 4.5. L et j b e a p ositive inte ger no gr e ater than 100. Supp ose a system of line ar c on- str aints in the se ar ch sp ac e has x -inter c epts in h 1200 j +1 , 1200 j  and h 1200 j +5 , 1200 j +4  . The minimax deviation of the system is no less than 4.268. COR OLLAR Y 4.6. If a system of line ar c onstr aints in the se ar ch sp ac e has x -inter c epts at le ast four subintervals ap art, that system has gr e ater harmonic deviation than Se c or’s Mir acle temp er ament. Pr o of. If the system has x -intercepts at least four subinterv als apart, Observ ation 4.4 and F act 4.5 imply that the minimax deviation of the system is at least 4.268. The corollary follo ws since Secor’s Miracle temp erament has harmonic deviation of 3.322. While Corollary 4.6 assists in reducing the size of the searc h space, an additional tech- nique is also a v ailable to improv e the run time of the algorithm. Each element of the search space is a system of fiv e linear constraints, from which is computed a minimax v alue for the generator x and the resulting deviation from the ov ertones. Ev en after pruning the searc h space based on the previous corollary , a t ypical element still has deviation greater than Secor’s v alue of 3.322 cen ts. F or this reason, great savings in run time could result b y using a searc h algorithm that av oids most of the uncomp etitiv e elemen ts of the space. The following observ ations sets forth the requirements for such an algorithm to b e applied. OBSER V A TION 4.7. Supp ose D r epr esents the minimax deviation of a system of n line ar c onstr aints. Imp osing an additional c onstr aint c annot r esult in a minimax deviation of less than D . Pr o of. Supp ose the system of n constrain ts achiev es its minimax v alue at x = a . One of t wo cases results from imp osing an additional constraint. A t x = a , the new constraint either has magnitude less than or equal to D , or it has magnitude greater than D . In the first case, the minimax deviation of the augmented system is still D . In the second case, the minimax deviation of the augmented system is greater than D (although the precise v alue dep ends on the sp ecific constrain ts). Consequen tly , the search space admits partial candidate solutions: systems of tw o, three, or four linear constraints. Arranging the fiv e constraint families in to rows of a matrix, we visualize the search algorithm as “percolating” do wn from the first ro w, as follo ws: 1. Start with any constraint in the first family . 9 2. Add an y constraint from the second family . 3. Add an y constraint from the third family . 4. Add an y constraint from the fourth family . 5. Add an y constraint from the fifth (last) family . A t every step of the pro cess, compute the minimax deviation of the curren t system of con- strain ts. If the deviation of the partial candidate solution is greater than the low est known deviation, the most recently added constrain t should b e replaced by another constrain t in the same family . If every constrain t in the family has b een tried, the algorithm retraces one step to the previous constrain t family and contin ues executing from that point. Be- cause of the existence of partial candidate solutions and Observ ation 4.7, this backtrac king searc h algorithm is guaranteed to find the elemen t of the search space with lo w est minimax deviation [2]. 5 Results and Conclusions 5.1 Quan tifying Secor’s “Miracle” The work of the previous section allo wed us to discard most elemen ts of the search space. T o obtain additional time savings, a bac ktracking algorithm formed partial candidate so- lutions, abandoning branc hes as so on as the deviation of the partial solution exceeded the curren t lo west deviation for k eyb oards of the same dimensions. F or eac h c hoice of keyboard dimensions up to 15 × 100, the algorithm determined the temp erament with minimal har- monic deviation. In this section, we displa y the results of the algorithm using a heatmap visualization. F or clarit y in explaining the features of the visualization, we initially limit k eyb oard width to b et w een 12 and 50 keys (Figure 2). Figure 2 consists of rectangular and Γ-shap ed regions of v arying shade. Each region in the figure represents a differen t temp eramen t. The lighter the shading of the region, the lo wer the harmonic deviation of its temp erament. The minimum harmonic deviation of a keyboard cannot worsen if the dimensions of the keyboard are increased; consequently , rectangles and Γ-shap es are the only p ossible types of regions in the figure. Moreo v er, the upp er-left corner of each region indicates the smallest keyboard dimensions on which that region’s temp eramen t can b e realized. This distinction is piv otal in the following section’s analysis. Secor’s original pro ject determined that for a k eyb oard of dimensions 3 × 22, the optimal temp eramen t is generated b y the octav e and the in terv al (18 / 5) 1 / 19 , appro ximately 116.716 cen ts (Equation 1). This result is indicated by a star ( ? ) in Figure 2. W e examined k eyb oards with dimensions as small as 2 × 12 in order to determine whether comparable results to Secor’s were achiev able on smaller instrumen ts as well. Our analysis determined 10 Figure 2: Harmonic Deviation b y Keyboard Dimension (Sample Results) that Secor’s temperament cannot be realized on a keyboard smaller than 3 × 22; this fact is illustrated b y the lo cation of the Miracle temp eramen t in the upp er-left corner of its region in Figure 2. Moreov er, w e found that keyboards with smaller width than Secor’s had substantially worse harmonic deviation. In this sense, Secor’s keyboard width of 22 k eys appears to b e an imp ortan t threshold for harmonic deviation. 5.2 The F amily of Miracle T emp eraments Figure 3 displays the results of our analysis for keyboard widths of 22 to 100 k eys, with notable temp eramen ts indicated b y star ( ? ) and their harmonic deviations display ed. Figure 3: Harmonic Deviation b y Keyboard Dimension (F ull Results) The results in Figure 3 give rise to the following observ ation. Secor’s temp eramen t is quite w orthy of its “miracle” designation, considering that the smallest keyboards that realize an impro ved harmonic deviation ha ve m uch larger dimensions of 2 × 36, 5 × 35, and 7 × 30. Since the dimensions of the keyboard affect the m usician’s ability to manage 11 the instrument, Secor’s temp eramen t remains a very go o d candidate despite the marked reductions in harmonic deviation that hav e b een discov ered for larger instrumen ts. By extension, we prop ose that the term “miracle temp eramen t” b e applied more broadly to an y temperament with the following t wo prop erties: 1. The temp eramen t has low er harmonic deviation than any temp eramen t realized on a strictly smaller k eyb oard. 2. A keyboard of substan tially greater dimensions is required for an y improv ed temp er- amen t to b e realized. Based on Figure 2, Secor’s temp eramen t is arguably the first miracle temp eramen t, since no k eyb oard of smaller width satisfies property 2. In this sense, Secor’s solution constitutes the first of a family of doubly distinguished temp eraments: not only do they represent optimal tuning systems on sp ecific keyboards, they also set the standard for an entire size- class of instruments. T able 5 displays the prop osed family of miracle temp eramen ts, which are indicated by star ( ? ) in Figure 3. W e hop e that these results ma y be of use to the m usic comp osition comm unit y in determining instrumen t dimensions for obtaining optimal consonance. T able 5: Prop osed F amily of Miracle T emp eraments. Dimensions Deviation (cents) Generator (cents) Numerical Appro x. 3 × 22 3.322 (18 / 5) 1 / 19 116.716 7 × 40 1.586 3168 1 / 72 193.823 10 × 61 1.116 880 1 / 64 183.400 2 × 75 1.070 (14 / 5) 1 / 68 26.213 7 × 84 0.984 (8192 / 15) 1 / 131 83.296 4 × 98 0.384 (10 / 7) 1 / 16 38.593 5.3 Univ ersal Miracle T emp eramen ts Figure 3 suggests that harmonic deviation is more sensitive to k eyb oard width than heigh t. While increasing k eyb oard width from 22 to 100 keys resulted in an 88% reduction in harmonic deviation, increasing the num ber of o ctav e rows from 3 to 15 sa w no improv emen t in the temp eramen t. Unfortunately , the complexity of our algorithm dep ends more on the n umber of o ctav e rows than the n um b er of k eys, so w e are unable to n umerically inv estigate this phenomenon b ey ond the existing limit of 15 o cta v e ro ws. Despite this, w e obtain the follo wing result. 12 THEOREM 5.1. F or e ach n , every keyb o ar d with width of n keys and sufficiently many o ctave r ows has the same mir acle temp er ament. W e will sho w that for a keyboard of fixed width and arbitrary height, the harmonic deviation of each temp erament on that k eyb oard is a contin uous function of the temp era- men t’s generator, and that this function’s domain is a closed and b ounded interv al. This implies that finitely many o cta v e rows suffice to obtain the minim um harmonic deviation. The construction of the argument b egins with the follo wing lemma, which establishes that the generator of the temp eramen t lies in closed and b ounded interv al. LEMMA 5.2. F or a keyb o ar d of width n , the value of the gener ating interval is at le ast 1049 . 363 / ( n − 1) c ents, and no mor e than 1200 c ents. Pr o of. The low er b ound holds b y Lemma 4.2, which establishes that the k eyb oard must at least span the interv al [ − 498 . 045 , 551 . 318] in order for the 3rd and 11th harmonics to b e reached. The length of this interv al is 1049.363 cents, and n k eys sub divide the interv al in to n − 1 segments. The upp er b ound holds b ecause the generating interv al cannot b e greater than an octav e. OBSER V A TION 5.3. Given a temp er ament gener ate d by the o ctave and x (in c ents), the deviation fr om the N -th harmonic at the k -th step and m -th o ctave r ow of the temp er ament is given by 1200(log 2 N − m ) − k x. Pr o of. Let f denote the pitch of the fundamental frequency . The pitc h of the N -th har- monic is f · N , and the pitch at the k -th step and m -th o cta ve row of the temp eramen t is f · 2 kx/ 1200+ m . The difference betw een these pitc hes is 1200 log 2  f · N f · 2 kx/ 1200+ m  = 1200(log 2 N − m ) − k x. It is conv enient to in tro duce a change of v ariables. In Observ ation 5.3, define r as the normalize d gener ator with v alue r = x/ 1200, so that the deviation formula b ecomes 1200(log 2 N − m − k r ). Giv en arbitrary o ctav e rows (hence arbitrary integer v alues for m ), the v alue of r that minimizes the deviation is that which minimizes || log 2 N − k r || , the distance b et ween log 2 N − k r and the nearest integer. Note that unlike the flo or and ceiling functions, this function is con tinuous on the reals. LEMMA 5.4. F or a keyb o ar d of width n and normalize d gener ator r , the harmonic devi- ation is given by max N ∈{ 3 , 5 , 7 , 9 , 11 }  min | k |≤ n || log 2 N − k r ||  . Pr o of. The harmonic deviation of a keyboard is giv en in Definition 2.1 as the greatest magnitude of deviation from eac h of the harmonics. 13 COR OLLAR Y 5.5. F or a keyb o ar d of width n , ther e is a wel l define d normalize d gener- ator that minimizes the harmonic deviation, and its value is min r ∈ [ 0 . 874 n − 1 , 1 ]  max N ∈{ 3 , 5 , 7 , 9 , 11 }  min | k |≤ n || log 2 N − k r ||  . Pr o of. Lemma 5.2 provides bounds on the generator x , whic h are translated into b ounds for the normalized generator by division by 1200. The v alue of the normalized generator is w ell defined b ecause the deviation function of Lemma 5.4 is contin uous, so it attains its minim um v alue on a closed and b ounded interv al. Pr o of of The or em 5.1. Corollary 5.5 shows that for a keyboard of width n , there is a well defined normalized generator that minimizes the harmonic deviation. Because this result w as obtained with no restriction on the n umber of o ctav e rows, it follows that the minimum harmonic deviation for an y keyboard of width n is obtained with some finite n umber of o cta v e ro ws. Due to the non-constructive nature of Theorem 5.1, it is not curren tly known whether an y of the miracle temp eraments in T able 5 can b e improv ed by additional o cta ve ro ws. In order to reduce the computational complexity of the problem, w e b eliev e that the b ounds in tro duced in Section 4 could b e substan tially tigh tened. Lemma 4.2 in particular giv es a v ery generous bound on the magnitude of subint , compared to typical v alues. Lemma 4.3 and Corollary 4.6 derive their strength only from pairwise comparisons of linear constrain ts despite the fact that three other constrain ts are also present. Finally , some direct analysis of the deviation function of Lemma 5.4 migh t result in success, although this is not curren tly expressed in terms of a linear program. References [1] Stephen Bo yd and Lieven V andenberghe, Convex Optimization , Cam bridge Uni- v ersity Press, 2004. [2] Donald Kn uth, The Art of Computer Pr o gr amming , Addison-W esley , 1968. [3] Harry P artch, Genesis of a Music , Universit y of Wisconsin Press, 1949. [4] George Secor, A New L o ok at The Partch Monophonic F abric , Xenharmonicon 3, 1975. [5] George Secor, The Mir acle T emp er ament And De cimal Keyb o ar d , Xenharmonicon 18, 2006. 14

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment