Rawchunks (rawchunks.space | app.rawchunks.space | docs.rawchunks.space) is an open-source music studio, browser DAW, and developer API built from scratch in 6 weeks during the Nebius x NVIDIA Global AI Hackathon.
Closed AI music products treat music generation as a slot machine. You type a prompt, get a baked stereo file, and if bar 9 has the wrong vocal phrasing or you want a tighter bassline in the drop, you throw away the track and roll the dice again. You cannot surgically rework a 4-bar section against isolated stems, program MIDI or live-coded synths on the same timeline, train and reuse portable voice adapters, call an open API without enterprise lock-in, or own and license the resulting catalog onchain.
Rawchunks replaces the one-shot prompt box with a full studio architecture:
- Multimodal Songwriter & Algorithmic Composer Agents on Nebius Token Factory powered by
nvidia/Nemotron-3-Ultra-550b-a55bandnvidia/Nemotron-3.5-Super-VL. - High-Throughput Audio Diffusion & Stem Engine on NVIDIA L4 GPUs running custom-compiled
ACE-Step 1.5 XL(Turbo,SFT, andBasecheckpoints),acestep-5Hz-lm-0.6Bon vLLM,Qwen3-Embedding-0.6B,htdemucs, and on-demand Rank-16 Voice LoRA training. - Zero-GPU Browser DAW with multitrack stem lanes, range-based AI editing (Rework, Layer, Extract, Separate, Extend, Restyle, Accompany), a piano roll, 16-step drum sequencer, Strudel live-coding REPL, sampler, 3D spatial panner, and 8-stage FX rack.
- Open Studio API & Programmable Licensing supporting both standard API keys and accountless HTTP 402 (
x402) USDC micropayments alongside onchain song and remix licensing on Solana and Base.
You can test the full production stack on app.rawchunks.space immediately:
- Sign in at app.rawchunks.space.
- Click
SESSIONin the top bar, openCAMPAIGN, and claim 100 free Credits ($1.00USD equivalent, enough for 20 Fast song generations or dozens of surgical stem/range edits). - Test the Songwriter Agent (
VIBE) in Studio with a text prompt, an image, or a microphone hum, then open the track in the Editor to test range edits and the Algorithmic Composer (LIVE CODE -> AI CODE).
Interactive music software has a strict latency and accuracy bar. If an agent takes 15 seconds of hidden chain-of-thought reasoning before updating a control, the studio feels broken. Conversely, if a smaller model responds quickly but hallucinates invalid synthesis methods or off-key chord voicings, the generated code crashes the audio engine.
We run two specialized, bounded agent workflows against https://api.studio.nebius.com/v1/chat/completions using nvidia/Nemotron-3-Ultra-550b-a55b and nvidia/Nemotron-3.5-Super-VL with thinking disabled (chat_template_kwargs: { enable_thinking: false }) and incremental Server-Sent Events (SSE) tool-call streaming.
The Songwriter Agent (POST /api/vibe/stream) turns a short text idea, an uploaded image, or a 30-second microphone recording into a complete Studio configuration, structured multilingual lyrics, and cover art:
- Visual Vibe Translation (
nvidia/Nemotron-3.5-Super-VL): When an image is attached, we callnvidia/Nemotron-3.5-Super-VLon Nebius Token Factory (enable_thinking: false,temperature: 0.4,max_tokens: 180) to extract the image's mood, emotional subtext, and aesthetic direction into a concise human song prompt. - Parallel Local Audio DSP & Dual-STT: When a voice or hum recording is attached (in parallel with image translation if both are provided), our local DSP pipeline normalizes the audio to 16 kHz mono WAV and computes pitch contour via the YIN algorithm (70 to 600 Hz), key and scale via Krumhansl-Schmuckler tonal profiles, BPM via onset-strength autocorrelation (60 to 180 BPM), groove swing ratio, dynamic crest factor, and spectral centroid. Simultaneously, Cartesia
ink-whisperand ElevenLabsscribe_v2transcribe any sung or spoken words while a lexical filter strips non-lexical humming (la,na,ooh). - On-Demand Studio Library Tools (
nvidia/Nemotron-3-Ultra-550b-a55b): Rather than stuffing every studio constraint into a static mega-prompt,Nemotron-3-Ultraruns a 2-turn tool loop (tool_choice: "required",temperature: 0.6,max_tokens: 1024,enable_thinking: false). On Turn 1, it callsread_styles_library,read_parameters_library, andread_lyrics_libraryto inspect valid production tags, BPM/duration bounds, ISO language codes, and bracketed lyric structure tags. On Turn 2, it streams setter tool calls (set_title,set_prompt,set_vocal_config,set_style_tags,set_global_parameters,trigger_cover). Our SSE parser flushes each completed tool call by index as soon as the next tool index begins streaming, updating the user's Studio UI field by field in real time. - Streaming Lyrics & Non-Blocking Artwork: For vocal tracks,
Nemotron-3-Ultrastreams lyrics token-by-token (temperature: 0.75,max_tokens: 1200) in the target vocal language while keeping structural and vocal-delivery tags ([Verse 1],[Chorus],[Whisper],[Stacked Harmonies]) in English so the downstream acoustic model parses section boundaries reliably. Cover art generation runs concurrently in the background aftersongwriter_readyunlocks the Studio controls.
Inside the DAW Editor, the Live Code panel runs a browser-native Strudel pattern engine synchronized to the multitrack transport. When a producer asks AI Code (POST /api/strudel/stream) to write or transform a drum groove, acid bassline, chord bed, or arpeggio around a selected timeline region, the backend runs a hybrid Directed Graph + ReAct pipeline:
- Sub-Millisecond Directed Graph Routing (
<1ms, ~60% Token Reduction): Before invoking Nebius Token Factory,resolveComposerGraphresolves the song's database metadata (BPM, key/scale, time signature, active stems, and timestamp-aligned lyrics overlapping the selected time window). It traverses a local directed graph to classify intent (composevs.transform), section energy (intro,verse,build,drop,breakdown), reference stem role (drums,bass,vocals,keys,master), and target layers (drums,bass,chords,arp). It then computes exact diatonic scale notes, root bass notes, and 7th chord voicings for the track's key and pre-mounts only the required slices of four modular libraries (drums.ts,harmony.ts,synths.ts,archetypes.ts). - Dynamic Tool Pruning & 3-Turn ReAct Loop (
nvidia/Nemotron-3-Ultra-550b-a55b): We invokeNemotron-3-Ultraon Nebius Token Factory (enable_thinking: false,temperature: 0.4,max_tokens: 900,tool_choice: "required"). Anyread_*_librarytool whose slice was already mounted by the directed graph is removed from the active tool definitions for that turn, allowing the model to callset_strudel_patternimmediately on Turn 1 while retaining on-demand read tools if it decides to pull an additional layer. - Deterministic AST/Syntax Validation Inside the Tool Loop: When
Nemotron-3-Ultracallsset_strudel_pattern,validateGeneratedStrudelPatternchecks balanced delimiters, verifies rhythmic movement, and validates every chained method against our supported Web Audio synth/DSP methods (.s(),.scale(),.fast(),.slow(),.rev(),.gain(),.lpf(),.hpf(),.pan(),.room(),.delay()). If the model emits an unsupported method (such as.jux()or.stut()), the tool returns a structuredvalidation_errordirectly into the ReAct conversation andNemotron-3-Ultrarepairs the pattern on the next turn before the user ever sees broken code.
To match or beat closed commercial generators on both speed and audio fidelity, we deployed dedicated, workload-isolated GPU pools on Google Kubernetes Engine (GKE) using NVIDIA L4 GPUs (g2-standard-8 and g2-standard-12) and engineered a custom runtime overlay (backend/worker/overlay) on top of ACE-Step 1.5 XL:
- Workload-Specific Model Pools:
- Fast Pool (
acestep-v15-xl-turbo, 1 to 8 replicas): 8 diffusion steps withCFG 1.0for rapid ideation, range reworks, extensions, and restyling. - Master Pool (
acestep-v15-xl-sft, 1 to 4 replicas): 50 diffusion steps withCFG 7.0for release-grade vocal articulation and dense harmonic mixes. - Base & Stem Pool (
acestep-v15-xl-base+htdemucs, 1 to 4 replicas): Handles stem-conditioned tasks that require strict multi-track awareness: Layer (lego), Accompany (complete), Extract (extract), and 4/6-stem Demucs separation. - Semantic Planner & Embeddings: Co-located
acestep-5Hz-lm-0.6Bserved via vLLM (gpu_memory_utilization=0.25,max_num_seqs=16) paired withQwen3-Embedding-0.6Bfor text and lyric conditioning. - Custom Voice LoRA Trainer (1 warm replica): Trains Rank-16 flow-matching LoRA adapters (
alpha 32, 80 epochs,lr 1.5e-4) onq_proj,k_proj,v_proj, ando_projattention projections in ~60 seconds, exporting lightweight (~12 to 24 MB) adapters to Cloudflare R2 that inference workers hot-swap in memory.
- Fast Pool (
- Custom PyTorch & Triton Runtime Optimizations (
backend/worker/overlay):- Compiled DiT & Fused Triton Kernels: We compile the Diffusion Transformer (
torch.compile(dynamic=True)) and replace standard normalization/activation sequences with fused Triton kernels for RMSNorm, SwiGLU, residual connections, and AdaLN modulation. We also compile rotary embeddings and the chunked VAE decoder (1,536-frame chunks) and run startup warmups across120sand240slatent shapes backed by persistent TorchInductor and Triton caches. - Cross-Attention KV Cache Reuse & Windowed CFG: Because text, style, and lyric conditioning remain constant across diffusion steps, our overlay caches cross-attention K/V tensors on step 0 and reuses them across all subsequent steps. For guided tasks, Classifier-Free Guidance is restricted to the
[0.10, 0.90]step window, cutting redundant unconditional forward passes at the extremes of the denoising trajectory. - Multi-Tier
/dev/shm& Latent Hot Caches: Each NVIDIA L4 worker mounts a 2 GiB/dev/shmscratchpad and maintains an in-memory LRU cache of 32 downloaded source files, 8 decoded waveform tensors, and 16 VAE-encoded latent representations. Consecutive range edits on the same song bypass network download, audio decode, and VAE encoding entirely. - Durable Valkey Queues & KEDA Autoscaling: Fastify enqueues jobs into isolated Valkey namespaces (
turbo,sft,base,lora) with atomic claim locks, 30-second renewable executor leases, automatic stale-lease recovery, and coalesced SSE progress streaming. Workers compute 512-bin bipolar waveform peaks in memory during Cloudflare R2 upload so the browser DAW renders waveforms the instant a take finishes.
- Compiled DiT & Fused Triton Kernels: We compile the Diffusion Transformer (
- Keeping 550B MoE Agent Latency Sub-Second in an Interactive Studio:
Early prototypes waited for full JSON responses before updating the UI, which felt sluggish during multi-field songwriting and live coding. Switching to Nebius Token Factory's streaming SSE endpoint with
chat_template_kwargs: { enable_thinking: false }onnvidia/Nemotron-3-Ultra-550b-a55band writing an index-aware streaming tool-call accumulator (streamNebiusToolTurn) let us execute and emit each UI field setter the millisecond its arguments finished streaming. - Preventing Live-Code Hallucinations Without Bloating Prompt Context:
Dumping all drum tokens, music theory scales, synth parameters, and genre examples into every Strudel prompt wasted tokens and diluted attention. Building the
<1mslocal directed graph (resolveComposerGraph) reduced prompt tokens by ~60% while pre-calculating exact diatonic chord voicings for the track's key. Pairing that with dynamic tool pruning and deterministic validation insideset_strudel_patterneliminated broken live-code output. - Eliminating Dynamic-Shape Recompilation Stalls on NVIDIA L4 GPUs:
Variable song durations (
10sto240s) initially triggered expensivetorch.compilerecompilations mid-request. Configuringtorch.compile(dynamic=True), chunking VAE decoding into fixed1,536-frame windows, persisting Inductor/Triton caches on shared volume storage, and warming120sand240slatent shapes before the worker claims its first Valkey lease removed runtime compilation stalls.
- Shipping a complete, production-deployed music workstation, custom GPU inference runtime, dual-agent orchestration layer, public developer API, and dual-chain licensing protocol from scratch in 6 weeks.
- Achieving interactive generation and surgical range-editing speeds on single NVIDIA L4 GPUs that match or beat closed commercial platforms, while exposing full stem separation, layer generation, and custom Voice LoRA training.
- Designing a hybrid Directed-Graph + ReAct composer architecture on Nebius Token Factory where
nvidia/Nemotron-3-Ultra-550b-a55bwrites music-theory-locked, validated Strudel synth and drum code against live timeline stems.
- Client-Side DSP vs. Server-Side Diffusion Boundary: Interactive timeline playback, piano roll synthesis, drum sequencing, Strudel live code, spatial panning, and the 8-stage FX rack run entirely in the browser's Web Audio graph (
Tone.js) for zero-latency feedback. However, when a user triggers an AI range edit (likeReworkorLayer) that needs to hear those client-side edits, the browser first renders an offline WAV mix slice and uploads it to R2 so the GPU worker conditions on the exact audible arrangement. - Voice LoRA Training Cold vs. Warm Adapter Swapping: Training a new custom Voice LoRA takes ~60 seconds on the dedicated trainer replica (
80epochs over slices of reference vocals). Once trained, however, the resulting Rank-16 adapter is only ~12 to 24 MB and is hot-swapped into theTurboorSFTworker's resident DiT weights in under a second. - Constrained Strudel Method Subset: To guarantee that every AI-generated pattern plays cleanly in our browser audio engine and exports deterministically,
validateGeneratedStrudelPatternenforces a curated subset of 11 core Strudel synthesis and DSP methods rather than the full experimental TidalCycles vocabulary.
Building Rawchunks confirmed that frontier open-weights models (Nemotron-3-Ultra-550b-a55b and Nemotron-3.5-Super-VL) served over low-latency token infrastructure (Nebius Token Factory) can act as real-time creative state machines inside latency-sensitive media software when paired with deterministic local graphs and tool-level validators.
Next, we are expanding the Algorithmic Composer's directed graph to orchestrate multi-section song transitions automatically across timeline markers, adding collaborative multi-user studio sessions over WebSockets, and releasing SDK packages for third-party developers building on the Rawchunks API.
| Repository | Contents |
|---|---|
| app | Studio, Editor, library and Market |
| backend | Agents, APIs, audio runtime and scaling configuration |
| blockchain | Song and license contracts on EVM and Solana |
| docs | App guides, API reference and AI/ML documentation |
| landing | Website |
| demo | Project Presentation & Demo |
Run the app against the hosted API:
git clone https://github.com/rawchunks/app.git
cd app
npm ci
npm run devOpen http://localhost:3001 and connect your account. Set VITE_API_URL for your own backend; its README covers setup. For an integration, start with API requests.