Skip to main content

Real-time music generation models.

Project description

Magenta RealTime 2

CLI Tests

[!NOTE] Looking for Magenta RealTime v1? The original model and code have been moved to the v1_legacy branch.

Magenta RealTime 2 (MRT2) is a state-of-the-art open-weights model for real-time music generation. It contains several key components

Use this project to run inference, build a DAW plugin, or embed the model into new applications of your imagination. Future updates will support supervised fine-tuning.

📖 Full documentation: https://magenta.github.io/magenta-realtime/ (or build it locally — see docs/README.md).

Repo Highlights

  • magenta_rt/ — Python inference library (JAX / MLX backends).
  • cpp/ — C++ inference library (magentart::core).
  • examples/mrt2/auv3 — All-in-one AUv3 plugin for DAWs.
  • examples/mrt2/standalone — All-in-one standalone macOS app.
  • examples/jam/ — App for exploring note control.
  • examples/collider/ — App for exploring prompt space.
  • notebooks/ - Notebook for trying Python API.

Hardware requirements

Real-time streaming requires Apple Silicon (M-series). We offer two model sizes:

  • mrt2_small (230M parameters) — runs real-time on any Apple Silicon Mac, including Air models.
  • mrt2_base (2.4B parameters) — higher quality; requires a Pro Max chip for real-time streaming.

The table below shows which devices support real-time streaming (generating audio faster than playback):

Device mrt2_small (230M) mrt2_base (2.4B)
M5 Max
M3 Max
M2 Max
M4 Pro
M2 Pro
M1 Pro
M4 Air
M3 Air
M1 Air

Note: Both models can also run offline (non-real-time) inference on any Apple Silicon Mac or NVIDIA GPU via the Python library. See more details on docs/models.md.

Quickstart on Apple Silicon

# Install uv if you haven't and create a venv
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv --python 3.12
source .venv/bin/activate

# Install dependencies (Python dev)
uv pip install "magenta-rt[mlx]"

# Download resources: style model and codec model
# (i.e., MusicCoCa and SpectroStream)
mrt models init
# Download the streaming model you want to use
mrt models download
# Generate 4s music (change to `mrt2_small` for small model)
mrt mlx generate --prompt "disco funk" --duration 4.0 --model=mrt2_base

Python Development

For local development, clone the repo instead of installing from PyPI:

git clone --recurse-submodules https://github.com/magenta/magenta-realtime.git
cd magenta-realtime
uv pip install -e ".[mlx]"

C++ App Development

To get started building C++ apps, perform the following setup:

# Install dependencies
uv pip install "cmake<3.28"

# Build hello_mrt2 (a basic command-line interface)
cmake . -B build
cmake --build build --target hello_mrt2 -j10

# Generate 4s music
./build/examples/hello_mrt2/hello_mrt2 \
    ~/Documents/Magenta/magenta-rt-v2/models/mrt2_base/mrt2_base.mlxfn \
    ~/Documents/Magenta/magenta-rt-v2/resources \
    100 \
    --prompt "ambient pads with sub bass"

See the full documentation:

Other resources

Citing this work

Please cite our previous technical report:

BibTeX:

@article{gdmlyria2025live,
    title={Live Music Models},
    author={Caillon, Antoine and McWilliams, Brian and Tarakajian, Cassie and Simon, Ian and Manco, Ilaria and Engel, Jesse and Constant, Noah and Li, Pen and Denk, Timo I. and Lalama, Alberto and Agostinelli, Andrea and Huang, Anna and Manilow, Ethan and Brower, George and Erdogan, Hakan and Lei, Heidi and Rolnick, Itai and Grishchenko, Ivan and Orsini, Manu and Kastelic, Matej and Zuluaga, Mauricio and Verzetti, Mauro and Dooley, Michael and Skopek, Ondrej and Ferrer, Rafael and Borsos, Zal{\'a}n and van den Oord, {\"A}aron and Eck, Douglas and Collins, Eli and Baldridge, Jason and Hume, Tom and Donahue, Chris and Han, Kehang and Roberts, Adam},
    journal={arXiv:2508.04651},
    year={2025}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

magenta_rt-2.0.2.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

magenta_rt-2.0.2-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file magenta_rt-2.0.2.tar.gz.

File metadata

  • Download URL: magenta_rt-2.0.2.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for magenta_rt-2.0.2.tar.gz
Algorithm Hash digest
SHA256 4f6241955094e5c38142deef820a03ce8e64bd1b300223e0d78a9195056c9b98
MD5 205ecb883c72474c3e48263f6b8171a5
BLAKE2b-256 911bb639ab088152e84590344c366faf92d89f6a89f5f533dcb0443a123be6c9

See more details on using hashes here.

File details

Details for the file magenta_rt-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: magenta_rt-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for magenta_rt-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 92df64a8150a6bff85ab9a0db0b54929a69b2538949df72677af2dc25a6a3845
MD5 f180020f278fd20792aac3363353e458
BLAKE2b-256 852c9d323e1a1c9ea8d86f8030c7264765dcf94a6437a029f6a46da42cc1029d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page