Back to corpus
proposalexperiment writeup candidatescore 52

1. What the Rust runtime *is* and *isn’t*

Rust is a great fit if you want a **Serato-class, DAW-style instrument** with hard real-time guarantees and a modern, safe codebase. Here’s what the stack would look like when you build it “the Rust way”—clean boundaries, no allocations in the audio callback, and room for motion/voice/AI without ever risking a glitch.

Full HTML reader

Read the full artifact

Open in new tab

Extracted abstract or opening context

Rust is a great fit if you want a **Serato-class, DAW-style instrument** with hard real-time guarantees and a modern, safe codebase. Here’s what the stack would look like when you build it “the Rust way”—clean boundaries, no allocations in the audio callback, and room for motion/voice/AI without ever risking a glitch. * The **audio thread** never allocates, never locks. All heavy work (ASR, diffusion, ANN search, file decode) runs **off-thread** and streams results via lock-free ring buffers. * **Quantization & safety** live in the scheduler: it accepts intents from voice/motion/UI, decides *when* (beat-aligned), and turns them into parameter ramps/MIDI envelopes for the engine. * The **AI sidecars** are optional processes; if they stall, the engine keeps playing. * **Audio I/O**: `cpal` or `cubeb` (via `cubeb-rs`) for cross-platform CoreAudio / WASAPI / JACK; for pro ASIO you can FFI a minimal ASIO backend on Windows. * **DSP graph**: build on a lock-free node graph (e.g., `knyst`, or your own over `atomic_arena` + `ringbuf`). Nodes are preallocated; connections are SPSC queues. * **FFT/analysis**: `rustfft` / `realfft` for STFT; `symond` or your own feature extractors; `symphonia` for decoding (mp3/flac/wav). * **Resample**: `rubato` (hi-quality resampler); for **time-stretch/key shift** use FFI to `Rubber Band` or `SoundTouch` (battle-tested), wrapped in a non-allocating adaptor. * **MIDI**: `midir` (I/O, virtual ports). * **OSC**: `rosc` (if you want external control/visuals). * **Clock**: Ableton Link—use a tiny C FFI to the Link SDK or a Rust binding; expose a `BeatClock { bpm, phase, quantum }` to both scheduler and engine. * **GUI**: `egui` (fast immediate-mode) or `iced` with `wgpu` renderer; audio engine talks to GUI via lock-free ring buffers. * **NLU/ASR**: `whisper-rs` (ggml) on CPU/GPU for low-latency commands; or `vosk` bindings. * **ML (diffusion/flow)**: `candle` (HF’s Rust ML) or `burn` for inference in a **separate process**; communicate over shared memory/IPC with pre-roll buffers. * **ANN / phrase DB**: `tantivy` + `sqlite` for metadata; `hnsw_rs` or an external vector DB (Qdrant) for fast similarity over CLAP/feature embeddings. * **Backends**: compiled per-platform; you pick CoreAudio/JACK/ASIO at runtime. * **Graph**: nodes = *ClipPlayer*, *StemGate*, *RubberBandTS*, *EQ*, *Filter*, *FX*, *Mixer*, *Limiter*. * **Scheduling**: automation events (gain/EQ/crossfader/FX) arrive as beat-quantized envelopes; the engine converts them to per-block parameter ramps. * **Stems**: a stem node can mute/solo parts with zero-cross alignment; for Serato-style “stems FX”, precompute masks offline and apply fast spectral gating in block-aligned windows. * Wrap Rubber Band (graceful, musical) via FFI; expose: `set_ratio(time_ratio)`, `set_se

Promotion decision

What has to happen next

Attach run IDs, datasets, metrics, and reproduction commands.

Why this is not always a full paper yet

Corpus pages are public-safe readers for discovered workspace artifacts. They are not automatically final papers. A corpus item becomes a polished paper only after the editable source, evidence checkpoints, references, figures, render path, and release status are attached through the paper schema.