Abstract
Deep learning researches on the transformation problems for image and text have raised great attention. However, present methods for music feature transfer using neural networks are far from practical application. In this paper, we initiate a novel system for transferring the texture of music, and release it as an open source project. Its core algorithm is composed of a converter which represents sounds as texture spectra, a corresponding reconstructor and a feed-forward transfer network. We evaluate this system from multiple perspectives, and experimental results reveal that it achieves convincing results in both sound effects and computational performance.
Introduction
While artistic style transfer for images—such as applying the aesthetic of a "Van Gogh" to a photograph—is a well-established field, music presents unique challenges. Unlike static images, music is a sequential, continuous signal. Previous attempts at music "style" transfer often struggled to clearly separate musical content from stylistic texture or required massive computational resources (e.g., WaveNet-based models) that are impractical for real-world applications.
The MusiCoder system addresses these challenges by focusing on texture—defined as the "collective temporal homogeneity of acoustic events"—rather than the more ambiguous concept of "style." The goal is a practical, lightweight system capable of performing these transformations in near real-time on consumer hardware.
Methodology
The MusiCoder system follows a three-stage pipeline designed for efficiency and perceptual accuracy.
1. audio2img Converter
The system first performs a Short-Time Fourier Transform (STFT) to create a spectrogram. To better align with human hearing, it rescales the amplitude to a Decibel (logarithmic) scale ($X_{dB}$). A heuristic denoising mask is then applied to strip away ambient noise that might interfere with texture capturing, resulting in $X_a$. To leverage standard computer vision architectures, this single-channel spectrogram is mapped into a 3-channel RGB image ($X_{rgb}$).
2. Feed-forward Generative Network
Instead of the slow, iterative optimization used in early style transfer methods, MusiCoder utilizes a feed-forward network comprising 3 convolutional layers, 5 residual blocks, and 3 transpose convolutional layers. It is trained using a pre-trained VGG-19 "loss network" to minimize the difference in content and texture (calculated via Gram matrices) between the input and output.
3. img2audio Reconstructor
To synthesize sound from the generated image, the authors developed a novel RGB2SC algorithm to convert RGB data back to a single-channel spectrogram ($Y_{dB}$). Finally, the Griffin-Lim Algorithm (GLA) is used to recover phase information and synthesize the final audio waveform ($Y_o$).
Experimental Setup
The model was trained on the Free Music Archive (FMA) dataset, utilizing over 100,000 tracks. To ensure a diverse understanding of musical content, the authors sampled one track from each of 161 genres per iteration. Three distinctive target textures were used for evaluation: ‘Future’, ‘Laser’, and ‘Water’. Testing involved five 10-second musical pieces evaluated against human benchmarks.
Results and Discussion
The researchers compared MusiCoder against two humans: an expert audio engineer (E) and an amateur enthusiast (A).
- Quality and Naturalness: While the expert engineer outperformed the system, MusiCoder's results were remarkably close to the amateur human's performance. In a Turing-test-style experiment, participants found no significant distinction between the naturalness of the amateur human's work and the system's output.
- Content Preservation: In specific cases, such as transferring the "Water" texture, the network outperformed the amateur in preserving the original musical content while successfully applying the texture.
- Computational Performance: By choosing a feed-forward architecture over an autoregressive one, the system achieves a massive speedup. It can process a 10-second clip in approximately 30 seconds on a modest single-core CPU with 4GB of RAM.
Conclusion
MusiCoder demonstrates that by narrowing the scope from "style" to "texture," music transformation becomes mathematically tractable for CNNs. The system achieves results comparable to amateur human editors while remaining efficient enough for practical use. Future work will focus on refining the network structure, training on larger datasets, and exploring applications in professional-grade audio restoration.
Summary updated