## A close look at Wendy Carlos' scales

**NOTE:** This essay was initially written for a university assignment. Since it was one of my favorite assignments to work on, I decided to adapt the essay into this article. :-)

**NOTE 2:** The mathematics was crosschecked for correctness with the textbook “Music: A Mathematical Offering”^{3}.

Wendy Carlos was a true pioneer of synthesizers, and deeply helped popularize them. She was in fact Bob Moog’s first customer^{4}, the now famous modular synthesizers maker. Previously used primarily in “under-the-radar experimental music”^{5}, Wendy Carlos’ “*Switched-on Bach*” reinterpretation of Johann Sebastian Bach’s compositions brought synthesizers into the mainstream. This no surprise as the album achieved high success and popularity, being awarded three Grammy awards^{5}. The close collaboration between Wendy Carlos and Dr. Robert Moog furthermore helped shape the synthesizers landscape: “It was a perfect fit, He was a creative engineer who spoke music: I was a musician who spoke science”^{4}. Through her impressive catalogue of musical experimentation, she discovered a few musical scales, which she used in her album *“Beauty in the Beast”*. These music scales are the alpha-scale, beta-scale, gamma-scale and the harmonic scale. This essay will primarily focus on exploring the mathematics behind the alpha, beta and gamma scales and investigating the method through which Wendy Carlos discovered these scales.

Equal tempered tuning systems have been proven to be the best options among tuning systems, especially given their persistence through time. Ever since the \(12\)-tone equal tempered tuning system was introduced in the 1600s, no theorist managed to provide a better tuning system. Wendy Carlos experimented with equally tempered tuning systems, more precisely she set out to find new divisions of the octave. Her experimentation with octave division (presented in her article) is divided into two search experiments: Symmetric Divisions and Asymmetric Divisions. The difference between these two division lays in the intervals that are taken into consideration. Wendy defines symmetric intervals as the intervals which are inverse of each other with respect to the octave, for instance the perfect fifth (\(3/2\)) and perfect fourth (\(4/3\)). She consider the former to be a prime ratio, while the latter is “embedded in the combination”^{6} of the perfect fifth (\(3/2\)) and the octave (\(2/1\)).

Following inspiration from another program that searches divisions of an octave, authored by M. Yunik and G. W. Swift^{7}, Wendy created a program that searches Symmetric Divisions of the octave, focusing particularly on recreating these intervals: \(\frac{3}{2}, \frac{4}{3}, \frac{5}{4}, \frac{6}{5}, \frac{5}{3}, \frac{8}{5}, \frac{7}{4}, \frac{11}{8}\). It is noteworthy to mention that these to methods of searching ended up being vastly different. Since synthesizers are electronic devices that generate the sound, they can be configured with ease to abide by any tuning system. Wendy especially thought that there is no reason to “penalize what may be a fine division with more than two dozen notes”^{1}, so she disregards the part of Yunik’s and Swift’s program that “penalizes” the scale system for every interval that is not close enough. The algorithm then follows:^{1}

```
1. Calculate and store the cents for each prime ratio of interest. [...]
2. Set up a loop with some small increment on division size.
3. For each division size, calculate the size of one step, and set up and
clear the proper registers.
4. Find the nearest step to each given ratio and calculate its error.
5. Add the square of this error to the "sum-of-the-squares" register.
6. Plot that value, increment the division size, and loop to 3.
```

The program outputs a plot whereas the \(x\)-axis represents the size of a tone in the scale, and the \(y\)-axis is the error - a sum of squares of deviations. The search of divisions is a matter of finding local minimums on the plot, that are acceptable compromises. The plot produced by the Symmetric Search has found divisions which have been discovered before, such as the \(12\) tone equal tempered scale that is commonly used, or the \(31\) tone equal temperament scale. However, the real power of the program is searching divisions by modifying the list prime ratios of interest.

The search for Asymmetric division reflects the fact that inversions of the intervals are redundant^{6}. Using the same program as before, however removing the symmetric ratios, Wendy started investigating non integer divisions of the octave. Her list of target intervals for this exploration was: \(\frac{3}{2}, \frac{5}{4}, \frac{6}{5}, \frac{7}{4}, \frac{11}{8}\). The new plot showed three divisions which were surprisingly more consonant than the other divisions, between 10 and 40 equal steps^{6}. The three divisions she found are the alpha, beta and gamma scales:

For experimental purposes, a reimplementation of the program state above was attempted and can be found later in the article. This reimplementation only shows the baseline graph. Below is the graph Wendy originally created, where the alpha, beta and gamma values can be clearly noticed:

Figure 1: Wendy’s plot of the Asymmetric Search ^{1}

It is important to note that since the program plots out the error between approximating the ratios using a particular number of tones and the actual values, the peaks represent the points where the error minimal.

In order to analyze these new scales using Continued Fractions, there are a few particularities that are notable. Since the number of tones in an octave is not an integer, these scales are called non-octave-repeating, and due to the nature of how they were found, similarly to the B-P scale, we can consider the perfect fifth as being the basic interval of the scale. In other words, the problem of figuring out the interval becomes a problem of dividing the perfect fifth interval into an integer number of equal pieces. That means that in order to build the tones, we need to use the next harmonic interval - the major third - to generate the tones. Essentially, we want an integer number of major thirds to fall on an integer number of perfect fifths:

Since both \(p\) and \(q\) are positive integers, we could use Continued Fractions to find good approximations for the left hand side logarithm:

With the partial sums:

Since one of Wendy’s prime intervals is the minor third (\(\frac{6}{5}\)), we can add this interval to the error calculations below, to obtain a closer approximation. A perfect fifth can be composed of a major and minor third, from the triad `4:5:6`

, which means that a minor third is a major third “subtracted” from a minor third. On equally tempered scales, if the major third is \(px\) tones (where x is the size of a tone in cents) and the perfect fifth is \(qx\) tones, that means that a minor third is: \(qx - px = (q - p)x\)

Since we are trying to find the size of a tone/step in a equally tempered scale, let \(x\) be this the size of each tone (scale degree), measured in octaves. Since the goal is finding the size of a tone to approximate major thirds and perfect fifths as well as possible, we can calculate the error:

In order to obtain the best approximation we must seek to minimize the error, or \(f(x)\). A function f can only reach a local minimum only when the derivative \(f'(x)=0\). Therefore we can obtain the tone size \(x\) by:

Given that now we have the formula of finding the size of a step \(x\), such that it would produce the minimal error for the target intervals, we can plug approximations obtained in formula `[1]`

through Continued Fractions as values for \(p\) and \(q\). We observed that the first proper approximation in the partial sums of the Continued Fraction, \(\frac{p}{q} = \frac{9}{5}\), yields a close approximation to the \(\alpha\) value:

However, the next approximation of \(\frac{p}{q} = \frac{20}{11}\), yields a close approximation of the \(\gamma\) value:

The \(\beta\) value can be obtained by means of an intermediate fraction:

Since the denominator in these \(\frac{p}{q}\) fractions indicates the ideal number of notes in the scale, we can furthermore conclude that the number of notes for each scale is:

step sizes | number of notes |
---|---|

\(\alpha\) | 9 |

\(\beta\) | 11 |

\(\gamma\) | 20 |

Analogous to the \(5 + 7=12\) divisions of the octave, we can notice that the perfect fifth can be divided into \(9 + 11 = 20\) divisions^{2}. In his article “Wendy’s Xenharmonic Keyboard”, Jordan Schettler presents a keyboard layout of the \(\gamma\) scale that divides the perfect fifth into \(20\) notes. Following the analogy with the octave, \(11\) of the notes are the white notes on the keyboard and \(9\) are the black notes.

Figure 2: A perfect fifth on Wendy’s keyboard^{2}

The real beauty of investigating the mathematics of Wendy Carlos’ scales lies in the method through which they were discovered - experimentally by writing a program. However, mathematical articles which are now talking about these scales are approaching them from a more theoretical stand point of view, describing how the alpha, beta and gamma values can be discovered through continued fractions. It really shows how a problem can be approached from multiples angles and how different methodologies can produce virtually the same result. More so, the discovery and analysis of these scales displays how an experimental approach followed by a theoretical investigation of the experiment can create wonderful results. Even though I enjoyed investigating both methodologies of getting to the same result, Wendy’s practical approach was more appealing to me, as it showed perfectly what it means to experiment: being aware of the abilities of the tools, trying out possibilities to seek one that works out, utilizing the idea into a piece of work.

# Wendy’s Program Implemented in Python¶

```
import numpy as np
import matplotlib.pyplot as plt
primes = np.array([3 / 2, 5 / 4, 6 / 5, 7 / 4, 11 / 8])
cents_of_primes = 1200 * np.log2(primes)
division_sizes = np.linspace(10, 60, num=1000)
step_sizes = 1200 / np.array(division_sizes) # in cents
errors = np.array([
-np.sum((np.around(cents_of_primes / step_size) * step_size - cents_of_primes ) ** 2)
for step_size in step_sizes
])
x_axis, = plt.plot(division_sizes, errors)
plt.xlabel('notes per octave')
plt.savefig('plot.png')
```