# Home

The Tonal Interval Space is an extended type of pitch space that represents human perceptions of pitches, chords and keys as well as music theory principles as distances. Multi-level pitch configurations are represented in the space as 12-dimentional Tonal Interval Vectors (TIVs). Inspired by Euler's Tonnetz,* *Chew’s Spiral Array, and Harte et al.'s 6-dimensional* *Tonal Centroid Space, the Tonal Interval Space refines the intervallic relations of the above-mentioned spaces by an increased numbers of dimensions.

It was proposed in 2015 by Gilberto Bernardes et al. (INESC TEC) in (Bernardes et al., 2015) and extensively described in (Bernardes et al., 2016a). Since then it has been applied to various problems in music theory and practice, such as key finding from symbolic music notation and musical audio (Bernardes et al., 2016b), generation of harmonic progressions (Bernardes et al, 2015, Navarro et al., 2015), harmonisation of user-given melodies (Bernardes et al., 2016b), and as a control surface for a consonance-based MIDI keyboard pedal.

**Figure 1.** C major chord (pitch classes [0, 4, 7]) representation (red square) in all DFT components or intervallic relation of the Tonal Interval Space.

**Figure 2.** C major chord (pitch classes [0, 4, 7]) representation (red square) in all DFT components or intervallic relation of the Tonal Interval Space and the rotation of its TIV to transpose it one semitone higher (i.e. pitch classes [1, 5, 8].

**Figure 3.** Illustration of the diatonic triads of the C major region (or key) using non metric multidimensional scaling. Riemann's tonic, subdominant and dominant harmonic categories are well represented in the space. Dashed lines indicate typical progressions across these categories.

## Equations for Pitch, Chord and Key Representations

Mathematically, multi-level pitch configuration are represented in the Tonal Interval Space by TIVs *T(k), *calculated as as the DFT of the chroma vector *c(n)* as follows:

where *N=12* is the dimension of the chroma vector and *w(k)=*{2, 11, 17, 16, 19, 7} are weights derived from empirical consonance ratings of dyads used to adjust the contribution of each dimension *k* of the space. We set *k* to *1 ≤ k ≤ 6* for *T(k)*, since the remaining coefficients are symmetric.

*T(k) *uses* * *c̄(n)* which is *c(n)* normalised by the DC component to allow the representation and comparison of different hierarchical levels of tonal pitch. From the point of view of Fourier analysis, *T(k)* is interpreted as a sequence of complex numbers, which we can visualize in Figure 1 as six circles, each corresponding to a complex conjugate. A musical interpretation relates each DFT component to complementary interval dyads within an octave (m2/M7 has the real part of *𝑇(1)* on the *x *axis and the imaginary part of *𝑇(1)* on the *y *axis and so on). The musical interpretation assigned to each coefficient corresponds to the musical interval that is furthest from the origin of the plane. The integers around each circle represent 0 ≤ 𝑛 ≤ 𝑁 − 1 for *N *= 12, corresponding to the positions in the chroma vector *c(n)*.

## Musical Properties of the Tonal Interval Space

### Multi-pitch Configurations as Convex Combination of TIVs

TIVs of multi-pitch configurations equal the convex combination of its component TIV pitch classes. Geometrically, a convex combination always lies within the region bounded by the elements being combined. Figure 1 illustrates the C major chord as a convex combination of its component {0, 4, 7} pitch classes.

### Tonnetz-based Representation

The Tonal Interval Space inherits the pitch organization of the Tonnetz by wrapping its planar representation into a toroid. The proximity of dyads in the Tonal Interval Space, using both the angular and Euclidean distances, are ranked in a similar order of proximity as in the Tonnetz (i.e., unisons, perfect fourths/fifth, minor thirds/major sixths, major thirds/minor sixth, tritone, major second/minor seventh, and finally, minor second/major seventh). The same property applies to multi-pitch configurations as their TIVs result from a convex combination of their component pitch classes. Contrary to the Tonnetz, the Tonal Interval Space represents harmonic information in a single octave by invoking enharmonic equivalence. Therefore, there is no information about pitch height encoded in both *c(n)* or *T(k).*

### Overlapping Areas as a Strategy for Modulation

Chords common to more than one region or key are typically used to smoothly transition between them. In the Tonal Interval Space, these chords, commonly referred to as pivot chords, are located at overlapping areas across the several regions to which they belong. This property allow to effortlessly transition or modulate between keys as explored in Bernardes et al. (2015).

### Voice Leading Parsimony

Motions between adjacent multi-level pitch configurations in the Tonal Interval Space indicate chord progressions that maximize the number of common tones. In other words, close multi-pitch configurations indicate a minimal (temporal) displacement per voice (known as voice-leading parsimony). As such, the Tonal Interval Space shows great potential to explore voice-leading parsimony and other formal transformations that have been derived from Riemann's harmonic theory.

### Harmonic Categories Groupings

The set diatonic chords of a given region or key surround its key TIV in roughly equal angular distances. The placement of the diatonic chord is organized according to Riemman’s categorical harmonic functions (i.e. tonic, subdominant, and dominant harmonic categories). For example the diatonic chords of the I, iii, and vi degrees which all belong to the harmonic category of the tonic are close adjacent in the circular representation of chords. For a comprehensive explanation of the angular distance between key TIVs and their diatonic chordal set and an application of this property to generate musical harmony and estimate the key of a musical input please refer to Bernardes et al. (2015).

### Transposition Invariance

Transposing a pitch configuration by a number of semitones in the Tonal Interval Space corresponds to rotations of *T(k)*. Hence, the transposition of any TIV results in vectors with the same magnitude (or the same distance from the center). This property is an important feature of Western tonal music arising from 12 tone equal-tempered tuning in the sense it accords with Western listeners perception of interval relations n different regions as analogous (Deutsch, 1984). For example, the intervals from C to G in C major and from C# to G# in C# major are perceived as equivalent.

### Consonance

One of the most innovative aspects of the Tonal Interval Space in comparison to related spaces is the possibility to compute indicators of tonal consonance for multi-level pitch configurations as the norm of *T(k)*, or the Euclidean distance of *T*_{1}*(k)* from the center, such that:

Due to the symmetry of the Tonal Interval Space, complementary intervals and transposition share the same level of consonant.

### Perceptual Proximity

Algebraic objective measures capture perceptual features of the pitch sets represented by the TIVs in the Tonal Interval Space. Specifically, Euclidean and angular distances among multi-level equate with the human perceptions of pitches, chords and keys as well as tonal Western music theory principles. Mathematically, the Euclidean and angular distances between two vectors *T*_{1}*(k)* and *T*_{2}*(k)* are computed as:

**References**

Bernardes, G., Davies, M., & Guedes, C. (2017). Automatic Musical Key Estimation with mode Bias. Proceedings of the International Conference on Acoustics, Speech, and Signal Processing (ICASSP).

Bernardes, G., Cocharro, D., Caetano, M., Guedes, C., Davies, M.E.P. (2016a). A Multi-Level Tonal Interval Space for Modelling Pitch Relatedness and Musical Consonance. Journal of New Music Research. DOI: 10.1080/09298215.2016.1182192.

Bernardes, G., Cocharro, D., Guedes, C., Davies, M.E.P. (2016b). Harmony Generation Driven by a Perceptually Motivated Tonal Interval Space. *ACM Computers in Entertainment, 14*(3).

Bernardes, G. & Davies, M. (2016c). Audio Key Finding in the Tonal Interval Space. Submission to the Music Information Retrieval Evaluation eXchange (MIREX) — Audio Key Detection.

Bernardes, G., Cocharro, D., Guedes, C., & Davies, M.E.P. (2015). Conchord: An Application for Generating Musical Harmony by Navigating in a Perceptually Motivated Tonal Interval Space. *Proceedings of the 11th International Symposium on Computer Music Modeling and Retrieval (CMMR)*, (pp. 71-86). Plymouth, UK.

Chew, E. (2000). *Towards a Mathematical Model of Tonality*. Ph.D. dissertation, MIT.

Deutsch, D. (1984). Two Issues Concerning Tonal Hierarchies: Comment on Castellano, Bharuch, and Krumhansl. *Journal of Experimental Psychology: General*, *113*(3): 413-416.

Euler, L. (1739). *Tentamen novae theoriae musicae*. St. Petersburg. New York: Broude, 1968.

Harte, C., Sandler, M., & Gasser, M. (2006). Detecting Harmonic Change in MusicalAudio. In *Proceedings of the 1st ACM Workshop on Audio and Music Computing Multimedia *(pp. 21-26). New York: ACM.

Navarro, M., Caetano, M., Bernardes, G., de Castro, L. N., & Corchado, J. M. (2015). Automatic Generation of Chord Progressions with an Artificial Immune System. In Evolutionary and Biologically Inspired Music, Sound, Art and Design (pp. 175-186). Springer International Publishing. DOI: 10.1007/978-3-319-16498-4_16

Sioros, G. & Bernardes, G. (2016). The Sostenante Pedal: A Novel Pedal for MIDI Keyboards. Porto International Conference on Musical Gesture as Creative Interface.