Abstract
Music style transfer, specifically timbre transfer, remains a challenging task due to the difficulty of disentangling pitch from instrument identity. This paper introduces a self-supervised framework based on a Vector-Quantized Variational Autoencoder (VQ-VAE) that achieves one-shot timbre transfer. By utilizing a discrete bottleneck for content and a continuous encoder for style, the model learns to reconstruct audio from unseen instruments using only a short reference snippet. Our evaluation shows significant improvements in spectral distance and timbre similarity compared to existing baselines.
Introduction
In the domain of computer vision, style transfer is a well-established technique. However, in music, "timbre transfer"—the process of changing the instrument of a recording while preserving its melodic content—presents unique challenges. Most high-quality models are "many-to-one," requiring extensive training data for every new target instrument. This research addresses the problem of one-shot timbre transfer, enabling a model to mimic an unfamiliar instrument given only a single brief example at inference time.
Methodology
The proposed architecture leverages the Vector-Quantized Variational Autoencoder (VQ-VAE) to achieve disentanglement between musical content and style.
The system consists of three primary components:
- Content Encoder (Discrete): Maps input audio to a sequence of discrete codes from a learned codebook. The discrete bottleneck acts as a lossy filter, discarding textural "style" information while retaining essential "content" like pitch and rhythm.
- Style Encoder (Continuous): Processes a separate audio segment from the same instrument to produce a continuous vector representing the global timbre.
- Decoder: Reconstructs the final audio by combining the discrete content codes with the continuous style vector.
Training is conducted in a self-supervised manner. The model is tasked with reconstructing an audio segment $x$ using its own content codes and the style vector derived from a different segment $y$ of the same recording. This setup forces the model to generalize instrument characteristics across different notes.
Key Architectural Insights
A critical finding is the power of the discrete bottleneck. If the content representation were continuous, the model might "leak" timbre information into the content signal. Forcing discretization ensures that only the "alphabet" of acoustic units is preserved. Additionally, data augmentation—such as random transpositions and audio effects—is employed to prevent the style encoder from overfitting to specific pitches.
Experiments and Datasets
The model was trained on a diverse corpus of single-instrument tracks, including:
- Lakh MIDI Dataset (LMD): 178,000 MIDI files synthesized into audio.
- RealTracks (RT): Professional studio recordings of various individual instruments.
Evaluation was performed using both a synthetic benchmark with known ground truths and a "Real Data" benchmark from the Mixing Secrets multi-track library to assess performance on complex, real-world audio.
Results
The VQ-VAE model demonstrated superior performance across multiple metrics compared to baselines like NMF-based "musaicing" and other neural approaches.
As shown in the results table, the proposed method achieved a significantly lower Log-Spectral Distance (LSD) of 12.16, compared to 14.50 for the best baseline. It also showed improved timbre similarity scores. While the model excels at pitch preservation, it faces challenges with dense polyphonic passages where the discrete encoder may lose fine-grained information.
Conclusion and Future Work
This work demonstrates the efficacy of discrete representation learning for one-shot music style transfer. Despite its success, the model currently relies on deterministic decoding and the Griffin-Lim algorithm, which can introduce metallic artifacts. Future improvements could involve integrating neural vocoders like WaveNet for higher fidelity. Furthermore, addressing the temporal instability of expressive instruments—where timbre varies dynamically—remains an open area for research.
Summary updated