The Secret behind the Squiggles: Guitars with Optimally Curved Frets
Year: 2019 Authors: Mitchell Chavarria; Jordan Schettler
Core claim
A D12-based mathematical framework makes Bach’s tuning method optimal and yields a curved-fret guitar temperament optimized for 16 common chords.
Topics
temperament, curved frets, dihedral group action, guitar chords, Bach tuning
Domains
group theory, Fourier series, wave equation, octave equivalence, optimization, instrument design, music technology, woodworking
Methods
mathematical framework, group action analysis, weighted optimization, Mathematica code, experimental listening
Media
guitar frets, cubic splines, audio files, woodworking machine
Paper text
The text below is the locally extracted OCR/Markdown version of the paper. Raw PDF files remain local and are not published here.
Bridges 2019 Conference Proceedings
The Secret behind the Squiggles: Guitars with Optimally Curved Frets
Mitchell Chavarria and Jordan Schettler
Department of Mathematics and Statistics, San José State University
mitchell.chavarria@sjsu.edu; jordan.schettler@sjsu.edu
Abstract
Anders Thidell and True Temperament have designed guitars with curved frets rather than the usual parallel line segments. Some of the designs were based on a method that J.S. Bach allegedly used to tune his harpsichord. Bach’s method highlights the keys featured in the famous Prelude in C Major found in the Well-Tempered Clavier, Book I. However, attempts to put this in a mathematical framework have led to strange musical results which do not agree with Bach. We offer a new mathematical framework using the natural action of the dihedral group on a regular dodecagon. The framework allows us to view Bach’s method as optimal. We then use the framework to create our own curved fret guitar which is optimal for 16 common guitar chords. Our mathematically optimal guitar design resembles one already produced by Thidell.
If Bach Had Played Guitar…
Unlike violins, guitars have metal strips called frets embedded into the neck of the instrument. When a player firmly presses a string down with their finger behind a fret, the vibrating length is changed to produce a desired note when strummed. Schettler’s friend Glenn Zisholtz—the owner and founder of Sweetwood Guitar Company—was interested in making guitars with so-called ‘squiggly line’ frets. He was inspired by True Temperament’s Die Wohltemperierte Gitarre (The Well-Tempered Guitar) as seen in Figure 1. Anders Thidell and others have designed such guitars where the frets are not the usual parallel segments. The initial design was inspired by an article [7] written by harpsichordist and musicologist Dr. Bradley Lehman. In the article, Lehman considers J.S. Bach’s Well-Tempered Clavier, Book I (WTC I), a book of sheet music for the harpsichord containing pieces written in every key: C major, C minor, major, minor, D major, etc. Lehman conjectured that the sketch in Figure 2 found at the beginning of WTC I is actually a recipe used by Bach for tuning his instrument so that every key sounds acceptable. In fact, Lehman did extensive experimentation on his own harpsichord along with a mathematical analysis to test his conjecture. In particular, the famous Prelude in C-Major in WTC I highlights the keys traditionally associated with consonant major and minor scales (C, F, G major and A, D, E minor), and this proposed recipe has the same preferred keys while other keys have qualities which Lehman described as “sharp and spicy”.
Mr. Zisholtz asked Schettler to help him find the locations of all fret positions for any such design suitable for guitars. Since there are six strings on a guitar (lo E, A, D, G, B, hi E) and around 22 frets each,
Figure 1: Die Wohltemperierte Gitarre by True Temperament
Chavarria and Schettler
Figure 2: Sketch in WTC I, Allegedly Defining an Irregular Temperament
this means calculating roughly positions. Schettler wrote some code used by an enormous woodworking machine to cut slots for frets.
The goal of this paper is to describe our new mathematical framework for understanding in what sense these squiggly line fret designs for guitar are optimal. This is not a straightforward process, and previous attempts have led to strange results. First, we describe the classical “tuning problem” and define what a temperament is mathematically. Next, we show how group actions can be incorporated to produce optimal temperaments for any piece of music. We use the Prelude in C-Major as a testing ground. We further derive our own squiggly line fret design which is optimal for 16 of the most common guitar chords. Audio files referenced in the article are available at https://sites.google.com/a/sjsu.edu/schettler/bridges
The Tuning Problem and Temperaments
Chords and progressions in music are based on ratios between pairs of frequencies coming from simple fractions of whole numbers, which recent Bridges papers [2], [4] have addressed as well. These ratios arise naturally from the vibrations of a string. Guitar strings are very flexible, so their vibrations are closely approximated by solutions to the one dimensional wave equation with fixed endpoints:
Here the fundamental frequency is perceived as the pitch of the sound produced where is the vibrating length of the string and depends only on the density and tension (which are fixed for a given string). The th term in this Fourier series represents a mode of vibration with frequency called the th harmonic. See Figure 3. We can excite these modes of vibration on a guitar by lightly touching the string to
Figure 3: Modes of Vibration for First 3 Harmonics
create a nodal point th of the way down the string.
The second harmonic gives a ratio of called an octave. The ratio sounds so consonant that we identify these frequencies as producing the same note. For example, if (the frequency of the G string on a guitar), then (an octave above) and (an octave below) are also G notes. In general, frequencies , are called octave equivalent when for some integer . This gives an equivalence relation on the ray of frequencies . There is a map from to the unit circle in the complex plane given by ; since is -periodic, two frequencies are octave equivalent iff they are mapped to the same point on the circle. This mapping can be viewed as a helix where all octaves of a frequency lie on a vertical line as in Figure 4.
The third harmonic produces a “new” note, i.e., not octave equivalent to . This is the same note represented by (an octave below ). The corresponding ratio is called a perfect fifth and also
The Secret behind the Squiggles: Guitars with Optimally Curved Frets
Figure 4: Helix of frequencies (left) flattened into the circle (right)
sounds consonant. Starting again with our G note of , the perfect fifth above is , a D note. The fourth harmonic does not give anything new since it is octave equivalent to , but the fifth harmonic gives us a new note octave equivalent to . The ratio is known as a major third and is also consonant. The triple of frequencies f < (5/4)f < (3/2)f gives us the major triad, a chord associated with happiness. Many chords in Western music are derived from these triads. The first three notes in Kumbaya form a major triad.
Taking combinations of these basic ratios 2, , gives further consonant ratios. For example, taking a perfect fifth below gives the ratio called a perfect fourth which represents the inversion of a perfect fifth: on the distance between and is the same as the distance between and since . A major third below gives the ratio called a minor third. The minor triad f < (6/5)f < (3/2)f forms the basis of minor chords, which are associated with sadness.
Trying to tune with pure ratios quickly leads to trouble, however. Consider the following harmonic progression of notes coming from an example of Benedetti (Exercise 2, Section 5.8 in [1]): G, D, A, E, C, G. Here we should end up with a G one octave higher than the G we started with, but the ratios multiply to give
This difficulty in using pure ratios is sometimes referred to as “the tuning problem”.
We run into a similar issue when take 12 perfect fifths consecutively. We run through all 12 notes in the scale: F, C, G, D, A, E, B, , , , , , F. However, the last F is not octave equivalent to the F we started with since
This ratio is known as the Pythagorean comma². Thus if we want to tune an instrument where all octaves are pure, it suffices to specify how we tune all the perfect fifths: F to C, C to G, G to D, …, A² to F. We cannot make all 12 fifths pure and must remove one comma overall.
Suppose there is a harpsichord which we wish to tune. We use an integer index to label the frequencies of the keys on the harpsichord where is the frequency of the note which is one semitone higher than that of . Here will denote a frequency for middle C on our harpsichord. Since we assume octaves are pure, for all . The ratios should give an approximation to the perfect fifth ratio for all since (a perfect fifth is roughly of an octave). We measure these approximations in cents: the number of cents between frequencies , is . For example, a pure fifth has cents and a pure major third has cents. To determine all the frequencies , we only need to specify , , …, , and we call such a specification a temperament. With the convention (concert pitch), a temperament can be determined by a
Chavarria and Schettler
circle of fifths showing how 11 consecutive fifths are tempered (the last fifth will be determined by octave equivalence). We call the temperament regular if the 11 ratios are all the same and irregular otherwise. If we take the 11 ratios all to be (pure perfect fifths), then the remaining fifth will be one comma (around 23.46 cents) less than pure. This is called a Pythagorean temperament. See Figure 5. In equal temperament—by
Figure 5: Temperaments specified by circles of fifths
far the most commonly used temperament today—the comma is evenly distributed, so all fifths are of a comma ( cents) flat. All semitones are 100 cents in equal temperament, so all fifths are 700 cents. Both Pythagorean and equal temperament have nice sounding fifths and fourths, but the approximations to other consonant ratios like (major third) and (minor third) do not sound as nice. Listen to Audio File 1 to hear how ratios sound on a guitar in equal temperament. In particular, major thirds in equal temperament have 400 cents each which is around 14 cents off from pure, a very audible deviation.
The heart of the tuning problem is getting good approximations to the major and minor thirds without sacrificing too greatly the quality of fifths. In general, going up 4 fifths and down 2 octaves gives you a major third and going down 3 fifths and up 2 octaves gives you a minor third:
This shows us how the fifths determine the thirds. A meantone temperament is a regular temperament which tempers 11 fifths so that most major thirds are pure. To make the third pure, we need our fifth to satisfy , so we get , which is around 0.23 of a comma ( cents) off from pure. These fifths sound fine, but the remaining fifth sounds horrendous and is known as the wolf fifth, a howling and dissonant creature as heard in Audio File 2. The wolf fifth is a whopping 35.6 cents off from pure. Music written in meantone must avoid this interval. On the other hand, music which modulates through many keys, like works of Bach, will expose the wolf and make meantone a poor choice. An “accetable” fifth is typically within 1/4 of a comma ( cents) of a pure fifth, so specifying a temperament without these garbage areas like the wolf fifth is equivalent to giving 12 real numbers such that and .
Lehman [7] conjectured that Bach used an irregular temperament for WTC I, II which starts at F with 5 fifths which are of a comma flat, followed by three pure fifths, and then three fifths which are of a comma flat. We call this the Bach-Lehman temperament. See again Figure 5. Many believe Bach used an irregular temperament of this form and prior to Lehman’s conjecture, there was already a well-known temperament of Vallotti with some of the same features (see Benson [1], Section 5.13). This tuning is quite remarkable because some major and minor keys are closer to pure than in equal temperament while others stay roughly the same and yet others have an interesting tonal color capturing an Affekt or musical mood.
How is an irregular temperament optimal in a mathematical sense? In [5] and [6], Donald Hall attempted to derive a method for answering this kind of question by finding irregular temperaments which minimize
errors to ratios which appear frequently. To write down an error function for a given piece of music, we first need some notation:
- for
- = number of times that the interval occurs up to octave equivalence ()
- = number of cents of the pure ratio approximated by
- = weight for intervals of semitones
Some remarks are in order. Here and a tuple specifies a temperament via . Here we will always take and count intervals with via their inversions. For example, would be the number of C to G fifths found in the piece and a fifth from A to E such as would be counted in via its inversion , representing the fourth from E to A. Subsequently, we take the weights to be symmetric with respect to inversion: for . We set since intervals of 1, 2, 6, 10, 11 semitones are either dissonant or have ambiguous ratios. For instance, 10 semitones represents a minor seventh such as C to A^{g}, but this ratio could be tuned as 16/9 or 9/5 depending on the musical context. Thus there are only 3 nonzero weights , , and , which correspond to , , and or transpositions and inversions of these.
Hall defined an error function which we will recast as
Tuples which give small errors could be regarded as optimal for the piece.
Now is minimized when for all . This gives a system of 11 linear equations in 11 unknowns which is easily solved by Mathematica. Other, more recent papers, discuss similar approaches to generate optimal irregular temperaments. For example, Polanksy et. al. [8] use various combinations of weights for ratios to compare optimal outputs to historical temperaments. However, these mathematically pleasing techniques can lead to strange musical results…
Hall’s linear system for Bach’s Prelude in C-Major output an irregular temperament
which, if we ignore and corresponding to C^{g} and G^{g} (rarely played in the piece), is very close to the corresponding tuple for meantone based at C
However, there is a disconnect here since Bach did not intend meantone temperament for WTC I, II. In particular, when Bach’s Prelude in C-Major is played using meantone based at C, much of it sounds lovely, but in the 12th, 14th, 22nd, 23rd, and 28th measures, the temperament sounds out of tune. These are the measures where the wolf fifth is somewhat exposed. Listen to a segment of the Prelude both in meantone and in a Bach-Lehman style temperament: Audio Files 3 and 4.
How could our dear friend Mathematics betray us like this? Hall wrote that “the ear cannot judge whether a third is in tune, or, not nearly so easily as it can a fifth. Thus it might seem that the fifths should have their weight arbitrarily increased relative to the third - but by how much?” For this reason, Hall initially took , which gave too much prominence to thirds. Hall later made adjustments to his weighting of ratios, but still concluded that meantone remained largely favorable.
With this in mind, we wanted a method which could (1) recount intervals (i.e., adjust ’s) to account for ambiguous intervals like the minor seventh and (2) give reasonable values for the weights , , so that something resembling the Bach-Lehman temperament is optimal for the Prelude in C-Major.
How to Tune with Polygons
To account for ambiguous intervals, we will regard each measure in a piece of music as polygon. The shape of the polygon tells us how to tune the corresponding intervals in the measure. Congruent polygons are tuned the same, so we consider the associated actions of the symmetry groups (rotations and reflections).
Given a measure, each note is represented by the integer which is the index of the corresponding frequency . Each measure itself we regard as a multiset, meaning that repetitions are allowed but order is not important. As an example, here is the first few measures of Bach’s Prelude in C Major (with duplicate measures removed): , , ,
To see the shape (chord structure) of a measure, we reduce each integer modulo 12 per our octave equivalence relation. If we view as the vertices of a regular dodecagon, then musical inversions and transpositions correspond to reflections and rotations, respectively. After this reduction, the shape of a measure is then seen as a polygon within . For example, the C major triad (red) and D minor triad (blue) are seen in Figure 6a. Although these triads represent different chords, the triangles are congruent, so their intervals will be tuned the same.
The natural action of the dihedral group of order 24 on the dodecagon gives us a way of classifying chord structures. The orbit of a polygon in under the action consists of all such congruent polygons. Each orbit has a unique preferred representative called a prime form. Namely, the prime form is the one that appears first when ordered lexicographically with respect to first, last, second, third, , next to last. To find a prime form for a polygon, we first rotate and reflect each vertex of the polygon to 0. We then list the elements of the resulting sets in increasing order and look for sets where the last element is as small as possible. Among these, we look for sets with the second element as small as possible, and so on. The C major triad reflects to the prime form , and the D minor triad rotates to .
The prime forms (library of chords) which appear in Bach’s Prelude in C Major are
[ \begin{array}[]{cccc}{0,3,7}&{0,1,5,8}&{0,2,5,7}&{0,2,5,8}\ \text{major/minor triad}&\text{major seventh}&\text{quartal chord}&\text{dominant seventh}\ \hline\cr{0,3,5,8}&{0,3,6,9}&{0,1,3,6,9}&{0,1,3,5,6,8}\ \text{minor seventh}&\text{diminished seventh}&\text{dominant minor ninth}&\text{major eleventh}\ \end{array} ]
For comparison, the only prime forms which occur in 16 of the most common guitar chords are , , and .
We can use prime forms to account for ambiguous intervals. As an example of how this is done, consider the dominant seventh chord consisting of a major triad plus a minor seventh (tuned with a 16/9) above the root. All dominant seventh chords have prime form . These chords are extremely common in music composed for guitar and help to both build tension and signify that a chord change is inevitable. An explicit example is C7, the dominant seventh in C, with polygon . There are two types of ambiguities in C7 to deal with. First, the 3 semitone intervals from 5 to 8 and from 8 to 11 would both be counted as minor thirds via and and tuned with a 6/5 ratio. However, the interval from 8 to 11 should not be tuned this way. Rather the interval from 8 to 11 is a Pythagorean minor third corresponding to a ratio of 32/27 rather than 6/5. To deal with this issue, we only count minor thirds which occur within a major or minor triad. Second, the minor seventh spans semitones, but we have taken , so this information is unaccounted for in the error function since the vertex corresponding to minor seventh is not connected to any other note by an interval of weight , , or . To remedy this, we add an extra note that is a perfect fourth above the root as in Figure 6b. Then C7 becomes , and the minor seventh will now be counted via the perfect fourth from 6 to 11. Moreover, this added note gives the right ratio for the minor seventh here since .
The Secret behind the Squiggles: Guitars with Optimally Curved Frets
(a) Dodecagon & Major/Minor Triads
(b) Dominant seventh chord
Figure 6
The diminished seventh—used to express certain powerful emotions such as passion or anger—also contains both kinds of minor thirds, but, in this case, the prime form alone does not help us distinguish which is which because the chord is a square inside our dodecagon. We can, however, use our multiset to determine the root as the minimum integer in the multiset. Here we add two notes (1 semitone above and 4 semitones below the root). This turns a diminished seventh chord into a Bridge chord, which disambiguates how the intervals are tuned. This is important for us since the orbit of a diminished seventh chord contains exactly 3 elements, all of which appear in the Prelude in C-Major.
We can scale the weights by a common factor without affecting where the error function is minimized, so we can set . Since the fourth/fifth is the most important ratio following the octave, the other weights should be between 0 and 1.
To find reasonable values for , we considered the Euclidean distance from our optimal Prelude in C Major temperament to the Bach-Lehman temperament as seen in Figure 7. The distance is minimized
Figure 7: Distance Surface: Optimal Prelude to Bach-Lehman Temperament
around and . Notice that—as expected—we cannot ignore thirds because of the spike in distance around . However, by turning down the impact of thirds, we can end up with something resembling a temperament that Bach actually used. The distance to meant one is minimized when the weights are taken closer to 1, which is both intuitive and matches with Hall’s results. One can justify setting by observing that a just minor third occurs only in major/minor triads where the 6/5 ratio would be implied via .
Chavarria and Schettler
Summary and Conclusions
We developed a method for obtaining optimal temperatures for any piece of music. The key features which make the method successful are (1) the use of prime forms to determine musical context, (2) the use of smaller weights for thirds versus fifths, and (3) adding extra notes to measures. Furthermore, these weights can be used to get other optimal temperatures which give appropriate priority to fifths and thirds.
We input a list of 16 common guitar chords into our Mathematica code: (C, A, G, E, D, F, Am, Em, Dm, Bm, A7, G7, E7, D7, B7, C7). Using and , we get a guitar temperament:
(91.6302, 198.405, 292.284, 395.298, 498.425, 595.809, 700.116, 790.015, 895.782, 995.848, 1095.83)
We took our guitar temperament and made our own curved fret design as seen in Figure 8, left. The squiggly
Figure 8: Our curved fret design (left) compared to Thidell Formula 1 (right)
line frets seen here are constructed from cubic splines to allow for smooth pitch shifts via string bending, a common technique in both blues and rock. The overall appearance of our design looks similar to Thidell Formula 1 (Figure 8, right), and our method serves as a mathematical justification for that temperament to be regarded as optimal. Listen to Audio File 5 to hear our temperament.
We did some experiments with other pieces and styles of music like Liloa’s Mele (Grandson’s Lullaby), a Hawaiian slack key piece, and the results were lovely. Listen to Audio File 6.
Acknowledgments
This work was partially supported by the NSF via the PUMP program, award DMS-1247679. We would like to thank Maria Helena Noronha, the PI for PUMP, personally for her support. We also thank the reviewers (for very useful suggestions) and Glenn Zisholtz (for sparking the initial interest in curved fret designs).
References
[1] D. Benson. Music: A Mathematical Offering, Cambridge University Press, 2006. [2] S. A. Bleiler and E. Kummel. “Scales and Temperament from the Mathematical Viewpoint.” Bridges Conference Proceedings, Jyväskylä, Finland, 2016, pp. 517-574. [3] E. Dunne and M. McConnell. “Pianos and Continued Fractions.” Mathematics Magazine, vol. 72, no. 2, 1999, pp. 104-115. [4] F. A. Farris. “Music from Vibrating Wallpaper.” Bridges Conference Proceedings, Stockholm, Sweden, Jul. 25-29, 2018, pp. 287-294. [5] D. E. Hall, “The Objective Measurement of Goodness-of-fit for Tunings and Temperaments.” Journal of Music Theory, vol. 17, no. 2, 1973, pp. 274–290. [6] D. E. Hall, “Quantitative Evaluation of Musical Scale Tunings.” American Association of Physics Teachers, vol. 42, 1974, pp. 543–552. [7] B. Lehman, “Bach’s Extraordinary Temperament: Our Rosetta Stone: 1.” Early Music, vol. 33, no. 1, 2005, pp. 3-23. [8] L. Polansky, D. Rockmore, M. K. Johnson, D. Repetto and W. Pan, “A Mathematical Model for Optimal Tuning Systems.” Perspectives of New Music, vol. 47, no. 1, 2009, pp. 69–110.