10.1.8.2. MusicTheory

10.1.8.2.1. String Vibration

There are four physical quantities involved in the string vibration phenomenon :

  • the frequency \(f\) of dimension \(s^{-1}\),
  • the linear density \(\mu\) of the string of dimension \(kg \cdot m^{-1}\),
  • the tension \(T\) applied to the string of dimension \(kg \cdot m \cdot s^{-2}\),
  • the length \(L\) of the string of dimension \(m\).

According to the Vaschy-Buckingham theorem, we can build a dimensionless constant:

\[\alpha = \frac{T}{\mu L^2 f^2}\]

and thus

\[f = \frac{\beta}{L} \sqrt{\frac{T}{\mu}}\]

where \(\beta\) is a dimensionless constant.

In reality, the vibration of a string corresponds to the superposition of standing waves of frequencies:

\[f_n = \frac{n}{2L} \sqrt{\frac{T}{\mu}}\]

where \(n\) is an integer greater than 0.

This series of frequencies is called an harmonic series. The first one is called fundamental frequency, \(n=1\), and the others overtones.

We can notice from this formulae:

  • the shorter the string, the higher the frequency of the fundamental,
  • the higher the tension, the higher the frequency of the fundamental,
  • the lighter the string, the higher the frequency of the fundamental.

10.1.8.2.2. Octave and Fifth

Let be a string of length L with a movable bridge. We denote \(f_0\) the fundamental frequency of the string.

  • If we place the mobile bridge at the middle of the string, \(L/2\), the string fundamental will now ring at \(f_8 = 2 \times f_0\), thus at the higher octave of \(f_0\).
  • If we place the mobile bridge at \(2/3 L\), which is the next simpler subdivision of the string, the larger string part will ring at \(f_5 = \frac{3}{2} \times f_0\), thus at the higher perfect fifth of \(f_0\).

We define the fourth as the ratio of \(f_4 = f_8 / f_5 = \frac{4}{3}\), which is the complement to the fifth to match the octave.

class Musica.Math.MusicTheory.AdditionModuloGroup(modulo)[source]

Bases: object

Group of Addition Modulo a Positive Integer

Group Definition

A group is a set, G, together with an operation • (called the group law of G) that combines any two elements a and b to form another element, denoted a • b or ab. To qualify as a group, the set and operation, (G, •), must satisfy four requirements known as the group axioms:

Closure
For all a, b in G, the result of the operation, a • b, is also in G.
Associativity
For all a, b and c in G, (a • b) • c = a • (b • c).
Identity element
There exists an element e in G such that, for every element a in G, the equation e • a = a • e = a holds. Such an element is unique.
Inverse element
For each a in G, there exists an element b in G, commonly denoted a−1 (or −a, if the operation is denoted “+”), such that a • b = b • a = e, where e is the identity element.

Subgroup

H is a subgroup of G if the restriction of • to H × H is a group operation on H. This is usually denoted H ≤ G, read as “H is a subgroup of G”.

operation(a, b)[source]
cayley_table
modulo
class Musica.Math.MusicTheory.Cent(cent)[source]

Bases: object

__eq__(other)[source]
__float__()[source]
__lt__(other)[source]
classmethod from_frequency(frequency1, frequency2)[source]
classmethod from_frequency_ratio(frequency_ratio)[source]
to_frequency(frequency)[source]
__hash__ = None
cent
class Musica.Math.MusicTheory.ET12GroupSingleton[source]

Bases: Musica.Math.MusicTheory.AdditionModuloGroup

subgroups
class Musica.Math.MusicTheory.EqualTemperamentPitch(step_number, number_of_steps)[source]

Bases: object

__float__()[source]
__lt__(other)[source]
cent
number_of_steps
step_number
class Musica.Math.MusicTheory.EqualTemperamentTuning(number_of_steps, fifth_step_number)[source]

Bases: object

__getitem__(i)[source]
__iter__()[source]
__len__()[source]
_fifth_series(number_of_iterations)[source]
static fifth_approximations(number_of_steps_max=20)[source]

Compute the best perfect fifth approximations having the form \(2^{i/j}\).

12-TET is based on \(2^{7/12} \approx 1.498\) versus 1.5 for the perfect fifth.

fifth
fifth_series

Return the complete fifth series up to the 7th octave.

(7, 2, 9, 4, 11, 6, 1, 8, 3, 10, 5, 0) (G, D, A, E, B F#, C#, G#, D#, Bb, F, C) (Sol, Ré, La, Mi, Si, Fa#, Do#, Sol#, Ré#, Sib, Fa, Do)

fifth_series_for_major_scale

Return the fifth series that constitute the major scale.

(7, 2, 9, 4, 11) (G, D, A, E, B ) (Sol, Ré, La, Mi, Si)

and sorted

(2, 4, 7, 9, 11) (D, E, G, A, B) (Ré, Mi, Sol, La, Si)

Note the 6th fifth 6 / F#, is substituted by the fourth 5 / F since the major scale is made of 7 notes, the first note, the fifth, the fourth, and 4 fifths to complete the set.

first_pitch
fourth

Return the fourth (F / Fa) which is the inversion of the fifth to the octave (5 = 12 - 7).

group
major_scale

Return the major scale.

The major scale is made of 7 notes, the first note, the fifth, the fourth, and 4 fifths to complete the set.

(0, 2, 4, 5, 7, 9, 11) (C, D, E, F, G, A, B) (Do, Ré, Mi, Fa, Sol, La, Si)

number_of_steps
perfect_steps
class Musica.Math.MusicTheory.Frequency(frequency)[source]

Bases: object

__eq__(other)[source]
__float__()[source]
__lt__(other)[source]
__truediv__(other)[source]
__hash__ = None
frequency
period
pulsation
class Musica.Math.MusicTheory.FrequencyRatio[source]

Bases: object

et12 = 1.0594630943592953
fifth = 1.5
fourth = 1.3333333333333333
octave = 2
unisson = 1
class Musica.Math.MusicTheory.PythagoreanFifth(numerator_power, denominator_power)[source]

Bases: Musica.Math.MusicTheory.PythagoreanPitch

__truediv__(other)[source]
denominator
numerator
class Musica.Math.MusicTheory.PythagoreanFourth(numerator_power, denominator_power)[source]

Bases: Musica.Math.MusicTheory.PythagoreanPitch

denominator
numerator
class Musica.Math.MusicTheory.PythagoreanPitch(numerator_power, denominator_power)[source]

Bases: object

__float__()[source]
__lt__(other)[source]
cent
denominator_power
numerator_power
class Musica.Math.MusicTheory.PythagoreanTuningSingleton[source]

Bases: object

__getitem__(i)[source]
__iter__()[source]
__len__()[source]
static add_fourths(fifth_series)[source]
static generate_fifth_series()[source]
wolf_interval