home/ atoms/ rave-vae-architecture

RAVE is a variational autoencoder that encodes audio into a compact latent space and decodes it back in realtime

RAVE (Realtime Audio Variational autoEncoder), like vschaos2, is an autoencoder: it takes sound in, produces sound out, and is trained to reconstruct the sounds of its dataset. Processing has two stages: an encoder compresses a window of incoming audio (e.g. 2048 samples) into a low-dimensional set of latent variables (commonly 128); a decoder inverts those latents back into audio. The forward pass is simply these two chained. Because the bottleneck is variational, latent space can be smoothly sampled and interpolated, giving continuous control over timbre — the latent dimensions become synthesis parameters shaped by whatever corpus you trained on, effectively learning a controllable instrument. In the nn~ Max/PD object the encode method exposes each latent dimension as a separate outlet and decode takes latent values at its inlets; wiring every encode outlet straight into decode reproduces the forward transform, while splitting the wires lets you read or overwrite individual latents in between. RAVE exposes only a controllable subspace of latents (per the latent-space morphology) whereas vschaos2 exposes them all. The trained model runs in realtime, exportable as a TorchScript file for Max/MSP, Pure Data, or the RAVE VST.

Examples

Workflow: rave preprocess on a folder of recordings, rave train --config v2, rave export --streaming to get a .ts file loadable in nn~ or the RAVE VST. In nn~: encode → N latent outlets → decode inlets reproduces forward; split the wires to read or overwrite individual latents.

Assessment

Explain the three stages of the RAVE workflow and what the latent space represents; describe what changes when you move a single latent dimension in the decoder. State the difference between using forward versus separate encode/decode in nn~, and what chaining every encode outlet directly into decode reproduces.

“Both RAVE and vschaos2 are auto-encoders, meaning that they take sound as an input, generate sound as an output, and are trained to reconstruct the incoming sounds of the dataset.”
corpus · neural-synthesis-in-max-8-with-rave-ircam-forum-tutorial · chunk 2
“Official implementation of _RAVE: A variational autoencoder for fast and high-quality neural audio synthesis”
corpus · rave-realtime-audio-variational-autoencoder-train-your-own-n · chunk 1