Harmonic Series

Dissonance Graph

EDO Alignment Error

Harmonic Circle

Musical Harmony Analysis Tool

This interactive tool allows you to explore the relationship between harmonic series and tuning systems in terms of dissonance and scale alignment errors.

Visualize and experiment with harmonics, dissonances, EDO alignment errors, and more, with real-time audio and graphical feedback.

Features

Harmonic Series

Drag the blue bars to adjust the strength of each harmonic. These changes affect how the sound will be produced.

Dissonance Graph

Shows how pleasant or harsh two notes sound together at different intervals. Click anywhere on the line to hear the sound. You can change the base note frequency below the graph.

The dissonance formula:

The dissonance graph is based on a model of an empirical Plomp-Levelt dissonance curve. Sethares models it as a difference of the exponential functions:

$$d(x)=e^{-b_1 x} - e^{-b_2 x}$$

where $b_1$ and $b_2$ are constants that define the curve's shape ($b_1=3.5$ and $b_2=5.75$ are the default values used in the model). The dissonance between two tones of frequencies $f_1$ and $f_2$ and loudness $l_1$ and $l_2$, respectively, is given by:

$$d(f_1,f_2,l_1,l_2)=l_{12}\left[e^{-b_1s(f_2-f_1)}-e^{-b_2s(f_2-f_1)}\right]$$

where:

  • $f_1 < f_2$
  • $l_{12} = \min(l_1,l_2)$
  • $s = \frac{0.24}{0.0207 f_1+18.96}$

EDO Error Graph

Displays how well different Equal Division of Octave (EDO) systems match our harmonic series. Common Western music uses 12-EDO. Click any point to see its representation in the circle.

Error formula:
$$e = \sqrt{\sum_{n=1}^{+\infty}a_{n} (x_{n} - [x_{n}])^2}$$
  • $a_n$ is the n-th harmonic amplitude
  • $x_n$ is the pitch value (in "semitones"): $\textrm{EDO} \times \left(\log_2 n \pmod{1}\right)$

Harmonic Circle

Shows harmonics arranged in a circle, with colors indicating how well they match the selected EDO system (green — good match, red — poor match). Blue lines show the EDO divisions.

Click on the circle to hear the sound of the selected note/harmonic.

Advanced editing

Number of harmonics

To set more harmonics than the default range, set the harmonics variable in the URL. For example, to set 80 harmonics, enter:

https://edo.jakim.it/?harmonics=80

Custom series

If you want to provide non-standard (fractional) harmonics, or harmonics beyond the given range, you may use the console and edit the harmonicSeries variable directly. For example, you can add a single harmonic by:

harmonicSeries[1.5] = 0.5;

You can also provide the entire harmonic series as a dictionary:

harmonicSeries = {1: 1.0, 1.75: 0.25, 2.44: 0.1, 3: 0.05, 4.47: 0.02};

Update all graphs by calling:

updateAll();

Finally, you can provide a custom series via a URL in the following format:

https://edo.jakim.it/?1.0=1.0&1.75=0.25&2.44=0.1&3=0.05&4.47=0.02

where each harmonic is set by harmonic=amplitude pairs, joined by &.

Custom scale

You can examine non-standard scales. You can provide a custom scale as a series of frequency ratios separated by a comma:

https://edo.jakim.it/?scale=1.0,1.2,1.4,1.6,1.8

Since the error calculation method is counted in the number of tones, the formula for custom scales cease to make sense as it assumes that each interval is of the same length.

A distance-based formula is being used instead:

Error formula:
$$e = \sum_{n=1}^{+\infty}|S|\sqrt{a_n \min_{s\in S}\left(x_n - s\right)^2}$$
  • $S$ is the scale: a set composed of $\log_2$-values of the scale frequency ratios (modulo 1)
  • $x_n$ is the pitch value: $\log_2 n \pmod{1}$

References