Skip to content

chandcalnaido/rave-experiments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAVE Experimentation Project

A VS Code project for training RAVE models and exploring their latent spaces, with a favorites system for saving discoveries.

Quick Start

1. Setup Environment

Option A: Conda (recommended)

conda env create -f environment.yml
conda activate rave-exp

Option B: pip

# First install PyTorch for your system from https://pytorch.org
pip install torch torchaudio

# Then install other dependencies
pip install -r requirements.txt

2. Verify Installation

python -c "import rave; print('RAVE OK')"
python -c "import torch; print(f'PyTorch OK, CUDA: {torch.cuda.is_available()}')"

3. Prepare Your Data

Place your audio files in data/raw/audio/, then preprocess:

rave preprocess --input_path data/raw/audio --output_path data/processed/audio

Or use VS Code task: RAVE: Preprocess Dataset

4. Train a Model

# Standard v2 model (needs ~16GB GPU memory)
rave train --config v2 --db_path data/processed/audio --out_path experiments --name my_model

# Smaller model for less GPU memory (~8GB)
rave train --config v2_small --db_path data/processed/audio --out_path experiments --name my_model

Or use VS Code tasks: RAVE: Train v2 or RAVE: Train v2_small

Monitor training with TensorBoard:

tensorboard --logdir experiments --port 6006

5. Export Model

After training (or during, from a checkpoint):

rave export --run experiments/my_model --streaming

This creates a .ts file in your run directory. Copy it to models/exported/ for exploration.

6. Explore Latent Space

CLI mode:

python scripts/explore_latent.py --model models/exported/my_model.ts --interactive

Jupyter: Open notebooks/02_latent_exploration.ipynb

Project Structure

rave-experiments/
├── configs/           # Configuration files
├── data/
│   ├── raw/audio/     # Your original recordings
│   └── processed/     # Preprocessed training data
├── models/
│   ├── checkpoints/   # Training checkpoints
│   └── exported/      # Exported .ts models
├── experiments/       # Training runs and logs
├── favorites/         # Saved latent discoveries
│   ├── audio/         # Generated audio from favorites
│   └── sessions/      # Exploration session logs
├── notebooks/         # Jupyter notebooks
├── src/               # Source code
│   └── exploration/   # Latent explorer and favorites
└── scripts/           # CLI entry points

Favorites System

Save interesting sounds during exploration:

  • Save: Press 's' in interactive mode or click "Save Favorite" in notebook
  • Rate: Assign 1-5 star ratings
  • Tag: Organize with custom tags
  • Interpolate: Create morphs between favorites
  • Export: Generate sample packs from your discoveries
# List favorites
favorites.list_favorites(min_rating=4, sort_by='rating')

# Interpolate between two favorites
path = favorites.interpolate_favorites("abc123", "def456", steps=10)

# Export all 5-star favorites
favorites.export_favorites_audio("my_sample_pack/", min_rating=5)

RAVE Configurations

Config Description GPU Memory
v1 Original model ~8GB
v2 Improved quality, faster ~16GB
v2_small Smaller receptive field ~8GB
v3 Style transfer features ~32GB
discrete Like SoundStream/EnCodec ~18GB

Combine with modifiers:

rave train --config v2 --config causal  # Low latency
rave train --config discrete --config causal  # Discrete + causal

MIDI Controller Integration

For HPD-20 or other MIDI controllers:

# List available MIDI ports
python scripts/explore_latent.py --list-midi

# Connect to a specific port
python scripts/explore_latent.py --model my_model.ts --midi-port "HPD-20" --interactive

In interactive mode, map CCs to dimensions:

>>> midi 74 0    # Map CC#74 (D-BEAM) to dimension 0
>>> midi 1 1     # Map CC#1 (mod wheel) to dimension 1

Tips

  1. Start small: Use v2_small for initial experiments
  2. Monitor training: Check TensorBoard for loss curves and audio samples
  3. Save early, save often: The favorites system is non-destructive
  4. Explore systematically: Use dimension sweeps to understand each latent dimension
  5. Rate your favorites: Makes it easier to find the good ones later

Resources

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors