Files
Mikkeli Matlock 8d9eaeaffc Stage 2: full-band compressor with constant-latency look-ahead
Implements the single full-band feed-forward compressor (the engine that will be
reused per band + for the 'All' channel). Design follows Giannoulis et al. 2012:
log-domain gain computer with a quadratic soft knee feeding a smooth decoupled
peak detector for attack/release ballistics. Stereo-linked peak detection.

Look-ahead uses a fixed audio delay with a constant reported latency (set once in
initialize); the knob only moves the detector tap within that delay. This avoids
renegotiating latency from process(), which crashed FL Studio when the look-ahead
was adjusted during playback.

- src/dsp/compressor.rs: Compressor + CompressorSettings, RT-safe (no alloc in
  process; buffers sized in prepare; envelope denormals flushed in-code)
- src/lib.rs: nested CompressorParams (threshold/ratio/knee/attack/release/makeup/
  bypass) + global look-ahead; egui ParamSlider grid; latency reported once
- 5 unit tests (static curve, knee continuity, steady-state convergence, constant
  latency); Cargo.toml lib crate-type added so tests link
- README: 'All' channel architecture already documented; look-ahead spec updated

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 19:33:31 +09:00

35 lines
1.3 KiB
TOML

[package]
name = "codename_206"
version = "0.1.0"
edition = "2021"
authors = ["Mikkeli Matlock <matlockib@gmail.com>"]
homepage = "https://github.com/mikkeli/codename-206"
description = "A VST3/CLAP multiband compressor/limiter with a custom gain-curve display"
# VST3 is on by default in nih_plug, and its bindings (vst3-sys) are GPLv3. Any
# distributed VST3 binary built with them must therefore be GPL-3.0-or-later
# (or covered by a commercial Steinberg licence). CLAP carries no such requirement.
license = "GPL-3.0-or-later"
[workspace]
members = ["xtask"]
[lib]
# `cdylib` is the plugin binary; `lib` (rlib) lets `cargo test` link the unit tests.
crate-type = ["cdylib", "lib"]
[dependencies]
# Pinned to the exact commit of the local ./nih-plug reference clone so the build
# is reproducible and matches the examples we read from. Bump the `rev` together
# with `git -C nih-plug pull` when you want to update.
nih_plug = { git = "https://github.com/robbert-vdh/nih-plug.git", rev = "f36931f7af4646065488a9845d8f8c2f95252c23", features = ["assert_process_allocs"] }
nih_plug_egui = { git = "https://github.com/robbert-vdh/nih-plug.git", rev = "f36931f7af4646065488a9845d8f8c2f95252c23" }
[profile.release]
lto = "thin"
strip = "symbols"
[profile.profiling]
inherits = "release"
debug = true
strip = "none"