Skip to content

Commit

Permalink
amp envelope after filter
Browse files Browse the repository at this point in the history
so we fade any self resonance click free
  • Loading branch information
magnetophon committed Dec 5, 2024
1 parent 1d408d7 commit ed2a6ca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -915,8 +915,7 @@ impl Plugin for Del2 {
.pan_gain
.next_block(&mut self.delay_tap_pan_gain, block_len);
for (value_idx, sample_idx) in (block_start..block_end).enumerate() {
let pre_filter_gain =
global_drive[value_idx] * self.delay_tap_amp_envelope[value_idx];
let pre_filter_gain = global_drive[value_idx];
// if self.delay_tap_amp_envelope[value_idx] != 1.0 && self.delay_tap_amp_envelope[value_idx] != 0.0 {
// nih_log!("self.delay_tap_amp_envelope[value_idx]: {}", self.delay_tap_amp_envelope[value_idx]);
// }
Expand Down Expand Up @@ -978,7 +977,9 @@ impl Plugin for Del2 {
// Process the output and meter updates
let mut amplitude = 0.0;
for (value_idx, sample_idx) in (block_start..block_end).enumerate() {
let post_filter_gain = dry_wet[value_idx] * wet_gain[value_idx]
let post_filter_gain = dry_wet[value_idx]
* wet_gain[value_idx]
* self.delay_tap_amp_envelope[value_idx]
/ (drive * global_drive[value_idx]);
let pan_gain = self.delay_tap_pan_gain[value_idx];
let left = delay_tap.delayed_audio_l[sample_idx]
Expand Down

0 comments on commit ed2a6ca

Please sign in to comment.