# 25 Music

## 25.1 Even-Tempered Scale

The piano has 88 keys that include 7 octaves and 4 extra keys. Each octave on the musical scale contains 7 white keys and 5 black keys. The notes increase in whole and in other cases half step multiples. The notes in brackets are black piano keys and are a half step above the previous note.
A [A+=B-] B C [C+=D-] D [D+=E-] E F [F+=G-] G [G+=A-]
Sometimes there are half steps between white piano keys as in B&C and E&F and between all white to black keys. The +’s denote sharps and the –‘s flats. The note at each octave has double the frequency of the previous octave and is thus a harmonic. We add suffix numbers to the notes to specify a particular octave. For example, A4 is harmonic to A3 in the following table. A wave is harmonic to a lower frequency wave if the lower frequency waveform’s zero amplitude points are also of amplitude zero in the higher frequency wave.

Program 25-1: Three Harmonics
Here we plot the sum the 1st, 2nd, and 3rd harmonics:
ezplot('sin(x)+sin(2*x)+sin(3*x)')

To play the harmonics in Matlab, one can use the sound function, which expects normalized input between –1 y 1.

x = .1:.1:10000;
y = 1/3 .* (sin(x)+sin(2*x)+sin(3*x));
sound(y)

For a higher sounding harmonic
y = sin(x)+sin(3*x)+sin(5*x);

Now make the third term the 2nd harmonic of the second term and one will hear the double harmonic which has a greater gap sound within.
y = sin(x)+sin(3*x)+sin(6*x);

Contains higher overtones.
y = sin(x)+sin(6*x)+sin(8*x);
x = .1:.1:10000;
y = 1/3 .* (sin(3*x)+sin(6*x)+sin(12*x));
sound(y)

To obtain a dial tone like sound, simply add more and more sin waves:
y = 1/5.*sin(3.2332*x)+sin(7.23423*x)+sin(13.32523*x)+sin(8.2324*x)+sin(2.424*x));
sound(y)

One can superimpose sounds in Matlab, by running multiple ‘sound(y)’s back to back and then listen to them terminate one-by-one until a single sound is heard.

Now we can plot the repeating pattern for the harmonics:

Figure 25-1: Three Harmonics

Harmonics have a repetitive pattern too short to distinguish any differences while listening. By mixing non-harmonics, we obtain chords that may repeat over much longer periods so that one may hear cycles. By adding many additional non-harmonics we can get dial tone sounds. Though there is no period , one can see evenly spaced peaks which produce a repetitive like sound, a dial tone.

Program 25-2: Creating Stereo Sound
y1 = 1/3 .* (sin(2*x)+sin(4*x)+sin(8*x));
y2 = 1/3 .* (sin(3*x)+sin(6*x)+sin(12*x));
y = [y1' y2'];
sound(y)

Table 25-1: Frequencies of the Third Octave
 Note Frequency (Hertz) A3 220 B3 246.9 C3 261.6 D3 293.7 E3 329.6 F3 349.2 G3 392 A4 440

How can we calculate these steps? We denote a waveform with frequency f0 and its harmonic with frequency f1. By definition:
f1/f0=2.

We also note that all of the frequencies between will have the same multiple (denoted by h) from the previous frequency. Say f0 is A3 than A3+ = A3*h. Now to the computation of h:

Equation 25-1: Step Frequency Multiplier for the Even-Tempered Scale
f1 = h * h * h * h * h * h * h * h * h * h * h * h * f0
f1/f0 = h^12
2 = h^12
h = 12th root of 2 = 1.059463094

The half step always has a fixed ratio in the Even-Tempered Scale that is h. For example C3/B3 = 261.6/246.9 = 1.059463094.[2616] Now we can fill in the frequencies of the sharps and flats as well:

Table 25-2: Sharp and Flat Frequencies of the Third Octave
 Note Frequency (Hertz) A3 220 A3+B3- 233.1 B3 246.9 C3 261.6 C3+D3- 277.2 D3 293.7 D3+E3- 311.1 E3 329.6 F3 349.2 F3+G3- 370.0 G3 392.0 G3+A4- 415.3 A4 440

## 25.2 Pythagorean Diatonic Scale

The Diatonic scale differs from the Equal tempered scale in that the multiples between frequencies are fractions. Pythagoras developed the scale based on fractions while studying the tonal relationships between string lengths on a monochord. He did not consider a multiple of length based on an irrational numbers. A frequency of the wave of a string will change inversely with its length. Hence given two strings, the second string half the length of the first; the frequency of the second string will be twice that of the first.

The frequencies of the First, Fourth, Fifth, and Octave are known through observation. The derivation of the rest follows based on the Fifth.

D2 = 3/2 f * 3/2 = 9/4 f
D1 = 9/4 f * ½ = 9/8 f

C2 = 4/3 f * 3/2 f = 2f

A3 = 9/4f * 3/2 = 27/8 f
A2 = 27/16 f

Table 25-3: Diatonic Frequencies of the Octave
 Note Position String Length Ratio Frequency C1 First l F D1 Second 8/9 l 9/8 f E1 Third 64/81 l 81/64 f F1 Fourth ¾ l 4/3 f G1 Fifth 2/3 l 3/2 f A2 Sixth 16/27 l 27/16 f B2 Seventh 128/243 l 243/128 f C2 Octave ½ l 2 f

Since there are six whole tones in the space of an octave, we’d expect 9/8 ^ 6 => 2 but it = 2.027, so the tones are not evenly distant. Equal temperament does away with this problem.

Pythagoras found that the octave, fifth, and forth had the most harmonious sounds. A song’s key is the octave forward from the starting note. On the Diatonic Scale, the multiples between the same notes may vary with Octave. Hence, the same piece of music played in a different key tends to sound quite different unlike when playing a piece with the Even-Tempered Scale.

This problem with uneven multiples manifests itself in other areas. For example, 12 fifths doesn’t equal 7 octaves, though they are the same key on the piano. This is known as the Pythagorean comma.[2617] This imbalance in the frequency distance between keys means that it is impossible to construct Pythagorean tuned piano.

The frequency of C1 = f
The frequency of C8 = 2^7 f = 128f from Octave multiplication.
The frequency of C8 from multiples of fifths is 3/2 ^ 12 f = 129.74f

The problem doesn’t manifest significantly when playing music in a single octave, but when playing music across octaves one cannot for example tune the 8th octave to the 7th fifth since they are not compatible. One cannot build a Pythagorean piano.

## 25.3 Fractals

In the kabbalistic Tree of Life, the microcosm reflects the macrocosm, the sefirot in man reflect the sefirot of G-d. Man is created in the image of G-d. This recursive principle is the essence of fractals, which are repeated images within images.

Figure 25-2: Microcosm reflecting the Macrocosm
Tobias Cohen in Maaseh Tuviyah shows how the microcosm of man reflects the macrocosm of a house.[2618]

“The natural world is composed of fractals that are the trails, or visual representation, left by the dynamic (continuously moving) systems that created them. A tree is fractal in nature – a single branch resembles the entire tree, a smaller twig resembles the branch, even the structures of the veins in the leaves exhibit the same branching process as the tree itself. Granted, the patterns at different scales are not exact replicas of one another, but the idea is the same. The patterns created by the rocks of a rugged coastline also repeat themselves at different scales – a snail crawling along the nooks and crannies of the rocks on the shore traverses a meandering path similar to the one you would take on a hike along the cliffs, which in turn is similar to the general outline of the coast viewed from an airplane. Natural fractals reach a point where the pattern (at the biological level, anyway) stops; however, in a true scaling fractal (for instance, the Koch snowflake), this detail continues ad infinitum.”[2619]

## 25.4 Fibonacci Ratio

The Fibonacci ratio has an aesthetic appeal to the human mind. There are five black keys for every 8 white keys in a piano Octave. The partitioning of great paintings is often done according to the ratio. Also the lengths of different movements in a classical piece of music will often follow this ratio.

Equation 25-2: Fibonacci Ratios
1/1
1/2
2/3
3/5
5/8
8/13

133/377 = 0.618037

## 25.5 Television

A kabbalist should not have a TV, yet there are spiritually uplifting programs such as ‘Little House on the Prairie’.

[2616] Math and Music Harmonious Connections, Trudi Hammel Garland and Charity Vaughan Kahn, Dale Seymour Publications, page 40.
[2617] Math and Music, page 62.
[2618] http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2175063/
[2619] Math and Music Harmonious Connections, Trudi Hammel Garland and Charity Vaughan Kahn, Dale Seymour Publications, page 132.