Klangvy

A real-time fractional-octave spectrum analyser and 24-band dynamic EQ in Rust, standalone and as a CLAP/VST3 plugin. In private testing.

Highlights

  • ISO/IEC 61260 fractional-octave bands from 1/1 to 1/48 octave on a true log axis
  • Zero-latency 24-band dynamic EQ drawn directly on the spectrum it shapes
  • Measurement tools: transfer function with automatic delay finder, sound level, and reverb time
  • Lock-free real-time architecture: about 0.7% of one core for a 24-band stereo EQ

Overview #

Klangvy (Swedish for “sound view”) is a real-time spectrum analyser with a 24-band dynamic EQ and a set of tools for measuring a PA system or a room. It runs as a standalone application and as a CLAP and VST3 plugin inside a DAW. It is written in Rust with an egui interface.

Klangvy is closed source and currently in private testing (v0.2.0), so this page describes what it does and how it is put together at a high level rather than linking to code.

Klangvy analysing a mix at 1/24 octave resolution, with a dynamic bell band at 250 Hz cutting into the spectrum, peak and RMS meters along the top, and analysis settings in a side panel.
1/24-octave analysis with a dynamic bell band at 250 Hz.

Numbers you can trust #

The design goal is that every number on screen is traceable to a standard or a definition. That matters more for an analyser than for most audio software, because the whole point is to make decisions based on what it shows.

  • Bands: fractional-octave bands follow ISO/IEC 61260, from full octaves down to 1/48 octave, on a true logarithmic frequency axis. FFT sizes go from 2k to 32k with optional multi-resolution and four window shapes.
  • Levels: band levels respect Parseval’s theorem, so the same band level is correct for both a pure tone and broadband noise. Bands that are narrower than the current FFT window can resolve are flagged as “RES LIMITED” instead of showing a misleadingly precise curve.
  • Meters: frequency weighting and meter ballistics follow IEC 61672.
Klangvy at 1/48 octave resolution with a 32k FFT, max hold enabled, and a locked cursor at 1.576 kHz showing live and max levels.
1/48-octave analysis with max hold and a locked cursor.

Dynamic EQ #

The EQ has 24 bands drawn directly on the spectrum they shape. It is zero-latency, matched to the analog response near Nyquist, and supports slopes up to 96 dB/octave. Each band can be routed to stereo, left, right, mid or side, and any band can be made dynamic, keyed either by its own level or by a sidechain. A/B comparison, undo, and JSON presets round it out.

An eight-band EQ curve drawn over a live 1/48-octave spectrum in Klangvy, with a selected 3.2 kHz bell band and its parameters shown below the graph.
An eight-band EQ curve over the live spectrum.

Measurement #

Klangvy is aimed at the system engineer as much as the mix engineer. Beyond the analyser it includes:

  • a transfer function view with phase and coherence, plus an automatic delay finder (GCC-PHAT) to align the measurement and reference signals,
  • LAeq, LCeq and LCpeak sound level metering,
  • reverb time (EDT, T20 and T30 per octave),
  • a built-in signal generator, SPL calibration, and four reference traces for comparisons,
  • export to CSV, REW text format, and PNG.

Architecture #

Real-time audio software has one hard rule: the audio thread must never wait. Klangvy is structured around keeping that rule:

  • The audio callbacks do nothing except copy samples into lock-free ring buffers.
  • Each analyser has its own DSP thread, which publishes finished frames to the UI through a triple buffer.
  • The UI sends settings back through atomics and lock-free swaps, and repaints at most 60 times per second.
  • All buffers are allocated up front, so nothing allocates on the audio path.

In the plugin build, the analysers belong to the plugin instance rather than the editor window. Closing the editor in the DAW doesn’t reset averaging, max hold, or the sound level integration.

The code is a Rust workspace that separates the shared DSP, UI and export code from the EQ, the standalone app, and the plugin, with a small bundler for the CLAP/VST3 packages. Development builds use thin LTO and release builds use fat LTO. Windows builds are cross-compiled from Linux.

The result is cheap to run: analysis takes around 0.03 ms per frame, a 24-band stereo EQ uses about 0.7% of one core, and the application uses essentially no CPU when idle.

Demo #

The video below shows an earlier version (v0.1.0). The interface and measurement tools have moved on since then.