Skip to main content
QUICK REVIEW

[Paper Review] Musika! Fast Infinite Waveform Music Generation

Marco Pasini, Jan Schlüter|arXiv (Cornell University)|Aug 18, 2022
Music Technology and Sound StudiesComputer Science5 citations
TL;DR

Musika introduces a non-autoregressive, GAN-based music generation system that enables fast, user-controllable, and infinitely long raw audio generation using a single consumer GPU for training and CPU inference. It achieves this by using a hierarchical invertible autoencoder to compress audio into low-dimensional latent representations, a latent coordinate system for infinite-length generation, and global style conditioning to ensure long-term coherence, outperforming prior systems in speed and FAD score on piano music.

ABSTRACT

Fast and user-controllable music generation could enable novel ways of composing or performing music. However, state-of-the-art music generation systems require large amounts of data and computational resources for training, and are slow at inference. This makes them impractical for real-time interactive use. In this work, we introduce Musika, a music generation system that can be trained on hundreds of hours of music using a single consumer GPU, and that allows for much faster than real-time generation of music of arbitrary length on a consumer CPU. We achieve this by first learning a compact invertible representation of spectrogram magnitudes and phases with adversarial autoencoders, then training a Generative Adversarial Network (GAN) on this representation for a particular music domain. A latent coordinate system enables generating arbitrarily long sequences of excerpts in parallel, while a global context vector allows the music to remain stylistically coherent through time. We perform quantitative evaluations to assess the quality of the generated samples and showcase options for user control in piano and techno music generation. We release the source code and pretrained autoencoder weights at github.com/marcoppasini/musika, such that a GAN can be trained on a new music domain with a single GPU in a matter of hours.

Motivation & Objective

  • To address the limitations of autoregressive models in music generation, such as slow inference and high computational cost.
  • To overcome the lack of long-range coherence and fixed-length generation in non-autoregressive systems.
  • To enable fast, unconditional and conditional audio generation of arbitrary length on consumer hardware.
  • To provide a framework for training on new music domains with minimal resources, using pretrained universal autoencoders.
  • To support user control via conditioning signals such as note density and tempo for interactive music creation.

Proposed method

  • A two-stage hierarchical autoencoder is used to compress raw audio into invertible, low-dimensional latent representations with reduced temporal resolution.
  • Adversarial training is applied to the autoencoder to improve reconstruction quality and enable efficient inference.
  • A latent coordinate system allows parallel generation of arbitrarily long audio sequences by modeling latent vectors in a continuous, structured space.
  • A global style conditioning vector is introduced to maintain stylistic coherence across long generations.
  • A GAN is trained on the latent representations to generate new sequences, with both unconditional and conditional variants.
  • Conditioning signals such as note density (via KDE on onsets) and tempo (via Tempo-CNN) are used to control generation.

Experimental results

Research questions

  • RQ1Can a non-autoregressive GAN-based system generate high-quality, infinitely long raw audio at inference speeds faster than real-time on consumer CPUs?
  • RQ2Can a hierarchical autoencoder with adversarial training achieve fast training and inference while preserving audio quality?
  • RQ3Can a latent coordinate system enable the generation of arbitrarily long audio sequences without losing coherence?
  • RQ4Can global style conditioning ensure long-term stylistic consistency in generated music?
  • RQ5Can user-controlled conditioning signals like note density and tempo effectively guide the generation process?

Key findings

  • Musika achieves generation speeds faster than real-time on a consumer CPU, with inference times under 1 second per second of audio.
  • The system can be trained on hundreds of hours of music using a single consumer GPU, with training completed in hours.
  • On the MAESTRO dataset, the unconditional Musika model achieves a lower Frechet Audio Distance (FAD) than UNAGAN, indicating superior audio quality.
  • Conditional models successfully generate music coherent with input signals such as note density and tempo, as validated by qualitative listening and visual inspection.
  • The use of a universal autoencoder allows training a new domain-specific GAN on a new music genre (e.g., techno) without retraining the autoencoder, reducing training time and resource needs.
  • Generated samples demonstrate long-range coherence and consistent musical style over extended durations, as observed in audio samples available online.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.