ThatGuy Productions Β· ARCOVEL Technologies International
"Rain doesn't live in the cloud." β The render engine runs on your machine. Audio never leaves your device during processing.
RAIN is a full-stack, local-first AI mastering and distribution engine that brings studio-grade audio processing to independent artists and labels. It combines a deterministic C++/WASM DSP render engine with cloud-based AI inference, cryptographic provenance certificates, and direct streaming platform distribution β all in one product.
Beyond LANDR. Beyond iZotope. Beyond anything that came before.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Browser (React 19 + Vite 7 + TypeScript 5.5 + Tailwind 4) β
β ββββββββββββββββββββ βββββββββββββββββββ ββββββββββββββββββββββββ β
β β Web Audio API β β ONNX Runtime Webβ β RainDSP C++/WASM β β
β β 32-bit preview β β WebGPU β WASM β β 64-bit Β· deterministicβ β
β βββββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββ
β REST / WebSocket (FastAPI)
ββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββ
β Backend (Python 3.12 Β· FastAPI Β· Celery Β· Structlog) β
β ββββββββββββββββ ββββββββββββββββ βββββββββββββββ ββββββββββββββββ β
β β Master Engineβ β QC Engine β β RAIN-CERT β β DDEX ERN 4.3 β β
β β 16-stage DSP β β 18 checks β β Ed25519 β β AI disclosure β β
β ββββββββββββββββ ββββββββββββββββ βββββββββββββββ ββββββββββββββββ β
β ββββββββββββββββ βββββββββββββββ βββββββββββββββ ββββββββββββββββ β
β β Feature Ext. β β Heuristic β β LabelGrid β β Stripe β β
β β 43-dim vectorβ β 46 params β β Distributionβ β Billing β β
β ββββββββββββββββ βββββββββββββββ βββββββββββββββ ββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β β
PostgreSQL 18 Valkey 9.0 MinIO / S3
(RLS enabled) (BSD-3 Redis fork) (paid tiers only)
| Path | Engine | Precision | Purpose |
|---|---|---|---|
| Preview | Web Audio API | 32-bit float | Real-time monitoring, < 50 ms latency |
| Render | RainDSP WASM | 64-bit double | Deterministic, authoritative output |
Determinism guarantee: Same input + same params + same WASM binary = bit-identical output, every time.
| Stage | Name | Description |
|---|---|---|
| 01 | Format Normalization | Resample to 48 kHz, 64-bit float stereo |
| 02 | Provenance Record | Ed25519 input hash, C2PA manifest init, AudioSeal seed |
| 03 | Feature Extraction | 43-dim vector β Loudness (5), Dynamics (6), Spectral (16), Stereo (7), Transient (5), Tonal (4) |
| 04 | AI Inference | RainNet v2 β 46 ProcessingParams via sigmoid Γ 10 macro mapping |
| 05 | Reference Matching | Genre-aware spectral target matching |
| 06 | Spectral Repair | HPF, sibilance reduction, rumble removal, spectral smoothing |
| 07 | Source Separation | BS-RoFormer 4-pass cascade β 12 stems |
| 08 | Per-Stem Repair | Individual stem QC and spectral correction |
| 09 | Per-Stem Processing | SAIL v2 stem-aware limiting, vocal protection, gain faders |
| 10 | Master Bus | EQ β Multiband compression β Stereo widening β Groove β Life injection |
| 11 | Loudness Targeting | 27 platform targets β Spotify β14, Apple β16, Atmos β18, CD β9, vinylβ¦ |
| 12 | Spatial Rendering | Dolby Atmos HRTF binaural, M/S stereo enhancement |
| 13 | QC Validation | 18 automated checks with auto-remediation |
| 14 | Forensic Watermark | 16-bit AudioSeal, Chromaprint fingerprint |
| 15 | Output Packaging | 24-bit WAV @ 48 kHz + 320 kbps MP3 with TPDF dither; RAIN-CERT signed |
| 16 | Distribution | DDEX ERN 4.3.2, LabelGrid API delivery, ISRC/UPC generation |
Emotionally-resonant, non-technical controls mapping to bounded subsets of the 46 DSP parameters. RainNet v2 outputs all 7 macros at indices 39β45 via sigmoid Γ 10 β [0.0, 10.0].
| Macro | DSP Mapping |
|---|---|
| BRIGHTEN | High-shelf at 8 kHz + air peak at 16 kHz Β· 0 β +4 dB |
| GLUE | Multiband compression ratios/thresholds Β· 0 = transparent, 10 = bus glue 4:1 |
| WIDTH | M/S side-channel gain Β· bass mono below 200 Hz enforced regardless |
| PUNCH | Mid-band transient shaping via attack/release Β· snare, kick, vocal presence |
| WARMTH | Low-shelf at 200 Hz + analog saturation Β· 0 = clean, 10 = +3 dB + tube sat |
| SPACE | Stereo decorrelation and M/S balance for depth Β· interacts with WIDTH |
| REPAIR | Spectral repair intensity, HPF, de-essing, noise floor |
Protect your authentic human vocal recordings. Upload AI-reworked structures, separate the stems, and cleanly replace AI vocals with your original takes.
| Pass | Model | Output |
|---|---|---|
| 1 | BS-RoFormer SW | vocals Β· drums Β· bass Β· guitar Β· piano Β· other |
| 2 | MVSep Karaoke MelBand RoFormer | lead vocals + backing vocals |
| 3 | Spectral band-split (LarsNet pending) | kick Β· snare Β· hats Β· percussion |
| 4 | anvuew dereverb MelBand RoFormer | room/ambience + dry FX |
Per-stem gain faders, solo/mute, 12-stem waveform display. SAIL v2 (Stem-Aware Intelligent Limiting) with dedicated vocal protection.
| Standard | Status | Notes |
|---|---|---|
| EU AI Act Article 50 | β Active | C2PA v2.2 + DDEX AI disclosure Β· deadline 2026-08-02 |
| DDEX ERN 4.3.2 | β Active | Full AI involvement fields per September 2025 standard |
| C2PA v2.2 | β Active | CBOR-encoded manifests, Ed25519 signed |
| RAIN-CERT | β Active | Ed25519 provenance certificates on every render |
| AudioSeal | β Active | 16-bit invisible watermarks (Meta, MIT licence) |
| Chromaprint | β Active | Audio fingerprints in PostgreSQL |
| ISO 3901 (ISRC) | β Active | Generated per standard with registrant code |
| AES17 True Peak | β Active | 4Γ oversampling limiter Β· β1.0 dBTP ceiling |
Claude Sonnet integration via claude_service.py (model configurable; default claude-sonnet-4-20250514):
- Natural language Intent Engine maps requests to bounded
ProcessingParamsdeltas - 7 macro suggestions with confidence scores (JSON-validated, clamped 0β10)
- Before/after mastering reports in plain language
- Tension-pair conflict detection (e.g. BRIGHTEN + WARMTH)
- Voice control via Web Speech API for hands-free mastering
Artist Identity Engine (AIE): 64-dimensional voice vector. Adaptive EMA (Ξ± = 0.90 stable, 0.60 cold-start). Personalizes after 5 sessions. Exportable as HMAC-SHA256 signed JSON.
| Layer | Technology |
|---|---|
| Frontend | React 19 Β· Vite 7 Β· TypeScript 5.5 Β· Tailwind 4 Β· Framer Motion 11 |
| State | Zustand 5 Β· TanStack Query 5 |
| Render Engine | RainDSP (C++20 / WASM via Emscripten) Β· 64-bit Β· deterministic |
| ML Inference | ONNX Runtime Web 1.24 (WebGPU β WASM fallback) Β· RainNet v2 |
| Backend API | FastAPI 0.109+ Β· Python 3.12 Β· Celery Β· Structlog Β· SlowAPI |
| Database | PostgreSQL 18 with Row-Level Security on all tables |
| Cache / Queue | Valkey 9.0 (BSD-3-Clause Redis fork) |
| Object Storage | S3-compatible (MinIO in dev) Β· free tier = WASM-only, no S3 |
| Provenance | Ed25519 Β· C2PA v2.2 Β· AudioSeal Β· Chromaprint Β· CBOR (RFC 8949) |
| Separation | BS-RoFormer SW Β· MelBand RoFormer Β· auto-download via pip |
| Distribution | DDEX ERN 4.3 Β· LabelGrid API Β· ISRC / UPC-EAN-13 |
| Desktop / Plugin | Tauri 2.0 Β· JUCE 8 (VST3 / AU / AAX) |
- Docker Desktop 4.x+
- Node.js 20+
- Python 3.12+
# Clone
git clone https://github.com/ThatGuy-Productions/RAIN-V6-AI-AUDIO-TRANSFORMATION-MASTERING-AND-DISTRIBUTION-INFRUSTRUCTURE.git
cd RAIN-V6-AI-AUDIO-TRANSFORMATION-MASTERING-AND-DISTRIBUTION-INFRUSTRUCTURE
# Configure environment
cp .env.example .env
# Edit .env β set ANTHROPIC_API_KEY, STRIPE_SECRET_KEY, LABELGRID_API_KEY, etc.
# Start full stack (PostgreSQL 18 + Valkey 9.0 + backend + frontend)
docker compose up --build -d
# Verify
curl http://localhost:8000/health# Backend
cd backend
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000
# Frontend (separate terminal)
cd frontend
npm install
npm run dev# Requires CUDA 12+ and SEPARATION_ENABLED=true in .env
docker compose -f docker-compose.gpu.yml up -d workerThe backend exposes 18 mounted API routers under /api/v1/.
| Router | Prefix | Auth | Description |
|---|---|---|---|
auth.py |
/auth |
Public / JWT | Registration, login, JWT refresh, password reset |
upload.py |
/upload |
JWT | Audio file upload, S3 pre-signed URLs, file validation |
master.py |
/master |
JWT | Session creation, mastering pipeline trigger, status polling, parameter overrides |
separate.py |
/separate |
JWT Β· Creator+ | BS-RoFormer 12-stem separation jobs, stem download |
download.py |
/download |
JWT | Signed download URLs for rendered masters and stems |
distribution.py |
/distribution |
JWT Β· Producer+ | DDEX ERN 4.3.2 package generation, LabelGrid delivery, ISRC/UPC issuance |
billing.py |
/billing |
JWT | Stripe checkout sessions, subscription management, webhook receiver |
aie.py |
/aie |
JWT Β· Artist+ | Artist Identity Engine β vector query, export, reset |
sessions.py |
/sessions |
JWT | Session history, status, output metadata, RAIN Score retrieval |
qc.py |
/qc |
JWT | Manual QC re-run, 18-point check report |
provenance_routes.py |
/provenance |
JWT | RAIN-CERT retrieval, C2PA manifest query, Ed25519 verification |
waitlist.py |
/waitlist |
Public | Beta waitlist registration |
assist.py |
/assist |
JWT | Claude AI assistant β intent parsing, macro suggestions, mastering advice, voice command processing |
lora.py |
/lora |
JWT Β· Enterprise | Custom LoRA adapter training jobs, model version management, inference switching |
suno_import.py |
/suno |
JWT | Suno AI track import β fetch by song ID or URL, normalize, queue for mastering |
whitelabel.py |
/whitelabel |
JWT Β· Enterprise | White-label API key provisioning, partner branding config, usage metering |
workspaces.py |
/workspaces |
JWT Β· Studio+ | Multi-artist workspace management, collaborator roles, shared session access |
score.py |
/score |
Public (10 req/hr/IP) | Public RAIN Score endpoint β no auth required, returns 0-100 composite quality metric |
Auth tiers:
Public= no token required Β·JWT= any authenticated user Β· tier suffixes (Creator+, Artist+, etc.) = minimum subscription required.
| Tier | Price | Renders / mo | Key Features |
|---|---|---|---|
| Casual | Free | Preview only | Real-time WASM mastering preview, RAIN Score, no file export |
| Creator | $9 | 50 downloads | Full-res export, WAV / FLAC / MP3, Simple Mode |
| Independent Artist | $29 | 10 renders | Stem separation, Claude AI (10/mo), Artist Identity Engine |
| Producer | $59 | 25 renders | DAW plugin, Distribution Intelligence, RAIN-CERT |
| Studio | $149 | 75 renders | Dolby Atmos, DDEX / DDP, vinyl mastering, collaboration |
| Label / Distributor | $349 | 300 renders | Multi-artist roster, batch processing, LabelGrid direct |
| Enterprise | Custom | Unlimited | Custom RainNet LoRA, white-label API, dedicated support |
Annual billing: ~20% discount. Contact philippusbolke@gmail.com for enterprise licensing.
These constraints are immutable. See CLAUDE.md for the full specification.
-
Local-First Processing β RainDSP WASM is the sole render engine. Audio never reaches S3 on the free path. Free renders live in WASM memory and are discarded on session close.
-
Dual-Path Architecture β Preview (Web Audio API, 32-bit) and Render (RainDSP, 64-bit) are always separate codepaths. Never merge them.
-
Multi-Tenant Isolation β Every DB query includes
WHERE user_id = $user_id. Row-Level Security enabled on all tables. No exceptions. -
K-Weighting Sign Convention β
y = b0Β·x + b1Β·xβ + b2Β·xβ β a1Β·yβ β a2Β·yβ. a1 stored negative, subtracted. ITU-R BS.1770-4 convention β never change this. -
NORMALIZATION_VALIDATED Gate β
RAIN_NORMALIZATION_VALIDATED=trueβ gate OPEN β RainNet inference active. Closed by default. Sign-off authority: Phil BΓΆlke. -
WASM Binary Integrity β
rain_dsp_wasm_hashverified at session start via SHA-256. Mismatch =RAIN-E304, render blocked. SetRAIN_EXPECTED_WASM_HASHin production. -
Provenance Before Output β Output hash verified against RAIN-CERT before session marked complete.
RAIN-E305on mismatch.RAIN-E306on unsigned cert. No exceptions in production.
RAIN-V6-AI-AUDIO-TRANSFORMATION-MASTERING-AND-DISTRIBUTION-INFRUSTRUCTURE/
βββ backend/ FastAPI application
β βββ app/
β β βββ api/routes/ 19 routers β see API Routes table above
β β βββ core/ config, database, security, observability, audio_io
β β βββ models/ SQLAlchemy ORM models (PostgreSQL 18 + RLS)
β β βββ schemas/ Pydantic request / response schemas
β β βββ services/ master_engine, qc_engine, rain_score_v2, separationβ¦
β βββ tests/ pytest async test suite
βββ frontend/ React 19 SPA (Vite 7 Β· TypeScript Β· Tailwind 4)
βββ rain-dsp/ C++20 DSP engine β Emscripten WASM build
βββ rain-desktop/ Tauri 2.0 desktop wrapper
βββ rain-plugin/ JUCE 8 VST3 / AU / AAX plugin
βββ ml/ PyTorch training, ONNX export, RainNet v2
βββ docker/ Dockerfiles (backend, frontend, gpu-worker)
βββ monitoring/ Prometheus + Grafana dashboards
βββ docs/ Architecture docs, pipeline specs
βββ CLAUDE.md Immutable architecture specification
βββ RAIN-BLUEPRINT.md Full technical blueprint
βββ .env.example All required environment variables documented
| Code | Meaning | Action |
|---|---|---|
RAIN-E100 |
JWT authentication failure | Re-authenticate; check token expiry |
RAIN-E304 |
WASM binary hash mismatch | Set RAIN_EXPECTED_WASM_HASH to deployed hash |
RAIN-E305 |
Output hash mismatch in RAIN-CERT | Re-render; check CERT signing key |
RAIN-E306 |
Session completed without signed cert | Check C2PA key paths in config |
RAIN-E503 |
Public score rate limit exceeded | 10 requests/hour per IP β wait or authenticate |
RAIN-E620 |
Separation disabled | Set SEPARATION_ENABLED=true and provision model checkpoints |
RAIN-E621 |
demix() not available |
Install music-source-separation-training on GPU worker |
RAIN-E900 |
Claude API auth failure | Check ANTHROPIC_API_KEY in env |
RAIN-E901 |
Claude API timeout / exhausted retries | 3 retries with exponential backoff β check network |
RAIN-E902 |
Claude response parse failure | Invalid JSON from model β check logs for raw response |
Proprietary β Β© 2026 ThatGuy Productions. All rights reserved.
Contact philippusbolke@gmail.com for licensing enquiries.
RAIN v6 Β· Engine stamp: RAIN v6 β BS-RoFormer 12-stem Β· LLM advisory layer: configurable Claude Sonnet (claude-sonnet-4-20250514 default) Β· Publisher: ThatGuy Productions