«Harmonics» project

Alex, Bo, Fred, Malik
2024, may 23th
image: 2_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_IDEX_france2030_couleur.jpg

Table of Contents

Abstract
Tonnetz is software developed by Frédéric Faure, Malik Mezzadri, Alexandre Ratchov and Bo VanderWerf. Tonnetz is aimed to play music with just intonation, with MIDI instruments and also with acoustic instruments, via microphone. It also controls a slider-flute. It contains an automate that can play, according to a Markov graph.
This document is a tutorial. It explains different aspects of the program tonnetz, from installation in 1, to the abstract concepts and practical use. There is an other document called “reference” that gives all mathematical details and software code explanations. The objective of this program “Tonnetz” are multiple: from research in musicology, pedagogical use, to compose music, play and improvise on stage.
Remark 0.1. On this pdf file, you can click on the colored words, they contain an hyper-link to wikipedia or other multimedia contents.
This tutorial assumes some basic knowledge in music, but no knowledge in mathematics. If some parts are not understandable, the reader can skip them (and also mail to the author, thanks). The reader can begin by looking at the different videos given as examples in the links.
Documents and references:

1 Installation of plugin Tonnetz and softwares on the computer Mac-Os

  1. If not already done, download Synth that contains the sounds for the synthetizer 'midisyn' of Alex.
  2. Download the Plugin Tonnetz.

2 How to use

2.1 Program Tonnetz (StandAlone)

3 Versions and news

21/01/2024, version 1.1.1
Version simplifiée du plugin Tonnetz qui permet de:
19/02/2024, version 1.1.9
19/02/2024, version 1.1.10
20/04/2024, version 1.1.12
23/05/2024, version 1.1.13

4 Sessions passées

5 Objectives of the project

5.1 First ojectives

5.1.1 For Alex & Fred

5.1.2 For Bo & Malik

5.1.3 Together (Alex, Bo, Fred, Malik)

5.2 Some conferences?

Une conférence sur les tempéraments anciens et actuels?

5.3 Objectives

6 Pedagogical tutorial: «how to start with the plugin tonnetz»

Before starting to use the plugin tonnetz let us give a short introduction that gives an idea of “what tonnetz is” and a few important “key words” for after.

6.1 Summary of the tonnetz plugin with few key-words

6.1.1 MIDI,Audio, DAW and plugins

6.1.2 The tonnetz

Remark 6.1. if several musicians are playing together, it's possible for each musician to use his or her own temperament. For example, “musician red” uses an adaptive temperament and “musician blue” uses a fixed temperament (in mode leader or follower). Later each musician or plugin will be identified by a color.

7 Theoretical description

7.1 Harmonics and just intervals

7.1.1 Human voice and importance of harmonics and just intervals

Human voice is created by the periodic vibration of vocal cords. From Fourier analysis, there are harmonics in every periodic signal like the human voice, a sound of a string instrument, a flute or a trumpet, etc. Harmonics are therefore present in the human voice and other musical sounds.
Just intervals are the intervals between different harmonics. Our brain is well trained to analyze and recognize human voice via identification of these just intervals, so we can understand that just intervals play an important role in music. This is what we will be concerned with this program.
Auditive illusion:
This video (read the given description) illustrates how the brain creates virtual fundamentals from just intervals, as it would like to give the information to consciousness that a human voice is present. See wikipedia about Missing fundamental.

7.1.2 What are the harmonics

The harmonics of the fundamental note C 3 for example (subscript 3 here means octave 3 ), is the following series of notes (and correction in half-tone)
image: 5_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_harmonics.png
where the index is the harmonic number 1,2,3, and the subscript is the correction with respect to the equal temperament. For example, harmonic 3 is G with a correction +0.02 of halftone. Harmonic 7 is B with a correction -0.31 of halftone, that is very perceptible. What is important to observe and enough to remember for after is:
Numbers 2,3,5,7, are prime numbers and are enough to construct every other numbers, e.g. harmonic 6=2 × 3 is one octave above harmonic 3 , hence 2 octaves and a fifth above the fundamental. Harmonic 9=3 × 3 is a fifth and an octave above harmonic 3 , hence two octaves and two fifth above the fundamental, etc.
Frequency of the harmonics:
if f= f C 3 is the frequency of the fundamental, then the frequency of harmonic 3 is f G 4 =3f , and frequency of harmonic 5 is f E 5 =5f , etc. These frequencies are slightly different from the frequency obtained in equal temperament (more on this below). More informations about harmonics are in the appendix sec:Harmonics.

7.1.3 What are just intervals

Between the first harmonics, there are the following intervals:
These intervals between the harmonics of a given fundamental are called just intervals and will have important roles after.
Ratio of frequencies of just intervals:
In the example above, if f= f C 3 is the frequency of the fundamental, then the frequency of harmonic 4 is f C 5 =4f , and frequency of harmonic 5 is f E 5 =5f . Consequently we get that the ratio of frequencies of the major third just interval C 5 E 5 is f E 5 f C 5 = 5f 4f = 5 4 Similarly the ratio of frequencies of the fifth just interval C 4 G 4 is f G 4 f C 4 = 3f 2f = 3 2 More generally, there is a just interval between two frequencies f,f' if the ratio is f' f = a b with two small integers a,b (say a,b<20 ).
Dissonance of a just interval:
We define the dissonance of the just interval f' f = a b as dis ( a b ) := ln ( ab ) for an irreducible fraction a/b , and with “ ln ” being the natural logarithm function. (There will be a simpler expression of dis ( a b ) later).

7.1.4 Just intonation

Just intonation in musics means that the we play music only with just intervals.
We will use two different and complementary representations for the notes constructed with just intervals: the pitch space and the tonnetz space. We will explain after the concept of temperament that explains how we choose 12 (or less) notes per octave.

7.1.5 Equal temperament

In every culture of every time people played with just intonation, i.e. just intervals. The only exception comes from Europe in the mid of XIX-th century, where they introduce the equal temperament, where the octave is divided in logarithmic scale in 12 equal intervals. The consequence is that in the equal temperament, only the octave remains a just interval. The other intervals are not. But the fifth and fourth are very close to just intervals, so that the difference is unperceptive.
Later, we will not consider the equal temperament (except in the pitch space representation, giving some dashed lines of references).

7.2 Tunplot: the pitch space

Watch a video.
The pitch is very well known by musicians, it represents the position of a note on a piano keyboard. Precisely the pitch of a note of frequency f is defined by x= 12 ln 2 ln ( f f A 5 ) + x A 5 R where f A 5 =440 Hz is the frequency of the tuning fork and x A 5 =69 is its (MIDI) key number. In other terms x represents the position of a note on a MIDI keyboard, where integer values are exactly on the keys (ex: x=60 is for f C 5 ) but non integer values of x are also allowed, between the keys.
For example the pitch of A 5 is x A 5 =69 and the pitch of B 5 is x B 5 =70 , hence x=69.5 is a pitch at “half-distance” between A 5 and B 5 , sometimes called quarter-tone.
In the program, the representation of the pitch space is called: “tunplot”.
Example 7.1. On the following example, three notes have been played with the keys F 4 , C 5 , E 5 . They are represented by the green disks. Their horizontal position gives their pitch x , and the dashed lines are is the equal temperament, i.e. for integer value of x . (In black are other accessible notes by the temperament, but not yet played).
image: 6_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_pitch_1.png
In this example, we observe that x E 5 is a little lower than the equal temperament line. The number on the left of each line is the octave range number.

7.3 Netplot: the tonnetz space

Watch a video.
In German, ton = “note”, netz = “lattice”, so “tonnetz” is the lattice of notes.
Euler in 1750, proposed a tonnetz to represent just intervals, that is a two-dimensional lattice. He used it to represent just intervals with fractions of the form a b = 2 n 2 3 n 3 5 n 5 with integers n 2 , n 3 , n 5 Z . This is not sufficient for our purpose, we will need to use all the prime numbers { 2,3,5,7,11,13, } in our fractions, so we define the tonnetz space as follows: a fraction is written uniquely as a b = 2 n 2 3 n 3 5 n 5 7 n 7 with some integers n 2 , n 3 , n 5 , n 7 , Z . We represent n=( n 2 , n 3 , n 5 , ) as a point in a lattice. In practice we will represent the axis of n 3 , n 5 , n 7 , the axis of n 11 , n 13 , n 17 are written in small fonts. The value of n 2 (the octave) is not represented, instead we represent the octave position of the note on a circle.
In the program, the representation of the tonnetz space is called: “netplot”.
Example 7.2. On the following example (same as 7.1), three notes have been played with the keys F 4 , C 5 , E 5 . They are represented by the green domains. (In grey are other accessible notes, but not yet played). The horizontal axis is for n 3 value, the vertical is for n 5 and the octave range value is the position on each circle. From this picture, up to a factor 2 , we can read that the ratio of frequencies are f C 5 f F 4 =( 2 n 2 ) 3 and f E 5 f C 5 =( 2 n ' 2 ) 5 . We also read that C,E are in the same octave range 5 and F is in the octave range 4 . We can deduce actually that f C 5 f F 4 = 3 2 is a just fifth and f E 5 f C 5 = 5 4 is a just major third. This was not visible from the pitch representation.
image: 7_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_tonnetz_1.png
Summary 7.3. We not need to be a mathematician to read this picture. We only need to observe that the notes F 4 , C 5 are neighborhoods on the horizontal n 3 axis which is the axis of just fifths and that C 5 , E 5 are neighborhoods on the vertical n 5 axis which is the axis of just major third.
Example 7.4. Here is an example with the three axis n 3 , n 5 , n 7 . This is a chord with C 5 , G 5 , E 6 , B 6 . The note B 6 b is along the axis n 7 which is the axis of just minor seventh.
image: 8_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_pitch_2.png image: 9_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_tonnetz_2.png
Example 7.5. In this more complicated example, we have played the keys C 4 , G 5 , G 6 , A 6 , E 7 , E 7 . On the pitch axis, we have added the fractions, where C 4 has the fraction 1 1 , this is the reference note. For example G 6 has the fraction 11/2 with respect to C 4 . On the tonnetz it is represented on the axis n 11 , that starts from C on the upper-left. Similarly the axis n 13 is on the upper-right, the axis n 17 is on the right, the axis n 19 is above.
image: 10_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_pitch_3.png image: 11_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_tonnetz_3.png

7.4 Formula for pitch values

We have seen of the tunplot figures above that the pitch of notes differs slightly from the equal temperament shown by the vertical dashed lines. Here we explain how to compute the pitch corrections from the position of the note on the tonnetz.
Here is a table
1
Mathematically the pitch correction Δ x for a prime number p is Δ x={ 12 ln 2 ln p } where { x } for a given x R is { x } =x+k with k Z , such that { x } ]-0.5,0.5] . Example, { 12 ln 2 ln 3 } =0.01955..+0.02 , { 12 ln 2 ln 5 } =-0.136..-0.14 etc.
and we explain after how to use it with an example.
Axis
interval
Number of half-tone
pitch correction Δ x
in equal temperament
with respect to equal temperament
n 3
fifth
7
+0.02
n 5
major third
4
-0.14
n 7
minor seventh
10
-0.31
n 11
augmented fourth
6
-0.49
n 13
minor sixth
8
+0.40
n 17
half-tone
1
+0.05
n 19
minor third
3
-0.02
Consider the following example, called harmonic temperament later:
image: 12_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_pitch_harm_C.png image: 13_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_tonnetz_harm_C.png
In this example the reference note is C and his pitch is given by the equal temperament, i.e. x C 5 =60.00 . We see on netplot that E is a major third from C , so x E = x C +4-0.14 as can been observed on tunplot. Similarly we deduce the following table of pitchs for this “Harmonics scale”
Note
pitch (i.e. half-tones) w.r.t. C
C
0
D
1+0.05
D
2+0.02+0.02=2+0.04
E
3-0.02
E
4-0.14
F
5+0.02-0.31=5-0.29
G
6-0.49
G
7+0.02
A
8-0.14-0.14=8-0.28
A
9+0.40
B
10-0.31
B
11+0.02-0.14=11-0.12
What is important to remember is that:

7.5 Temperaments

There are an infinite number of rational numbers, so in practice if we use an instrument with 12 keys per octaves, we have to choose which frequencies to play. Such a choice of frequency for each key is called a temperament.

7.5.1 Fixed temperament

Watch a video.
If this choice is fixed, we say that we play with a fixed temperament. The program will allow to play with different fixed temperament, like the famous “Pythagorean temperament”, the “Zarlino temperament”, the “Harmonic temperament” etc.. but also on some fixed temperament build by the user. The advantage of fixed temperament is that some fixed “musical mode color” can be explored. The dis-advantage of fixed temperament is that not all the just intervals are available, and some intervals sometimes sound bad.
Zarlino temperament in C:
Here is the picture for available notes
image: 14_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_pitch_zarlino_C.png image: 15_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_tonnetz_zarlino_C.png
We observe on the tonnetz space that it is made with just fifths and just major thirds. On the pitch space, we observe that the temperament is the same on each octave range. One advantage of the Zarlino temperament is that we have just major triads chords like { C,E,G } , { Eb,G,Bb } . But beware that some other triads are not the usual just like: { E,Ab,B } or { Gb,Bb,Db } .
Harmonics temperament in C:
Here is the picture for available notes
image: 12_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_pitch_harm_C.png image: 13_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_tonnetz_harm_C.png
We observe on the tonnetz space and pitch space that it is made from the first few harmonics of C (up to harmonics 25).

7.5.2 Adaptative temperament

Watch video.
Adaptative temperament has been defined and proposed in the paper [1].
Instead of using a fixed temperament, it is also possible to adapt the frequency of some key to the present situation, depending on the notes that are played currently (or recently) and depending on some (deterministic) rules. We say that we play with adaptative temperament. The advantage of adaptative temperament is that all the just intervals may be available. The disadvantage is that the frequency associated to a key may change, and this can be a difficulty to the player. To overcome this difficulty this is very useful for the player to look at the available notes on the tonnetz space and on the pitch space.
Definition of the adaptative temperament:
Suppose that there is already a set of notes, i.e. a chord A that sounds. The adaptative temperament depends on this chord A . We have to choose how many keys per octave we want to be able to use. This is N oct =4,6,12 . Then the octave range is divided in N oct equal intervals and in each of these intervals, we choose the note that is the most consonant with the notes already present in the chord A (among the infinity of rational numbers in this interval).
More precisely we use the dissonance function d A ( n ) of a note n with respect to the chord A ={ n j ,j=1 N } made of N notes. d A ( n ) := j d( n j ,n ) where d( n j ,n ) = ln ( ab ) is the dissonance of the just interval f f j = a b made by the pair of notes n j ,n . (On the tonnetz d( n j ,n ) is just the L 1 distance). The resonance function is just the opposite R A ( n ) =- d A ( n ) .
Example 7.6. In this example, the chord is made of the only note A ={ C 5 } . We choose N oct =6 notes per octave. For this we are allowed to use only the keys C,D,E,F,G,A in each octave. On the first pitch space we represent a vertical bar at (almost) every rational number, i.e. possible new note n , and the hight of the bar is the resonance R A ( n ) =- d A ( n ) . Each octave is decomposed in N oct =6 equal intervals and the black lines is the selection in each interval that gives the highest bar, i.e. the most resonance note, with respect to A . This is the adaptative temperament with N oct =6 notes per octave, for the chord A ={ C 5 } . The other pictures are as above.
image: 16_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_pitch_adapt_C_2.png image: 17_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_tonnetz_adapt_C.png
image: 18_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_pitch_adapt_C.png
Observe that the temperament is not the same at each octave. We observe interestingly that the scale in octave 5 is the “blues scale”.
Example 7.7. In this example, the chord is made of four notes A ={ E 4 , G 4 , C 5 , E 6 } . We choose N oct =6 notes per octave.
image: 19_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_pitch_adapt_chord.png image: 20_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_tonnetz_adapt_chord.png
image: 21_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_pitch_adapt_chord_2.png
We observe that the adaptative temperament depends indeed on the chord A .

8 Some examples of just intervals, just chords and chord progressions

By definition of just chord is a set of notes such that each interval is a just interval. Hence a just chord is a set of notes displayed on the tonnetz.
For example a major triad is displayed as a triangle on the n 3 , n 5 axis with a right angle at the bottom left. Here is { C,E,G } :
image: 22_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_major_triad.png
For example a minor triad is displayed as a triangle on the n 3 , n 5 axis with a right angle at the top right. Here is { C,Eb,G } :
image: 23_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_minor_triad.png
For example a dominant seventh chord is displayed as a tetrahedron on the n 3 , n 5 , n 7 axis. Here is { C,E,G,Bb } :
image: 24_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_chord_CEGBb.png
In Section 7.1.2, we have seen there are different just minor thirds between harmonics 5-6 and 6-7 . Correspondingly there are different minor seventh chords. For example here is a first { C,Eb,G,Bb } :
image: 25_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_chord_CEbGBb_1.png
Here is a second non-equivalent { C,Eb,G,Bb } :
image: 26_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_chord_CEbGBb_2.png
Observations: the first { C,Eb,G,Bb } is composed of fifths and thirds. The second { C,Eb,G,Bb } is composed of fifths and minor sevenths. They sound very different (see the video).

8.1 Great cadence

See Video.

9 Advanced use of the plugin

9.1 Automation

Automation means that some parameter of the plugin can be recorded on a MIDI track and play after. For example a parameter can be the choice of 'temperament'.
This allows that a parameter evolves during the reading of a MIDI track.

9.2 Adaptative temperament with different N_keys and levels

9.3 Many musicians, how to use in session

We propose here a setup how to use the plugin(s) in a session with many musicians (here Bo and Malik).
We propose as seen on the picture below,
image: 27_home_faure_c++_musique_JUCE_fred_Tonnetz_doc_figures_system2.png
Details on midi connections:

A EWI

A.1 EWI USB

web page

A.2 EWI 5000

Ewi 5000 is a MIDI saxophone.
Manual

A.2.1 Configuration with the software EWI5000

A.2.2 Configuration (once for ever)

The program tonnetz uses bite events from EWI5000. You have to configure the EWI5000 as follows, (see page 17,18 of the manual for details)
  1. Configure the bite sensor:
    1. No Filter, No Pitch bend, no Breath sensor
    2. But CC enabled: En with a dot, Cn is 20 (= x14), nb is 0 and bt is 27.
    As a result, the bite event will send a midi message: 0 x B0+ch,0 x 14,v where 0v127 is the value.

A.2.3 Midi messages

EWI5000 sends the following messages (given here in hexa):

References

1F Faure, M. Mezzadri, and F. Ratchov, "Analyse et jeu musical en tempérament juste adaptatif", https://hal.archives-ouvertes.fr/hal-01119499link (2015).