I have been working on a Digital Audio Workstation called Latent Sonar. It is written in Rust, sits at about eleven thousand lines of code, and the goal is simple: a DAW that does not fight me.

Why Rust

The audio thread has hard timing constraints. Any allocation, lock, or system call in the hot path can cause a dropout (the click or pop you hear when a buffer underruns). Rust's ownership model makes it feasible to enforce zero-allocation, lock-free processing at compile time. I am not fighting the borrow checker — I am using it as a linter for real-time safety.

The engine uses pre-allocated buffers (max 4096 frames, stereo), AtomicU32 for parameter control, and rtrb ring buffers for cross-thread communication. No Mutex, no Vec::push, no println! inside process().

Custom GUI Framework

I started with egui 0.29. It worked for a prototype, but immediate-mode GUIs do not scale to the complexity of a DAW. Constant full redraws, no spatial culling, no GPU batching. In January 2026 I replaced it with a custom wgpu-based framework.

The new renderer does dirty-region tracking, scissor-based culling, and adaptive FPS (drops to 30fps when idle, hits 120fps during interaction). Text rendering uses cosmic-text for shaping and rasterization. The whole thing is a bit more code, but the piano roll now scrolls at 120fps with ten thousand notes on screen.

Audio Engine

The synthesis side uses PolyBLEP oscillators for anti-aliased waveforms (sine, square, saw, triangle). The voice pool handles polyphony with three stealing modes: oldest, quietest, and newest. ADSR envelopes per voice. Legato mode keeps oscillator phase running across overlapping notes to avoid the click of a hard restart.

The piano roll is FL Studio-style: unified select/draw mode, click to create notes, drag to extend. Shift-click for box selection, Ctrl-click for additive selection. Snap to grid with configurable quantization (1/32 up to bar). Scale highlighting for Major, Minor, Pentatonic, Blues, Dorian, etc. A velocity lane sits below the grid. Chord stamps (Major, Minor, Dom7, Sus2) and a strum tool for time-offset simulation. Right-click drag erases. Alt-scroll zooms vertically, normal scroll zooms horizontally.

Recording

Recording is per-track with independent arm, record, and monitoring states. Input comes from cpal's input stream, pushed through a lock-free ring buffer to the audio thread. Each RecorderNode has a pre-allocated 10-second stereo buffer at 48kHz.

Punch in/out lets you set a start and stop beat position; recording auto-toggles when playback crosses those boundaries. Overdub mode mixes new recordings with existing track audio instead of replacing them. Replace mode is the default. Input monitoring passes input audio to speakers independently of recording state.

Where It Is Now

The project is in active development. The audio engine is solid, the piano roll is usable, recording works. Plugin hosting (VST3 and CLAP) is partially implemented via raw FFI. The next phase is getting a single-track sequencer talking to the plugin host correctly, then multi-track routing.

I develop inside a Nix flake that pulls in ALSA, JACK, PipeWire, Vulkan, and Wayland libs. The flake pins rust-bin.stable.latest.default with rust-src and rust-analyzer extensions. cargo-watch for auto-reload during GUI work.

Code is at gitlab.com/DeltaEther/latent-sonar. It is private for now. I may open-source parts of the engine later, but the full DAW will stay closed until it is actually usable.