You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The optimization at Echo.c#L313 prevents calling recalculate_delay at it's maximum rate of SYNTHIO_MAX_DUR and instead limits it to increments of sample_ms. For effects using larger delay lengths, this stepping isn't noticeable, but for effects which require a delay with a shorter delay length (ie: chorus, flanger), more granularity is required.
if (MICROPY_FLOAT_C_FUN(fabs)(self->current_delay_ms-f_delay_ms) >= self->sample_ms) {
recalculate_delay(self, f_delay_ms);
}
I'm thinking that a suitable solution is to check the difference by sample_ms / 256 when freq_shift=True (for the 8-bits of sub-resolution). That, or test the float equality using memcmp such as in the following function.
I've tested the proposed fix, and it doesn't appear to resolve the issue. I've also toyed around with a few other adjustments to no avail. Any ideas as to why this could be happening would be greatly appreciated.
CircuitPython version and board name
Code/REPL
Behavior
There is audible stepping in the chorus effect.
Here's a recording of the above example: https://drive.google.com/file/d/13qotNTCFfkoQ_GuhENawpOw9rmh5oPoS/view?usp=drive_link
Description
No response
Additional information
The optimization at Echo.c#L313 prevents calling
recalculate_delay
at it's maximum rate ofSYNTHIO_MAX_DUR
and instead limits it to increments ofsample_ms
. For effects using larger delay lengths, this stepping isn't noticeable, but for effects which require a delay with a shorter delay length (ie: chorus, flanger), more granularity is required.circuitpython/shared-module/audiodelays/Echo.c
Lines 313 to 315 in 4ba872c
I'm thinking that a suitable solution is to check the difference by
sample_ms / 256
whenfreq_shift=True
(for the 8-bits of sub-resolution). That, or test the float equality usingmemcmp
such as in the following function.circuitpython/shared-module/synthio/BlockBiquad.c
Lines 65 to 74 in 4ba872c
The text was updated successfully, but these errors were encountered: