Tonal Interval Vector (TIV) Overview
- Tonal Interval Vector (TIV) is a 6-dimensional complex DFT representation of a normalized 12-bin chroma profile that captures both harmonic quality (via magnitude) and tonal position (via phase).
- It employs L1-normalization and fixed perceptual weights to ensure energy invariance and to highlight consonance, enabling robust key estimation, harmonic mixing, and tension modeling.
- TIV supports diverse music information retrieval tasks such as chord recognition, cover song detection, and audio visualization by linking geometric transposition with tonal similarity.
The Tonal Interval Vector (TIV) is a perceptually weighted, -normalized DFT representation of 12-bin chroma that maps audio-derived or symbolic pitch-class profiles into a 6-dimensional complex tonal space. In the formulation underlying TIV.lib, it is presented as the core representation for the tonal description of musical audio, with magnitudes describing the intervallic/harmonic quality of a sonority and phases describing its tonal position, including transposition and key-region information (Ramires et al., 2020). Across the cited literature, TIV functions as a compact, continuous, and musically interpretable representation that can support local and global tonal description, similarity computation, key estimation, harmonic mixing, visualization, and tension modeling without requiring full audio-to-symbolic transcription (Ramires et al., 2020).
1. Formal definition and representational basis
In the cited formulation, TIV is obtained by taking a 12-dimensional chroma or pitch-class profile and mapping it into the first six non-redundant coefficients of the Discrete Fourier Transform. The direct input is not raw audio itself, but a 12-element chroma vector , also referred to as a pitch profile. The library is explicitly agnostic to the exact chroma extraction method; examples mentioned include PCP, HPCP, CRP chroma, and NNLS chroma (Ramires et al., 2020).
The mathematical definition is given as
with , , and perceptual weights
Because the DFT of a real 12-dimensional vector is symmetric, the remaining coefficients are redundant. The resulting TIV is therefore a 6-element complex vector (Ramires et al., 2020).
Two ingredients are emphasized. First, -normalization makes the representation independent of overall energy and allows “hierarchical or multi-level pitch” representation. Second, weighting by perceptual consonance is intended to align the space with empirical consonance/dissonance judgments and to reflect the harmonic structure of orchestral-instrument spectra (Ramires et al., 2020).
The cited papers describe this construction as an extension of earlier music-theoretic work on the DFT of pitch profiles into the audio and MIR domain. In that framing, TIV is not merely another chroma transform. It is a tonal feature space in which the full complex representation preserves the DFT’s bijective relation with the original normalized pitch profile, so that a variable-density pitch profile has a unique location in TIV space (Ramires et al., 2020).
2. Magnitude, phase, and tonal geometry
The representation is decomposed into magnitude and phase:
and
The magnitude vector is denoted TIV.mag, and the phase vector TIV.phases. The cited interpretation is explicit: magnitude = harmonic quality / interval content, whereas phase = tonal region / transposition / harmonic proximity (Ramires et al., 2020).
A central geometric property is that transposition corresponds to rotation in the complex plane. A transposition of a pitch profile by semitones rotates coefficient 0 by
1
This preserves magnitude while changing phase. As a consequence, TIV.mag is invariant under transposition or inversion, whereas the full complex TIV remains unique because phase information is retained (Ramires et al., 2020).
The cited literature assigns approximate intervallic interpretations to the six coefficient magnitudes:
| Coefficient magnitude | Approximate interpretation |
|---|---|
| 2 | chromaticity |
| 3 | dyadicity |
| 4 | triadicity |
| 5 | diminished quality |
| 6 | diatonicity |
| 7 | whole-toneness |
A more general interpretation is also given: a large magnitude in 8 indicates that the pitch profile can be divided evenly by 9. Since 0, different values of 1 emphasize different regularities in the pitch-class circle. In more specific tonal terms, 2 tracks concentration around a location in the chromatic circle, 3 tracks concentration in the circle of fifths, and 4 captures alignment with one of the two whole-tone collections (Ramires et al., 2020).
The geometric reading extends beyond isolated sonorities. The cited account attributes to TIV space several properties: bijectivity and uniqueness, transposition as rotation, magnitude invariance, tonal similarity and mixing through angular comparison, voice-leading and regional proximity through Euclidean geometry, key-region clustering in phase structure, and a consonance/dissonance structure induced by the weighting scheme (Ramires et al., 2020). A plausible implication is that the usefulness of TIV depends precisely on preserving the complex coefficients rather than discarding phase.
3. Descriptors, metrics, and operations in TIV space
The cited work presents TIV not only as a representation, but also as the basis of a family of descriptors and metrics. Two basic comparison functions are defined. The Euclidean distance
5
is associated with local geometric closeness, melodic or “horizontal” relations, and Tonnetz-like neighboring relations. The cosine similarity
6
is used as an angular comparison measuring how well pitch profiles “fit” together, including tonal proximity and harmonic mixing (Ramires et al., 2020).
A practically important operation is linear combination. For two TIVs 7 and 8 with energies 9 and 0, the mixture is
1
The cited account states that the energies are retrieved from the discarded DC components. This linearity is presented as important for harmonic mixing and for efficient retrieval from large datasets (Ramires et al., 2020).
Several scalar descriptors are defined from specific coefficients. TIV.chromaticity is
2
with range 3, and is interpreted as concentration in a specific region of the chromatic circle. TIV.diatonicity is
4
also in 5, and indicates stronger concentration in the circle of fifths. TIV.whole-toneness is
6
again in 7, and measures proximity to one of the two whole-tone collections in 12-TET (Ramires et al., 2020).
The cited paper also defines TIV.hchange, a harmonic change detection function,
8
whose peaks indicate transitions between harmonically stable regions. TIV.diss is given as
9
in a coefficient-wise form. The cited discussion explicitly notes that this expression appears to define dissonance per coefficient or dimension rather than as one single scalar unless further aggregated externally (Ramires et al., 2020).
For key estimation, the cited formulation computes Euclidean distance between an input TIV and a bank of 24 key-profile TIVs derived from major and minor templates:
0
The index 1 corresponds to major keys and 2 to minor keys. The recommended bias values are 3 for Temperley profiles and 4 for Sha’ath profiles. The output integer encodes tonic and mode, from 5 C major to 6 B minor (Ramires et al., 2020).
4. Input assumptions, time scale, and multilevel operation
The workflow described for audio-domain TIV is explicit: start with musical audio, compute a time series of 12-bin chroma/pitch-class vectors, and feed each chroma frame, or an average over frames, into the TIV transform. The package includes tutorial examples for HPCP extraction using Essentia and Librosa, but the library itself expects the chroma representation as input (Ramires et al., 2020).
A central caveat is that the choice of chroma representation affects the TIV space. The cited recommendation is to use the “cleanest” chroma possible, meaning one closest to a symbolic pitch-class representation. This makes TIV dependent on upstream chroma quality and places part of the interpretive burden on the front-end representation (Ramires et al., 2020).
The same transform supports both instantaneous/local and global/aggregated analysis. For instantaneous TIVs, a single chroma frame is used. For global TIVs, consecutive chroma vectors are averaged over time before TIV computation. The cited work therefore presents TIV as a multi-level tonal representation, capable of describing a local harmonic state, a segment-level profile, or the tonal summary of a larger passage (Ramires et al., 2020).
A closely related symbolic-MIDI workflow appears in the visualization literature. A real-time web application computes, for each sliding window, a 12-dimensional pitch-class count vector, normalizes it with the 7 norm, and maps it under the Fourier transform; the result is interpreted through the six complex coefficients 8 to 9 (Harasim et al., 2022). That paper does not explicitly use the term “Tonal Interval Vector,” but it is described as operationally corresponding closely to the canonical TIV framework. It emphasizes that normalization ensures the coefficients lie inside the unit circle, and it treats magnitude and phase as musically distinct quantities: magnitude as the strength of the tonal property, and phase as the transpositional or functional orientation (Harasim et al., 2022).
This convergence between audio-domain and symbolic-domain practice suggests that TIV is best understood as a pitch-class-domain formalism rather than a modality-specific feature. The cited literature consistently places the chroma or pitch-class vector, not the raw signal format, at the immediate input to the transform.
5. Implementations, visualization systems, and downstream applications
The principal implementation described in the cited corpus is TIV.lib, an open-source, cross-platform library implemented in Python and Pure Data for both offline and online/real-time usage (Ramires et al., 2020). The Python version targets batch offline processing and depends only on NumPy and SciPy. The Pure Data version is oriented to online/live processing, though it can also perform offline computation. Example usage in Python follows the pattern of creating a TIV object from a pitch-class profile and then calling methods such as wholetoneness(), diatonicity(), and chromaticity() (Ramires et al., 2020).
A distinct implementation trajectory appears in midiVERTO, a web application that visualizes DFT coefficients of pitch-class content in real time. Its contribution is not new TIV mathematics but a visualization framework based on unit disks in the complex plane, phase as color, magnitude as opacity, coefficient-space trajectories, and hierarchical wavescapes (Harasim et al., 2022). The cited case study on Phantom of the Opera interprets coefficient 0 in relation to augmented-triad and hexatonic organization, and coefficient 1 in relation to diatonic scales and key motion (Harasim et al., 2022). This visualization-oriented work is presented as being in the same representational family as TIV, but with different vocabulary and emphasis.
The application range described for TIV in MIR includes chord recognition, key estimation, query-by-humming, cover song detection, nearest-neighbor retrieval over large audio collections, harmonic mixing, and mashup creation (Ramires et al., 2020). The cited paper also refers to prior evaluations in key recognition and harmonic mixing, and mentions Musikverb, a harmonically adaptive reverberation effect, as a creative application (Ramires et al., 2020).
A later symbolic-generation paper uses TIV as the core representation for an explicit notion of tonal tension. In that system, TIV-derived measures of Tonal Distance, Tonal Dissonance, and Voice Leading are combined into a weighted tension value, with dissonance and voice leading scaled by 30.3 and 2.71 respectively (Ebrahimzadeh et al., 24 Nov 2025). Tension is aggregated as the average tonal tension for all completed bars, forming a candidate tension curve that is used for bar-level re-ranking in a dual-level beam search. The cited results report Tension Correlation values of 0.16 for a baseline without tension control, 0.18 for a baseline with a tension token, 0.50 for “Dual Beam 1,” 0.48 for “Dual Beam 2,” 0.45 for “Dual Beam 3,” and 0.42 for a 16-bar Dual Beam 1 condition (Ebrahimzadeh et al., 24 Nov 2025). The paper’s argument for TIV in this setting is that it is computationally efficient, captures multilevel pitch configurations, and reflects chord similarity and perceptual harmonic relationships (Ebrahimzadeh et al., 24 Nov 2025).
6. Scope, limitations, and interpretive cautions
Several limitations and assumptions are explicit in the cited literature. First, TIV is dependent on the quality of the upstream chroma extraction. Different representations such as HPCP, NNLS chroma, or timbre-invariant chroma may affect behavior, and this is explicitly identified as future work (Ramires et al., 2020). Second, the framework is described as equal-tempered and enharmonic, built around the 12-tone chromatic pitch-class system of Western tonal music (Ramires et al., 2020).
Third, the perceptual weights 2 are fixed in the library and are not claimed to be universally optimal. They are derived from empirical consonance ratings and adjusted with assumptions about average orchestral spectra, with future work proposed on source-dependent optimal weights (Ramires et al., 2020). Fourth, because TIV starts from chroma or pitch-class abstraction, it collapses octave information and emphasizes pitch class rather than pitch height (Ramires et al., 2020).
The cited literature also cautions against terminological overextension. The visualization paper (Harasim et al., 2022) does not explicitly use the term Tonal Interval Vector; it speaks instead of the DFT of pitch-class content and the trajectories of Fourier coefficients. The relationship is described as one of close correspondence rather than strict identity. This suggests that TIV should be understood both as a specific MIR formalization and as part of a broader DFT-on-pitch-classes tradition.
A further caution concerns descriptor interpretation. The dissonance expression 3 is given in a compact coefficient-wise form, and the cited discussion explicitly notes that the precise aggregation behavior requires careful reading of the implementation (Ramires et al., 2020). Likewise, the symbolic-generation application notes a key imbalance in the dataset and does not claim explicit transposition invariance in its implementation, even though TIV as a representation supports musically relative comparison through its complex geometry (Ebrahimzadeh et al., 24 Nov 2025).
Taken together, the cited literature presents TIV as a representation in which magnitude encodes intervallic and harmonic quality, phase encodes transposition and tonal region, geometry supports similarity and key relations, and the same transform can be deployed at local, segmental, and global scales. Its principal significance lies in unifying tonal description, perceptual weighting, and computational tractability within a single complex pitch-class-domain formalism (Ramires et al., 2020).