Skip to content

Commit

Permalink
bigger MAX_HAAS_MS, clamp cutoff
Browse files Browse the repository at this point in the history
  • Loading branch information
magnetophon committed Nov 2, 2024
1 parent feb06bb commit e2d1c31
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const MUTE_IN: usize = 0;
const MUTE_OUT: usize = 1;
const CLEAR_TAPS: usize = 2;
const LOCK_TAPS: usize = 3;
const MAX_HAAS_MS: f32 = 2.0;
const MAX_HAAS_MS: f32 = 5.0;

// Polyphonic modulation works by assigning integer IDs to parameters. Pattern matching on these in
// `PolyModulation` and `MonoAutomation` events makes it possible to easily link these events to the
Expand Down Expand Up @@ -1271,8 +1271,10 @@ impl Del2 {
velocity,
);
let note_cutoff = util::midi_note_to_freq(self.delay_data.notes[tap]);
let cutoff = note_cutoff * self.params.taps.note_to_cutoff_amount.value()
+ velocity_cutoff * self.params.taps.velocity_to_cutoff_amount.value();
let cutoff = (note_cutoff * self.params.taps.note_to_cutoff_amount.value()
+ velocity_cutoff * self.params.taps.velocity_to_cutoff_amount.value())
.max(10.0)
.min(20_000.0);
let drive_db = Del2::lerp(
util::gain_to_db(low_params.drive.value()),
util::gain_to_db(high_params.drive.value()),
Expand Down

0 comments on commit e2d1c31

Please sign in to comment.