r0colita / AutoAnalysis

An automated musical analysis tool for musicians and conductors.
1 stars 0 forks source link

Design algorithm for modulation stages #5

Open r0colita opened 3 months ago

r0colita commented 3 months ago

Three stages of modulation

1. The establishment of the key

Needs to follow principles in Piston (Chapter 5)

2. The pivot chord

A.K.A a chord which is common to both keys (where a double analysis is given). The most logical chord will be one that has a simple function in both keys. This means that the pivot chord should not be the dominant of the second key, because that chord would normally not be a fundamental chord in the first key

3. The establishment of a new key.

This analysis needs a test case where the harmonic outline is simple such as Mozart's Sonata Facile.

Music21 elements you can use in the detect_modulations algorithm:

interval.transposePitch romanNumeral.pivotchord Chord.canBeDominantV() analysis.floatingKey

r0colita commented 2 months ago

When the algorithm detects an incomplete triad, it analyzes it as Root+3rd and not as 3rd+5th, which in the first measures of the Razumovsky quartet test case is returning an A chord when clearly it sounds F majorish. Those are edge cases that need to be taken into account.