## 2 Theoretical Background About Chord Progressions  
### Tonal Interval Space  
The representation used to encode the notes plays an important role in the automatic generation of chord progressions. Representations where neighborhood relations among the notes reflect perceptual or music theory properties can be particularly useful, such as space where chords that are close together generate better transitions than chords that are farther apart. There have been proposals to organize the musical notes in geometrical spaces according to musical intervals and other musical properties. In these spaces, geometrical properties such as neighborhood reflect musical properties such as perceptual relatedness. The Tonnetz [31] is an early example of such a geometrical representation of the properties of the tonal system because small distances reflect close harmonic relations. Later, [PERSON] [32] proposed a three-dimensional helix model to represent tonal pitch relationships. [PERSON] et al. [33] mapped 12-bin chroma vectors to the interior of a six-dimensional polytope where close harmonic relations appear as small distances. [PERSON] et al. [13] extended the latter space, toward better adapted perceptual pitch relations by computing all kind of intervals as the weighted discrete Fourier transform (DFT) of chroma vectors. In the Tonal Interval Space (TIS) [13], distances among multi-level pitch configurations capture perceptual relatedness and magnitudes indicate consonance. In this work, we propose to use the TIS [13] to represent multi-level pitch configurations such as pitch classes, intervals, chords, and keys because geometrical properties of the space are related to perceptual and musical properties. Tonal interval space has been used in several works with successful results [13; 18; 24]. Consequently, we decided to make use of this space to capture musical properties.  
One of the most important properties of the TIS is that distances among different pitch configurations represented by their TIV reflect musical attributes. The Euclidean distance between two TIV of two different pitch configuration, \(T_{1}\left(k\right)\) and \(T_{2}\left(k\right)\) is given by  
\[\rho\left(T_{1},T_{2}\right)=\sqrt{\sum_{k=1}^{M}|T_{1}\left(k\right)-T_{2} \left(k\right)|^{2}}. \tag{1}\]  
Perceptually, similar vectors result in smaller distances than dissimilar ones.  
Another mathematical measure that captures musical properties and is used in the present work is the inner product between \(T_{1}\left(k\right)\) and \(T_{2}\left(k\right)\), given by:  
\[T_{1}\cdot T_{2}=\sum_{k=1}^{M}T_{1}\left(k\right)\overline{T_{2}\left(k \right)}, \tag{2}\]  
where \(\overline{T_{2}\left(k\right)}\) is the complex conjugate of \(T_{2}\left(k\right)\). Equation (2) yields higher values for perceptually similar vectors than dissimilar ones. The angle \(\theta\) between \(T_{1}\) and \(T_{2}\) can be calculated from Equation (2) as  
\[\theta(T_{1},T_{2})=\arccos\left(\frac{T_{1}\cdot T_{2}}{\|T_{1}\|\|T_{2}\|} \right), \tag{3}\]  
where \(\|T_{1}\|\) denotes the magnitude of \(T_{1}\) calculated as the distance \(\rho\left(T_{1},T_{0}\right)\) between \(T_{1}\) and the center of the space \(T_{0}\) using Equation (1). Equation (3) results in smaller angles to indicate a higher degree of similarity.  
Equations (1)-(3) can be used to compute distances between pitch configurations of the same level (e.g., the distance between two chords) or across levels (e.g., the distance between a chord and a key). For example, the distance between two chords captures their tonal relatedness, the distance between a chord and a key measures the level of membership of the chord to the key, and the distance of a given chord to the three categorical harmonic functions (represented in the space as the triads of the tonic, subdominant and dominant degrees) measures how well the chord fits the categorical harmonic functions. All these properties are used in the proposed measure (Section 4) to capture the suitability of the chord in the context of a progression.