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
@@ -99,13 +99,26 @@ fn main() {
|
||||
let mut anvil_state = anvil_ui::State::default();
|
||||
if anvil {
|
||||
anvil_settings.ghost = 60.;
|
||||
anvil_settings.kick_lock = true;
|
||||
anvil_state.audition = true;
|
||||
let monitor = anvil_core::Monitor {
|
||||
audition: true,
|
||||
..Default::default()
|
||||
};
|
||||
let mut engine = anvil_core::Engine::new(48000., 2).unwrap();
|
||||
engine.set_settings(anvil_settings).unwrap();
|
||||
let mut saw = common_dsp::Saw::new(48000., 43.65);
|
||||
for i in 0..36000 {
|
||||
// A distorted F1 bass whose own sub drifts in phase and level.
|
||||
let total = 300000;
|
||||
for i in 0..total {
|
||||
// A distorted F1 bass whose own sub drifts in phase and level, and a kick every
|
||||
// 0.2 s in the sidechain while the audition runs.
|
||||
let x = (saw.sample() * 1.6 + 0.3 * (i as f32 * 0.0009).sin()).tanh() * 0.4;
|
||||
engine.process_sample([x, x], anvil_core::Monitor::default());
|
||||
let t = (i % 9600) as f32 / 48000.;
|
||||
let kick = 0.8 * (std::f32::consts::TAU * 50. * t).sin() * (-t / 0.06).exp();
|
||||
engine.process_with_kick([x, x], kick, monitor);
|
||||
if i < total - 36000 {
|
||||
continue;
|
||||
}
|
||||
if i % 1600 == 0 {
|
||||
anvil_state.accept_frame(engine.take_analyzer());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user