feat(patina): rebuild resonance detector, simplify controls, new look
Check and Windows preview / check (patina) (push) Successful in 1m48s
Check and Windows preview / check (rivet) (push) Successful in 1m26s
Check and Windows preview / previews (push) Successful in 55s
Independent plugin release / plan (push) Successful in 7s
Check and Windows preview / windows (push) Successful in 1m41s
Independent plugin release / build (push) Successful in 2m28s
Independent plugin release / publish (push) Successful in 7s
Check and Windows preview / check (patina) (push) Successful in 1m48s
Check and Windows preview / check (rivet) (push) Successful in 1m26s
Check and Windows preview / previews (push) Successful in 55s
Independent plugin release / plan (push) Successful in 7s
Check and Windows preview / windows (push) Successful in 1m41s
Independent plugin release / build (push) Successful in 2m28s
Independent plugin release / publish (push) Successful in 7s
Patina 0.2.0. The old detector compared raw FFT bins with a one-octave dB mean, so every harmonic of a tonal sound looked like a resonance and real harsh bumps were barely touched. The new detector: - averages power over each log band and smooths it over time - joins harmonic tops into an envelope, smoothed by Sharpness - compares it with a robust, tilt-aware local line fit that ignores empty regions and cannot be lifted by the bump itself Six overlapping controls become Depth, Sharpness and Selectivity; focus points now read "up cuts more, down protects". The analysis window is halved to 2048 samples (about 43 ms delay). Behaviour tests cover plain harmonic tones, resonant bumps, narrow rings, level independence, flicker on noise and high sample rates. Both editors get a dark metallic look with #FF0160 as the single accent colour; screenshots and docs are updated. Projects saved with Patina 0.1 load the new controls at their defaults.
This commit is contained in:
1 parent
15853e61ac
commit
17c6fe3ab9
25 files changed
+1074
-539
No files matched your search
@@ -42,18 +42,12 @@ impl Default for FocusParams {
|
||||
pub struct PatinaParams {
|
||||
#[persist = "editor"]
|
||||
pub editor: Arc<EguiState>,
|
||||
#[id = "amount"]
|
||||
pub amount: FloatParam,
|
||||
#[id = "sensitivity"]
|
||||
pub sensitivity: FloatParam,
|
||||
#[id = "max-cut"]
|
||||
pub max_cut: FloatParam,
|
||||
#[id = "neighborhood"]
|
||||
pub neighborhood: FloatParam,
|
||||
#[id = "cut-width"]
|
||||
pub cut_width: FloatParam,
|
||||
#[id = "knee"]
|
||||
pub knee: FloatParam,
|
||||
#[id = "depth"]
|
||||
pub depth: FloatParam,
|
||||
#[id = "sharpness"]
|
||||
pub sharpness: FloatParam,
|
||||
#[id = "selectivity"]
|
||||
pub selectivity: FloatParam,
|
||||
#[id = "attack"]
|
||||
pub attack: FloatParam,
|
||||
#[id = "release"]
|
||||
@@ -75,19 +69,17 @@ pub struct PatinaParams {
|
||||
}
|
||||
impl Default for PatinaParams {
|
||||
fn default() -> Self {
|
||||
let d = Settings::default();
|
||||
Self {
|
||||
editor: EguiState::from_size(1180, 760),
|
||||
amount: linear("Amount", 35., 0., 100., " %"),
|
||||
sensitivity: linear("Sensitivity", 6., 0., 24., " dB"),
|
||||
max_cut: linear("Max cut", 3., 0., 18., " dB"),
|
||||
neighborhood: linear("Neighborhood", 1., 0.25, 2., " oct"),
|
||||
cut_width: linear("Cut width", 0.08, 0.03, 0.5, " oct"),
|
||||
knee: linear("Knee", 3., 0., 12., " dB"),
|
||||
attack: log("Attack", 15., 1., 200., " ms"),
|
||||
release: log("Release", 120., 10., 1000., " ms"),
|
||||
transient_guard: linear("Transient guard", 50., 0., 100., " %"),
|
||||
low: log("Low frequency", 120., 20., 19999., " Hz"),
|
||||
high: log("High frequency", 12000., 21., 20000., " Hz"),
|
||||
depth: linear("Depth", d.depth, 0., 20., " dB"),
|
||||
sharpness: linear("Sharpness", d.sharpness, 0., 100., " %"),
|
||||
selectivity: linear("Selectivity", d.selectivity, 0., 100., " %"),
|
||||
attack: log("Attack", d.attack, 1., 200., " ms"),
|
||||
release: log("Release", d.release, 10., 1000., " ms"),
|
||||
transient_guard: linear("Transient guard", d.transient_guard, 0., 100., " %"),
|
||||
low: log("Low frequency", d.low, 20., 19999., " Hz"),
|
||||
high: log("High frequency", d.high, 21., 20000., " Hz"),
|
||||
mix: linear("Mix", 100., 0., 100., " %"),
|
||||
output: linear("Output", 0., -12., 12., " dB"),
|
||||
bypass: BoolParam::new("Bypass", false).make_bypass(),
|
||||
@@ -96,14 +88,11 @@ impl Default for PatinaParams {
|
||||
}
|
||||
}
|
||||
impl PatinaParams {
|
||||
pub fn floats(&self) -> [&FloatParam; 29] {
|
||||
pub fn floats(&self) -> [&FloatParam; COUNT] {
|
||||
[
|
||||
&self.amount,
|
||||
&self.sensitivity,
|
||||
&self.max_cut,
|
||||
&self.neighborhood,
|
||||
&self.cut_width,
|
||||
&self.knee,
|
||||
&self.depth,
|
||||
&self.sharpness,
|
||||
&self.selectivity,
|
||||
&self.attack,
|
||||
&self.release,
|
||||
&self.transient_guard,
|
||||
@@ -131,12 +120,9 @@ impl PatinaParams {
|
||||
}
|
||||
pub fn settings(&self) -> Settings {
|
||||
let mut s = Settings {
|
||||
amount: self.amount.value(),
|
||||
sensitivity: self.sensitivity.value(),
|
||||
max_cut: self.max_cut.value(),
|
||||
neighborhood: self.neighborhood.value(),
|
||||
cut_width: self.cut_width.value(),
|
||||
knee: self.knee.value(),
|
||||
depth: self.depth.value(),
|
||||
sharpness: self.sharpness.value(),
|
||||
selectivity: self.selectivity.value(),
|
||||
attack: self.attack.value(),
|
||||
release: self.release.value(),
|
||||
transient_guard: self.transient_guard.value(),
|
||||
@@ -159,15 +145,14 @@ impl PatinaParams {
|
||||
s
|
||||
}
|
||||
}
|
||||
pub fn values(s: &Settings) -> [f32; 29] {
|
||||
let mut v = [0.; 29];
|
||||
v[..13].copy_from_slice(&[
|
||||
s.amount,
|
||||
s.sensitivity,
|
||||
s.max_cut,
|
||||
s.neighborhood,
|
||||
s.cut_width,
|
||||
s.knee,
|
||||
/// Host float parameters: ten main controls, then four per focus point.
|
||||
pub const COUNT: usize = 26;
|
||||
pub fn values(s: &Settings) -> [f32; COUNT] {
|
||||
let mut v = [0.; COUNT];
|
||||
v[..10].copy_from_slice(&[
|
||||
s.depth,
|
||||
s.sharpness,
|
||||
s.selectivity,
|
||||
s.attack,
|
||||
s.release,
|
||||
s.transient_guard,
|
||||
@@ -177,7 +162,7 @@ pub fn values(s: &Settings) -> [f32; 29] {
|
||||
s.output,
|
||||
]);
|
||||
for i in 0..4 {
|
||||
v[13 + i * 4..17 + i * 4].copy_from_slice(&[
|
||||
v[10 + i * 4..14 + i * 4].copy_from_slice(&[
|
||||
f32::from(s.focus[i].enabled),
|
||||
s.focus[i].frequency,
|
||||
s.focus[i].width,
|
||||
|
||||
Reference in new issue
Block a user