Abstract
Current deep-learning music generation systems often operate as "black boxes," offering limited control over the emotional or narrative arc of the output. This paper introduces a Variational Autoencoder (VAE) architecture that integrates tonal tension measures—specifically Cloud Diameter and Tensile Strain—directly into the latent space. By optimizing for a specialized tension loss, the model allows users to manipulate the harmonic "stress" of a musical seed through simple latent vector arithmetic. Our results show that this approach successfully disentangles pitch and rhythm, enabling fine-grained control over musical tension without compromising the underlying structure of the composition.
Introduction
While AI-generated music has reached high levels of technical proficiency, it frequently lacks the intentionality required for professional applications like film or game scoring. Composers need high-level "knobs" to dial tension up or down to match narrative beats. This research addresses the challenge of controllability by providing a high-level interface for tonal tension, allowing for the modification of harmonic stress while preserving rhythmic identity.
Methods
The proposed system utilizes a VAE architecture with Gated Recurrent Units (GRUs) to process sequential musical data. The encoder maps 4-bar piano roll fragments into a latent space $Z$, while the decoder reconstructs the melody, bass, and tension parameters.
The core innovation is the inclusion of a tension loss based on Spiral Array Tension theory:
- Cloud Diameter: Quantifies dissonance by measuring the "tonal closeness" of notes in a 3D geometric model. Larger diameters indicate more clashing notes.
- Tensile Strain: Measures the distance between active notes and the "center of gravity" of the musical key, capturing the feeling of pulling away from a stable tonal home.
Datasets and Preprocessing
The model was trained on 7,289 MIDI files from the LMD-matched dataset, filtered for the "pop" genre. Using the Midi-Miner tool, the researchers extracted melody and bass tracks, transposing all songs to C major or A minor to standardize the tonal space. The final dataset comprised 44,900 four-bar fragments, represented as 64x89 piano rolls.
Key Insights
- Disentanglement of Pitch and Rhythm: Manipulating tensile strain primarily affects harmony and pitch, leaving rhythm largely intact. Conversely, increasing cloud diameter (dissonance) often leads the model to increase note density, affecting the rhythmic feel.
- Harmonic Understanding: Incorporating tensile strain into training improved the reconstruction of bass lines, suggesting that tension awareness helps the model better grasp fundamental harmonic structures.
- Linear Manipulation: Complex musical transformations, such as creating an "arch-shaped" tension profile, can be achieved through simple linear manipulation of identified latent vectors in the latent space.
Key Results
The researchers successfully identified four control vectors: tensile_strain_direction, tensile_strain_level, cloud_diameter_direction, and cloud_diameter_level. Quantitative analysis confirmed that the model maintains high reconstruction accuracy while accurately predicting tension measures (MSE of 0.0454 for tensile strain).
Qualitatively, the model demonstrates a clear ability to shift the musical "vibe." For instance, applying a "tensile strain upward" vector over a 4-bar sequence shifts the pitch distribution from stable anchor notes toward more tense intervals in the latter half of the fragment.
Limitations and Future Work
The current model is restricted to 4-bar fragments and focuses solely on tonal tension. Future work aims to extend the model to handle longer-term global structures and incorporate other tension drivers such as timbre, dynamics, and tempo. The ultimate goal is an interactive tool where composers can "draw" tension curves to guide the generative process.
Summary updated