How to Tune a Stiff Sawtooth
Year: 2022 Authors: Emily Henderson; Jordan Schettler
Core claim
For stiff, inharmonic waveforms, tuning by a weighted geometric mean yields better interval stretching than matching only the first corresponding partials.
Topics
inharmonicity, interval stretching, weighted geometric mean, stiff strings, just intonation
Domains
partial differential equations, wave equation, separation of variables, music, sound synthesis, instrument tuning
Methods
analytical modeling, partial frequency comparison, weighted tempering factor
Media
stiff sawtooth wave, piano strings, sound files
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 2022 Conference Proceedings
How to Tune a Stiff Sawtooth
Emily Henderson¹ and Jordan Schettler²
Department of Mathematics and Statistics, San José State University ¹emily.henderson@sjsu.edu; ²jordan.schettler@sjsu.edu
Abstract
The vibrations of a flexible string are well-modeled by the classical wave equation. However, when the string is sufficiently stiff, like those on a piano, an extra term needs to be added. This impacts the tuning of the instrument, where frequencies need to be stretched apart. This stretch is sometimes done by forcing the first pair of corresponding partials to coincide, but that approach does not work for a general stiff waveform like an inharmonic sawtooth wave produced by a synthesizer. We propose tuning via a tempering factor given by a certain weighted geometric mean.
Introduction
Vibrating strings produce compression waves in the air which we interpret as sound. One basic quality of the sound is its pitch, which is determined by the fundamental frequency of vibration. We measure frequency in Hertz (Hz), with 1 Hz denoting one cycle per second. Concert pitch in the United States is set at 440 Hz, corresponding to the A note directly above middle C. Most musical instruments use a 12-tone scale with frequencies equally spaced one semitone apart. This means that the frequency of the note semitones higher than concert pitch should be . This model is chosen because of the approximations to the significant musical intervals (octave), (perfect fifth), and (major third). On a piano, once a full octave of 12 notes has been tuned in this way, the tuner can tune all other notes as some whole number of octaves away from a note in this range. So, for instance, one might expect the frequency of the A note two octaves above concert pitch to be tuned exactly as , but this is not the case here. It turns out that the stiffness in piano strings makes doubling the frequency an undesirable octave. In fact, desirable octaves are obtained from “stretching”: multiplying by factors slightly larger than 2. Moreover, not all octaves will be stretched the same, and there is no universally accepted choice for the amount of stretching.
Our goal is to develop a model using a weighted geometric mean which predicts how any whole number ratio (not just the octave) should be stretched given an arbitrary synthesised waveform with artificial stiffness. In particular, this tells you how to tune stiff waveforms for any piece of music that can be tuned with just intonation, i.e., using only whole number ratios. We illustrate this idea using a stiff sawtooth to play the theme from Beethoven’s Ninth, both with and without interval stretching.
Partials and Consonant Intervals
Consider a taut vibrating string with fixed endpoints. Let denote the displacement at time of position along the neutral axis of the string. To determine the equation of motion, we can use Newton’s second law on a small segment of the string: Force = Mass × Acceleration. If the string is very flexible, like those on a guitar, then the only significant restoring force is due to tension , and we get the classical wave equation where is the linear density. However, if the string is sufficiently stiff, like those on a piano, there is an additional restoring force which adds a term to the PDE. The new term carries the opposite sign
of acceleration due to vertical shearing forces from the rigidity of the object [6]. For a cylindrical string, this yields
where is the radius of the string and measures the elasticity [5]. The extra term here is the same one seen in the beam equation from structural engineering. In this way, a stiff string lives somewhere between a flexible string and a vibrating bar on a xylophone. The boundary conditions and at endpoints , model piano strings, which are pinned and supported on a bridge. The method of separation of variables can be used to find the exact solution
(1)
where , with and [5]. The fundamental frequency is , and the constant represents the stiffness, which varies for piano strings from to [7].
The th term in Equation 1 contains the th partial: with amplitude . These give the sound its timbre, or tone color. The spectrum of partial frequencies is the set . When (guitar strings), the spectrum is nearly harmonic, meaning that the th partial frequency is , a positive integer multiple of the fundamental frequency. Given another harmonic spectrum , a consonant interval is produced when is a ratio of small integers such as (octave), (perfect fifth), and (major third). Consonant intervals are considered as sounding pleasant in the Western classical tradition. This is due to the many coinciding partial frequencies in this case: for , , , . For example, the octave interval consists of two sounds so related that they are regarded as the same note; in the opening line “Somewhere over the rainbow…”, the first note “Some” is sung at middle C with frequency around 261.6 Hz, and the second note “where” is also a C, but sung one octave higher at 523.2 Hz (twice the frequency). It is not possible to construct a single scale where every interval is tuned with correct just intonation. For a simple example, note that three successive major thirds should be equivalent to a single octave, yet . In fact, the whole number ratio corresponding to a given interval is sometimes ambiguous, meaning it could be interpreted differently depending on the musical context. Recent Bridges papers have discussed this tuning problem [1, 2, 3], but we instead focus on how stiffness impacts these ratios. When (piano strings), the spectrum is inharmonic:
Here, the intervals must be adjusted in an attempt to make corresponding partials coincide. Piano tuners have done this by ear, and the curve (Figure 4 in [4]) produced by graphing the discrepancy from equal temperament was documented by O.L. Railsback. Various attempts have been given to quantitatively explain this so-called Railsback stretch. One approach is to require the first pair of corresponding partials to have coinciding frequencies: for the interval as in [7]. For example, assuming the stiffness is the same for both spectrums, gives us the “stretched octave” . This idea works well in explaining the stretch for middle to high frequency (treble) notes with few significant partials. However, this stretching is insufficient for the piano’s bass strings, which have many more significant partials [4]. More generally, stiffness can greatly impact the tuning of any waveform of the shape where the amplitudes do not rapidly decrease. For our examples, we consider an approximate sawtooth wave , which produces a sound first heard from analog synthesizers. See Figure 1. To actually hear the impact of stiffness on the sawtooth, we used Mathematica and Logic
How to Tune a Stiff Sawtooth
Figure 1: Approximate Sawtooth with (left), Stiff Sawtooth with (right)
Figure 2: Partials with Nearly Equal Frequencies Produce a Beat Envelope (Dashed Line)
Pro to recreate two versions of the main theme from Beethoven’s Ninth Symphony. The first is tuned in just intonation with no stretching and sounds like an unloved church organ. The second version has simple stretched intervals as indicated above and sounds much brighter. The sound files can be found in the zip folder supplement to the article: 1StiffBeethoven.wav and 2StretchedBeethoven.wav.
Beats and Tempering Factors
What if simple stretching is not enough, as in the case of a piano’s bass strings? Another approach is to try and minimize the total dissonance produced [4, 8]. Dissonance here is measured in terms of acoustic beats: periodic changes in amplitude resulting from the superposition of two partials with nearly equal frequencies. See Figure 2. Musicians tune stringed instruments by adjusting tension to minimize beating. This is done on violins and guitars, for instance, by turning the pegs at the end of the neck on the instrument. Consider a pair of partials and with . When sounded together, they produce a beat envelope with frequency and amplitude . How can intervals (such as 2/1, 3/2, 5/4) be adjusted to avoid dissonance produced by a general inharmonic spectrum?
Our approach is to stretch intervals by a tempering factor so that taking makes corresponding partials frequencies close enough to reduce audible beats. Let denote the tempering factor which makes . Then, if denotes the stiffness for the spectrum , we have
Taking as in [7] only removes the beats from the first pair of corresponding partials like the stretched octave above, but beats are sometimes still audible from higher corresponding partials. In this way, should be some kind of an “average” of the . Since the tempering factors behave as multiplicative objects, we use a geometric mean. Not all beats produced by pairs of corresponding partials are made equally, however, since partials with smaller amplitudes are less audible. We can choose non-negative weights in our geometric
Henderson and Schettler
mean to account for this. Thus we define
How should one choose weights ? One might consider choosing (the amplitude of the beat envelope), but this ignores the overall volume produced by the partials, which is determined by . Here we will take our weights to be the product of amplitudes . This choice coincides with weights chosen by Sethares [8] in a sensory dissonance model. Thus our approach can be viewed as a hybrid of Sethares’ with Rasch and Heetvelt’s tempering factors [7]. We will demonstrate using the approximate sawtooth wave defined above. The octave from to is first played with no stiffness. Next, stiffness with is added, but without stretching. The beating is apparent and rapid. With simple stretching, the tempering factor becomes to produce . Here the beating has lessened but is still audible. Finally, we stretch a little further with our tempering factor , where and . This produces . The beating has vastly improved. As above, the sound files are available in the zip folder supplement to the article: 3SawtoothOctave.wav, 4StiffOctave.wav, 5SimpleStretchedOctave.wav, and 6GeometricMeanOctave.wav.
Acknowledgements
This work was supported by an award from the Henry Woodward Fund which supports applied math research through an endowment to the Department of Mathematics and Statistics at San José State University.
References
[1] Steven A. Bleiler and Ewan Kummel, Scales and temperament from the mathematical viewpoint, Proceedings of Bridges 2016: Mathematics, Music, Art, Architecture, Education, Culture (Eve Torrence, Bruce Torrence, Carlo Séquin, Douglas McKenna, Kristóf Fenyvesi, and Reza Sarhangi, eds.), Tessellations Publishing, 2016, pp. 571-574. [2] Mitchell Chavarria and Jordan Schettler, The secret behind the squiggles: Guitars with optimally curved frets, Proceedings of Bridges 2019: Mathematics, Art, Music, Architecture, Education, Culture (Susan Goldstine, Douglas McKenna, and Kristóf Fenyvesi, eds.), Tessellations Publishing, 2019, pp. 279-286. [3] Frank Farris, Music from vibrating wallpaper, Proceedings of Bridges 2018: Mathematics, Art, Music, Architecture, Education, Culture (Eve Torrence, Bruce Torrence, Carlo Séquin, and Kristóf Fenyvesi, eds.), Tessellations Publishing, 2018, pp. 287-294. [4] N. Giordano, Explaining the Railsback stretch in terms of the inharmonicity of piano tones and sensory dissonance, The Journal of the Acoustical Society of America 138 (2015), no. 4, 2359-2366. [5] Xavier Gràcia and Tomás Sanz-Perela, The wave equation for stiff strings and piano tuning, Reports@SCM 3 (2017), no. 1, 1-16. [6] Michael A. Karls and Brenda M. Skoczelas, Modeling a diving board, Mathematics Magazine 82 (2009), no. 5, 343-353. [7] Rudolf A. Rasch and Vincent Heetvelt, String inharmonicity and piano tuning, Music Perception: An Interdisciplinary Journal 3 (1985), no. 2, 171-189. [8] William A. Sethares, Local consonance and the relationship between timbre and scale, The Journal of the Acoustical Society of America 94 (1993), no. 3, 1218-1228.