feat(patina): per-band compressor gain stage with Threshold, Ratio and Knee

Tester feedback asked for a threshold and a ratio. Each band now cuts like a
small compressor: Threshold (dB above the local floor) replaces Selectivity,
Ratio scales the cut per dB above it (inf:1 is the old behaviour), and a
Soft/Hard knee switch sets the curve. A small graph shows bump height in, cut
out. Mix and Output move to the slider panel so the detection panel fits.
common-ui gains rotary_text for knobs with custom value text.
This commit is contained in:
nvrl committed 2026-11-06 17:29:54 +01:00
1 parent 7b989f7685
commit 9ca4e4f9dd
13 files changed
+568 -102

No files matched your search

+13 -1
View File
@@ -237,7 +237,19 @@ one period of the note, so heavy settings do not ripple at f0. See [Planish](pla
- **Knurl**: velocity or note selects the pattern. Stereo grit above a split
only. Drift (planned for 0.3).
- **Patina**: Tone guard (done, Patina 0.4.0). MIDI as its pitch source. M/S
processing.
processing. Threshold, Ratio and Soft/Hard knee from tester feedback (done,
unreleased 0.5.0). Next, from the same feedback round:
- An absolute level gate (dBFS) so quiet passages are never cut, if the
tester meant a loudness threshold rather than a prominence threshold.
- Narrow rings on dense or noisy material are under-read: a +12 dB ring
(Q 25) on noise reads only 3–6 dB above the floor, so it is cut by 1–3 dB.
Two causes, measured: the joined-tops envelope lifts the floor to the noise
peaks (about 5 dB above the noise mean), and envelope smoothing loses about
3 dB on a narrow ring. A floor that follows Sharpness (1/3–2 octaves) was
tried and rejected: it lost a resonant lowpass, absorbed broad bumps and cut
plain harmonic tones. Better candidates: join tops only across deep gaps
(harmonic spacing), or a mean-based floor for noise-like regions.
- A finer analysis grid (1024 cells) for narrow rings at high frequencies.
- **Weld**: delay spread display (done, Weld 0.3.0). A *gentle* fit option
that keeps the delay spread under a limit, for plucky layers. Alignment slots
per note or per switch-up. The External
+17
View File
@@ -1,5 +1,22 @@
# Patina changelog
## Unreleased (0.5.0)
- Each band now works like a small compressor. Add **Ratio** (1:1 to ∞:1,
default ∞:1): low ratios leave small bumps nearly alone and still cut big ones
hard. ∞:1 is the old behaviour.
- Replace Selectivity (%) with **Threshold** (0–18 dB above the local floor,
default 3 dB, which equals the old default of 50 %).
- Add a **Soft/Hard knee** switch. Soft widens the knee from 3 dB to 6 dB;
Hard uses a 1 dB knee and half the Attack time.
- Show the gain curve (bump height in, cut out) under the knobs.
- Mix and Output move to the slider panel under the plot.
- Retune the Vocal harshness, Snare ring, Bright synth and Bass line presets
with Ratio and more Depth.
- Breaking: FL Studio projects saved earlier load Threshold, Ratio and Knee at
their defaults. Settings files for `patina-render` with `selectivity` still
load and convert.
## 0.4.0
- Add **Tone guard** (0–100 %, default 0 %). Patina follows the played note and
+28 -13
View File
@@ -1,7 +1,7 @@
# Patina
Patina smooths a sound’s rough surface without erasing its character. Formerly
**Resonance Compressor**; current version **0.4.0**.
**Resonance Compressor**; current version **0.4.0** (0.5.0 unreleased).
A mixing effect that finds harsh, ringing regions as they happen and pulls them
down, while plain harmonic tone passes. Independently designed in Rust; no claim
@@ -20,18 +20,30 @@ redistributed packages.
## Work with it
Three controls decide what happens:
Each band works like a small compressor. It compares its level with the local floor
around it and cuts only the part that sticks out:
- **Depth** is the largest cut, in dB. 0 dB does nothing.
- **Depth** is the largest cut per band, in dB. 0 dB does nothing.
- **Sharpness** sets what counts as a resonance. Low values follow broad,
smooth bumps (honk, boxiness). High values target narrow rings and whistles.
- **Selectivity** sets how far a bump must stand out before it is cut. Low
values treat any bump; high values treat only the worst.
- **Threshold** is how far (dB) a band must rise above its neighbours before it
is cut. Low values treat any bump; high values treat only the worst.
- **Ratio** is how hard a bump above the threshold is cut. At n:1 a bump ends
1/n as far above the threshold as it started. Low ratios leave small bumps
nearly alone and still cut big ones; ∞:1 flattens every bump to the
threshold (this is how Patina worked before 0.5).
- **Knee**: Soft fades cuts in around the threshold. Hard starts them right at
the threshold and uses half the Attack time.
Start with Depth around 6 dB. Raise Selectivity until only the harsh parts show
cuts, then use Delta to hear what is removed. Restrict Low/High frequency to keep
the source’s body out of reach. Attack and Release set how quickly cuts grow and
recover; Transient guard briefly relaxes cuts on attacks to keep punch.
The small graph under the knobs shows the result: bump height above the floor
in, cut out, with the threshold and the Depth limit.
Start with Depth around 6 dB. Raise Threshold until only the harsh parts show
cuts, then use Delta to hear what is removed. To hit big resonances hard and
leave small ones alone, raise Depth to 12–20 dB and set Ratio to 2:1–4:1.
Restrict Low/High frequency to keep the source’s body out of reach. Attack and
Release set how quickly cuts grow and recover; Transient guard briefly relaxes
cuts on attacks to keep punch.
### Tone guard for bass lines
@@ -61,7 +73,7 @@ on the plot drag the processing limits.
On the plot, the grey fill is the measured input. The bright line is what the
detector hears (its smoothed spectral envelope); the dim line is what it expects
there. Accent-coloured cuts appear where the bright line rises above the dim one
by more than Selectivity allows. The blue curve is the focus/protect shape.
by more than Threshold allows. The blue curve is the focus/protect shape.
Delta plays delayed dry minus wet before output trim. Use it to inspect changes,
then return to normal monitoring to decide whether the music improved.
@@ -83,8 +95,9 @@ window size persist; Delta does not.
4. The reference is a robust local straight-line fit over 2–3 octaves: spectral
tilt is expected, bumps cannot raise their own reference, and empty regions
(below a fundamental, beyond a filter cutoff) are ignored.
5. Envelope minus reference, above the Selectivity threshold, becomes the cut,
limited by Depth, smoothed with Attack/Release, and linked across stereo.
5. Envelope minus reference is the band's height above its floor. Above
Threshold it becomes a cut through the Knee and Ratio curve, limited by
Depth, smoothed with Attack/Release, and linked across stereo.
## Timing and limits
@@ -142,7 +155,9 @@ The CLAP ID is now `io.narl.bass-foundry.patina` (earlier builds used
`io.storyboard.resonance-compressor`). Hosts treat Patina as a new plugin, so
add it again in projects saved with an earlier build. Version 0.2 replaced
Amount, Sensitivity, Max cut, Neighborhood, Cut width, and Knee with Depth,
Sharpness, and Selectivity. Delete the old plugin file, place `Patina.clap`, and
Sharpness, and Selectivity; version 0.5 replaced Selectivity with Threshold
(dB), Ratio and Knee, so projects saved earlier load Threshold at its default.
Delete the old plugin file, place `Patina.clap`, and
rescan FL Studio.
Source is grouped into `plugins/patina/{core,ui,render,plugin}`. See
Binary file not shown.

Before

Width:  |  Height:  |  Size: 420 KiB

After

Width:  |  Height:  |  Size: 417 KiB