{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "\n", "\n", "Following Excercise 1.10 and Section 5.1.1.2 of [Müller, FMP, Springer 2015], we discuss in this notebook the tuning system introduced by Pythagoras as well as the Pythagorean comma.\n", "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Pythagorean Comma\n", "\n", "The oldest known tuning system was introduced by the Greek philosopher and mathematician Pythagoras (sixth century BC). **Pythagorean tuning** is a system of musical tuning in which the frequency ratios of all intervals are based on the ratio $3:2$ as found in the harmonic series. This ratio is also known as the **perfect fifth**. We now construct a scale starting with the center frequency $\\omega$ of a root note (corresponding to the frequency ratio $1$). Then, we successively multiply the frequency value by a factor of $3/2$, and if necessary, divide it by two such that all frequency values lie between $\\omega$ and $2\\cdot\\omega$ (corresponding to frequency ratios between $1$ and $2$). We repeat this procedure to produce $13$ frequency values (and $13$ frequency ratios). The last (the 13$^\\mathrm{th}$) frequency ratio is also known as the **Pythagorean comma**, which indicates the degree of inconsistency when trying to define a twelve-tone scale using only perfect fifths.\n", "\n", "In the following code example, we construct the thirteen frequency ratios. Furthermore, these frequency ratios are compared with the one obtained from equal-tempered scale (the difference is specified in cents). " ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "execution": { "iopub.execute_input": "2024-02-15T08:46:00.419264Z", "iopub.status.busy": "2024-02-15T08:46:00.418676Z", "iopub.status.idle": "2024-02-15T08:46:03.502140Z", "shell.execute_reply": "2024-02-15T08:46:03.501492Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "m = 0, note = 0, num3 = 0, num2 = 0, ratio = 1: 1 = 1.0000, diff = +0.00\n", "m = 1, note = 7, num3 = 1, num2 = 1, ratio = 3: 2 = 1.5000, diff = +1.96\n", "m = 2, note = 2, num3 = 2, num2 = 3, ratio = 9: 8 = 1.1250, diff = +3.91\n", "m = 3, note = 9, num3 = 3, num2 = 4, ratio = 27: 16 = 1.6875, diff = +5.87\n", "m = 4, note = 4, num3 = 4, num2 = 6, ratio = 81: 64 = 1.2656, diff = +7.82\n", "m = 5, note = 11, num3 = 5, num2 = 7, ratio = 243: 128 = 1.8984, diff = +9.78\n", "m = 6, note = 6, num3 = 6, num2 = 9, ratio = 729: 512 = 1.4238, diff = +11.73\n", "m = 7, note = 1, num3 = 7, num2 = 11, ratio = 2187: 2048 = 1.0679, diff = +13.69\n", "m = 8, note = 8, num3 = 8, num2 = 12, ratio = 6561: 4096 = 1.6018, diff = +15.64\n", "m = 9, note = 3, num3 = 9, num2 = 14, ratio = 19683: 16384 = 1.2014, diff = +17.60\n", "m = 10, note = 10, num3 = 10, num2 = 15, ratio = 59049: 32768 = 1.8020, diff = +19.55\n", "m = 11, note = 5, num3 = 11, num2 = 17, ratio = 177147:131072 = 1.3515, diff = +21.51\n", "m = 12, note = 12, num3 = 12, num2 = 19, ratio = 531441:524288 = 1.0136, diff = +23.46\n", "Pythagorean comma: 1.0136 (+23.46 cents)\n", "\n", "Sinsoid of 440 Hz (A4):\n" ] }, { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "\n", " | Note | \n", "ET Freq. (Hz) | \n", "ET Sinusoid | \n", "Pyt. Ratio | \n", "Pyt. Freq. (Hz) | \n", "Pyt. Sinusoid | \n", "Difference (Cents) | \n", "
---|---|---|---|---|---|---|---|
1 | \n", "C4 | \n", "261.63 | \n", "\n", " | 1:1 | \n", "261.63 | \n", "\n", " | 0.00 | \n", "
2 | \n", "C$^\\sharp$4 | \n", "277.18 | \n", "\n", " | $2^8:3^5$ | \n", "275.62 | \n", "\n", " | -9.78 | \n", "
3 | \n", "D4 | \n", "293.66 | \n", "\n", " | $3^2:2^3$ | \n", "294.33 | \n", "\n", " | 3.91 | \n", "
4 | \n", "D$^\\sharp$4 | \n", "311.13 | \n", "\n", " | $2^5:3^3$ | \n", "310.07 | \n", "\n", " | -5.87 | \n", "
5 | \n", "E4 | \n", "329.63 | \n", "\n", " | $3^4:2^6$ | \n", "331.12 | \n", "\n", " | 7.82 | \n", "
6 | \n", "F4 | \n", "349.23 | \n", "\n", " | $2^2:3$ | \n", "348.83 | \n", "\n", " | -1.96 | \n", "
7 | \n", "F$^\\sharp$4 | \n", "369.99 | \n", "\n", " | $3^6:2^9$ | \n", "372.51 | \n", "\n", " | 11.73 | \n", "
8 | \n", "G4 | \n", "392.00 | \n", "\n", " | $3:2$ | \n", "392.44 | \n", "\n", " | 1.96 | \n", "
9 | \n", "G$^\\sharp$4 | \n", "415.30 | \n", "\n", " | $2^7:3^4$ | \n", "413.43 | \n", "\n", " | -7.82 | \n", "
10 | \n", "A4 | \n", "440.00 | \n", "\n", " | $3^3:2^4$ | \n", "441.49 | \n", "\n", " | 5.87 | \n", "
11 | \n", "A$^\\sharp$4 | \n", "466.16 | \n", "\n", " | $2^4:3^2$ | \n", "465.11 | \n", "\n", " | -3.91 | \n", "
12 | \n", "B4 | \n", "493.88 | \n", "\n", " | $3^5:2^7$ | \n", "496.68 | \n", "\n", " | 9.78 | \n", "
13 | \n", "C4 | \n", "523.25 | \n", "\n", " | $2:1$ | \n", "523.25 | \n", "\n", " | 0.00 | \n", "