About this project
chalkwalk-dsp is a small C++ audio DSP library split into two targets. The primitives target, chalkwalk::dsp, is header-only and dependency-free; the measurement target, chalkwalk::dsp::measure, is separate because it pulls in a dependency (libebur128) that only consumers wanting a loudness number need to build.
Primitives (chalkwalk::dsp):
- Svf.h — Cytomic state-variable filter providing lowpass, highpass, bandpass and notch from one pole pair. Supports set(freq, Q, sampleRate) and setCoeffs(g, k) for callers that smooth coefficients themselves.
- PolyBlep.h — band-limited step correction for saw and pulse oscillators.
- SoftClip.h — soft-knee ceiling that is exactly unity below the knee.
- Interpolation.h — 4-point Hermite interpolation for fractional buffer reads.
- Denormal.h — state flushing so an idle recursive filter does not slow down.
Instruments:
- Measure.h — peak, rms, crest, dB, brightness and pitch; depends only on chalkwalk::dsp.
- Loudness.h — integrated loudness in LUFS; depends on chalkwalk::dsp::measure and libebur128.
Usage is header-only: add the include directory or use it as a CMake subdirectory and link chalkwalk::dsp, optionally chalkwalk::dsp::measure for loudness. The README notes that Measure.h works with the primitives target alone, so cloning without --recursive is sufficient unless BS.1770 loudness is needed.
Build and test: cmake -B build && cmake --build build && ctest --test-dir build. The project is designed to build standalone, which the README frames as a test of the extraction boundary.
The README documents the motivation for the library: duplicated implementations across two plugins disagreed in consequential ways. Examples given include an inverted polyBLEP correction sign that reinforced rather than cancelled a discontinuity, a pulse-width clamp fixed at [0.05, 0.95] that is described as wrong at both low and high frequencies (the limit should scale with the phase increment), missing denormal flushing on a recursive filter, and filter guards for tan() near Nyquist and zero cutoff. The measurement code was consolidated because peak and rms existed three times and fundamentalHz twice; the README states one detector read 294.7 Hz for a 440 Hz tone. Measurements are calibrated against synthetic signals with known answers, and integratedLufs is checked against ffmpeg's ebur128 with agreement inside 0.05 LU.
Licence: MIT. libebur128 (MIT) is vendored as a submodule at modules/libebur128 for the measurement target; the primitives link nothing. The project is part of the chalkwalk plugin ecosystem alongside chalkwalk-music.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.