Skip to main content
Glama
README.md
# MusicMixCode Desktop

> πŸ‡·πŸ‡Ί [Π§ΠΈΡ‚Π°Ρ‚ΡŒ Π½Π° русском](README.ru.md)

[![CI](https://github.com/HighVoltSound/ableton-auto-mix-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/HighVoltSound/ableton-auto-mix-mcp/actions)
[![License: MIT](https://img.shields.io/badge/license-MIT-yellow.svg)](LICENSE)

![Desktop App](assets/demo_waveform.png)

AI-powered mixing and mastering β€” both as an MCP server for AI agents and a standalone desktop app.

## What's Inside

| Layer | Stack | What it does |
|-------|-------|-------------|
| **Desktop App** | Tauri 2 + React + TypeScript | Visual mixing interface with waveform, EQ, 3D spatializer |
| **Backend API** | FastAPI (Python 3.10+) | REST API for analysis, preview render, export |
| **MCP Server** | stdio/OSC | 13 tools for AI agents (opencode, Claude Code) |
| **DSP Engine** | numpy + scipy | Full mastering chain: EQ, compression, sidechain, limiting |

## Desktop Features

- **Waveform Editor** β€” visual track import, drag & drop, volume/pan per track
- **Style Profiles** β€” 18 genre presets (techno, hip-hop, ambient, jazz, metal, R&B...)
- **AI Recommendations** β€” RAG-powered suggestions for compression, sidechain, EQ
- **Master Preview** β€” render mastered mix to WAV with full DSP chain
- **Live Spectrum** β€” real-time FFT visualization during playback
- **3D Spatializer** β€” binaural head-tracking positioning per track
- **EQ Editor** β€” interactive frequency curve with drag handles
- **Export** β€” Ableton Live (.als), JSON (universal), or WAV/FLAC/MP3 format conversion
- **i18n** β€” English & Russian
- **Auto-Update** β€” via GitHub Releases

## Quick Start

### Desktop App

```bash
# Windows
cd desktop
npm install
npm run tauri dev    # development
npm run tauri build  # release build β†’ src-tauri/target/release/bundle/

# macOS (requires Xcode CLI tools)
cd desktop
npm install
npm run tauri dev
npm run tauri build  # β†’ DMG
```

### Backend Only (API / MCP Server)

```bash
pip install -e ".[dev]"
python -m ableton_auto_mix          # MCP server
python -m uvicorn ableton_auto_mix.api_app:app --port 8787  # REST API
```

## Architecture

```
desktop/src-tauri/
  β”œβ”€β”€ src/main.rs          # Tauri entry point
  └── tauri.conf.json      # App config, bundling, auto-update

desktop/src/
  β”œβ”€β”€ components/
  β”‚   β”œβ”€β”€ WaveformEditor.tsx     # Track waveform + per-track controls
  β”‚   β”œβ”€β”€ MixPanel.tsx           # Main mixing interface
  β”‚   β”œβ”€β”€ LiveSpectrum.tsx       # Real-time FFT via WebAudio
  β”‚   β”œβ”€β”€ Spatializer3D.tsx      # Binaural positioning
  β”‚   β”œβ”€β”€ EqCurveChart.tsx       # Interactive EQ editor
  β”‚   β”œβ”€β”€ ReferencePlayer.tsx    # A/B reference playback
  β”‚   β”œβ”€β”€ ExportDialog.tsx       # Export to Ableton/JSON/Audio
  β”‚   └── ui/                    # Glassmorphism UI primitives
  β”œβ”€β”€ lib/api.ts           # FastAPI client
  └── i18n/                # en.json, ru.json

src/ableton_auto_mix/
  β”œβ”€β”€ analyzer.py          # LUFS/LRA, spectrum, stereo width
  β”œβ”€β”€ mixer.py             # Style-based corrections engine
  β”œβ”€β”€ preview.py           # Mastering chain render
  β”œβ”€β”€ reference_store.py   # RAG reference database
  β”œβ”€β”€ ai_recommender.py    # AI mixing recommendations
  β”œβ”€β”€ ableton_export.py    # .als + JSON export
  β”œβ”€β”€ logging_utils.py     # Structured logging
  β”œβ”€β”€ ableton_client.py    # AbletonOSC bridge
  β”œβ”€β”€ dsp/                 # Biquad filters, EQ, compression, spatial
  └── styles/              # 18 genre profiles (JSON)
```

## Style Profiles (18)

Electronic: `techno`, `trance`, `breaks`, `dubstep`, `drum_n_bass`, `trap`, `lo_fi`
Pop/Hip-Hop: `pop`, `hip_hop`, `rnb`
Rock/Metal: `rock`, `metal`
Jazz/Soul: `jazz`, `funk`, `country`, `classical`
Ambient/Cinematic: `ambient`
General: `balanced`

Each defines: target LUFS/LRA, spectral curve (6 bands), per-role levels, HPF, sidechain, compression, FX recommendations.

## MCP Tools

| Tool | Description |
|------|-------------|
| `list_styles` | List all available style profiles |
| `get_style(name)` | Full profile details |
| `get_ableton_status` | Check Ableton Live connection |
| `analyze_audio(path)` | Metrics for one WAV |
| `analyze_render_dir(dir)` | Metrics for all renders |
| `auto_mix(style, dir, dry_run)` | Corrections (dry-run or apply) |
| `suggest_style(dir)` | Best-fitting style for material |
| `preview_mix(style, dir)` | Render mastered preview WAV |
| `analyze_conflicts(dir)` | Frequency clashes between tracks |
| `release_check(style, dir)` | LUFS/TP/LRA vs label targets |

## Export Modes

| Mode | Description |
|------|-------------|
| **Ableton (.als)** | Full session with audio tracks, gain, pan, EQ Eight |
| **JSON** | Universal format for any DAW via scripting |
| **Apply to Live** | Push corrections directly via AbletonOSC |
| **Audio** | WAV (16/24/32-bit), FLAC, MP3 (128–320kbps) |

## Tests

```bash
python -m pytest tests/test_core_units.py -q    # 16 unit tests
python -m pytest tests/test_rag.py -q           # 13 RAG tests
python -m pytest tests/test_preview_harness.py -q  # 9 e2e tests
```

## CI/CD

- **CI** (`.github/workflows/ci.yml`) β€” Python 3.10–3.12, ruff, mypy, frontend build
- **Release** (`.github/workflows/release.yml`) β€” Windows NSIS + macOS DMG (Intel + ARM)
- **Pre-commit** β€” ruff lint/format, mypy

To trigger a release build:

```bash
git tag v0.1.0
git push origin v0.1.0
# β†’ GitHub Actions builds Windows .exe + macOS .dmg
# β†’ Creates draft release with artifacts
```

## License

[MIT](LICENSE) Β© 2026 MusicMixCode / HighVoltSound

TDQS

A4.2/5.0

Scored across 10 tools

Disambiguation4/5

Most tools have clearly distinct purposes: querying status, listing/fetching styles, analyzing audio in two forms, auto-mixing, previewing, suggesting styles, analyzing conflicts, and release checking. The two analyze tools (analyze_audio vs analyze_render_dir) could be confused at first glance, but descriptions clearly differentiate single-file vs directory batch, so boundary is well-defined.

Naming Consistency5/5

All tool names follow a consistent verb_noun snake_case pattern: get_ableton_status, list_styles, get_style, analyze_audio, analyze_render_dir, auto_mix, preview_mix, suggest_style, analyze_conflicts, release_check. There are no deviations in style or mixed conventions.

Tool Count5/5

Ten tools is firmly in the well-scoped range for an audio mixing server. Each tool maps to a distinct workflow step (discover, analyze, suggest, preview, apply, verify), and none feels redundant or placeholder.

Completeness4/5

The surface covers the full workflow: style discovery, audio analysis, auto-mixing, offline preview, style suggestion, conflict diagnostics, and a final release gate. Minor gaps include the absence of a tool to apply or revert individual mix corrections outside of auto_mix, and no explicit way to manage/edit style profilesβ€”but these are secondary to the core mixing workflow.

Maintenance

ActivityMaintained
ResponsivenessNo issues