diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d29614..b3b1149 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,3 +5,6 @@ about implementing new DSP nodes. * Bugfix: TriSawLFO (TsLFO) node did output too high values if the `rev` parameter was changed or modulated at runtime. +* Bugfix: Found a bug in cubic interpolation in the sample player and +similar bugs in the delay line (and all-pass & comb filters). Refactored +the cubic interpolation and tested it seperately now. diff --git a/src/dsp/node_sampl.rs b/src/dsp/node_sampl.rs index 7964a26..0fc9ca1 100644 --- a/src/dsp/node_sampl.rs +++ b/src/dsp/node_sampl.rs @@ -148,7 +148,7 @@ impl Sampl { return 0.0; } - let j = self.phase.floor() as usize; + let j = self.phase.floor() as usize % sd_len; let i = ((sd_len - 1) - j); let f = self.phase.fract();