feat(anvil): add Kick lock with offset audition
Check and Windows preview / check (anvil) (push) Canceled after 0s
Check and Windows preview / check (braze) (push) Canceled after 0s
Check and Windows preview / check (crucible) (push) Canceled after 0s
Check and Windows preview / check (knurl) (push) Canceled after 0s
Check and Windows preview / check (lathe) (push) Canceled after 0s
Check and Windows preview / check (patina) (push) Canceled after 0s
Check and Windows preview / check (planish) (push) Canceled after 0s
Check and Windows preview / check (rivet) (push) Canceled after 0s
Check and Windows preview / check (temper) (push) Canceled after 0s
Check and Windows preview / check (weld) (push) Canceled after 0s
Check and Windows preview / previews (push) Canceled after 0s
Check and Windows preview / windows (push) Canceled after 0s
Check and Windows preview / check (anvil) (push) Canceled after 0s
Check and Windows preview / check (braze) (push) Canceled after 0s
Check and Windows preview / check (crucible) (push) Canceled after 0s
Check and Windows preview / check (knurl) (push) Canceled after 0s
Check and Windows preview / check (lathe) (push) Canceled after 0s
Check and Windows preview / check (patina) (push) Canceled after 0s
Check and Windows preview / check (planish) (push) Canceled after 0s
Check and Windows preview / check (rivet) (push) Canceled after 0s
Check and Windows preview / check (temper) (push) Canceled after 0s
Check and Windows preview / check (weld) (push) Canceled after 0s
Check and Windows preview / previews (push) Canceled after 0s
Check and Windows preview / windows (push) Canceled after 0s
Anvil gets a sidechain input named Kick. With Kick lock on, kicks are found on the undelayed sidechain, so with the lookahead each hit ducks the sub (Duck, Release) when the delayed kick plays and restarts the sub at Phase, shifted by Offset (-30 to +30 ms, also before the kick). The Audition steps the offset from -30 to +30 ms, 4 kicks each, and measures how kick and sub sum below 150 Hz after each hit; Keep takes the offset heard. On a 55 Hz kick burst against a 55 Hz sub the sum peaks at 0 ms (+2.4 dB) and nearly again one period away (+/-20 ms), so the bars check the choice by ear rather than make it.
This commit is contained in:
1 parent
330ec54150
commit
fadea4c471
15 files changed
+798
-39
No files matched your search
@@ -1,4 +1,4 @@
|
||||
use anvil_core::{Settings, Source};
|
||||
use anvil_core::{Settings, Source, KICK_OFFSET_MAX};
|
||||
use nih_plug::prelude::*;
|
||||
use nih_plug_egui::EguiState;
|
||||
use std::sync::Arc;
|
||||
@@ -50,6 +50,14 @@ pub struct AnvilParams {
|
||||
pub snap: BoolParam,
|
||||
#[id = "bypass"]
|
||||
pub bypass: BoolParam,
|
||||
#[id = "kick_lock"]
|
||||
pub kick_lock: BoolParam,
|
||||
#[id = "kick_duck"]
|
||||
pub kick_duck: FloatParam,
|
||||
#[id = "kick_release"]
|
||||
pub kick_release: FloatParam,
|
||||
#[id = "kick_offset"]
|
||||
pub kick_offset: FloatParam,
|
||||
}
|
||||
impl Default for AnvilParams {
|
||||
fn default() -> Self {
|
||||
@@ -90,6 +98,16 @@ impl Default for AnvilParams {
|
||||
retrigger: BoolParam::new("Retrigger", d.retrigger),
|
||||
snap: BoolParam::new("Snap to semitone", d.snap),
|
||||
bypass: BoolParam::new("Bypass", false).make_bypass(),
|
||||
kick_lock: BoolParam::new("Kick lock", d.kick_lock),
|
||||
kick_duck: linear("Kick duck", d.kick_duck, 0., 24., " dB"),
|
||||
kick_release: linear("Kick release", d.kick_release, 10., 300., " ms"),
|
||||
kick_offset: linear(
|
||||
"Kick offset",
|
||||
d.kick_offset,
|
||||
-KICK_OFFSET_MAX,
|
||||
KICK_OFFSET_MAX,
|
||||
" ms",
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -115,6 +133,10 @@ impl AnvilParams {
|
||||
retrigger: self.retrigger.value(),
|
||||
snap: self.snap.value(),
|
||||
bypass: self.bypass.value(),
|
||||
kick_lock: self.kick_lock.value(),
|
||||
kick_duck: self.kick_duck.value(),
|
||||
kick_release: self.kick_release.value(),
|
||||
kick_offset: self.kick_offset.value(),
|
||||
}
|
||||
}
|
||||
/// Pushes every changed editor value to the host. Continuous controls hold one
|
||||
@@ -125,9 +147,9 @@ impl AnvilParams {
|
||||
old: &Settings,
|
||||
new: &Settings,
|
||||
dragging: bool,
|
||||
open: &mut [bool; 11],
|
||||
open: &mut [bool; 14],
|
||||
) {
|
||||
let floats: [(&FloatParam, f32, f32); 10] = [
|
||||
let floats: [(&FloatParam, f32, f32); 13] = [
|
||||
(&self.level, old.level, new.level),
|
||||
(&self.split, old.split, new.split),
|
||||
(&self.dynamics, old.dynamics, new.dynamics),
|
||||
@@ -138,6 +160,9 @@ impl AnvilParams {
|
||||
(&self.keep, old.keep, new.keep),
|
||||
(&self.ghost, old.ghost, new.ghost),
|
||||
(&self.ghost_from, old.ghost_from, new.ghost_from),
|
||||
(&self.kick_duck, old.kick_duck, new.kick_duck),
|
||||
(&self.kick_release, old.kick_release, new.kick_release),
|
||||
(&self.kick_offset, old.kick_offset, new.kick_offset),
|
||||
];
|
||||
let mut continuous = |i: usize, changed: bool, set: &dyn Fn()| {
|
||||
if changed {
|
||||
@@ -155,7 +180,7 @@ impl AnvilParams {
|
||||
for (i, (p, a, b)) in floats.into_iter().enumerate() {
|
||||
continuous(i, a != b, &|| setter.set_parameter(p, b));
|
||||
}
|
||||
continuous(10, old.output != new.output, &|| {
|
||||
continuous(13, old.output != new.output, &|| {
|
||||
setter.set_parameter(&self.output, new.output)
|
||||
});
|
||||
let once = |changed: bool, f: &dyn Fn()| {
|
||||
@@ -172,6 +197,7 @@ impl AnvilParams {
|
||||
(&self.retrigger, old.retrigger, new.retrigger),
|
||||
(&self.snap, old.snap, new.snap),
|
||||
(&self.bypass, old.bypass, new.bypass),
|
||||
(&self.kick_lock, old.kick_lock, new.kick_lock),
|
||||
] {
|
||||
once(a != b, &|| {
|
||||
setter.begin_set_parameter(p);
|
||||
@@ -201,6 +227,9 @@ impl AnvilParams {
|
||||
&self.keep,
|
||||
&self.ghost,
|
||||
&self.ghost_from,
|
||||
&self.kick_duck,
|
||||
&self.kick_release,
|
||||
&self.kick_offset,
|
||||
&self.output,
|
||||
][i]
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user