-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audible stepping when using synthio.LFO
on audiodelays.Echo.delay_ms
#10030
Comments
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. |
Don't have the 2350 board at the moment, can you try to replace your chord iterator lines with a single tone note, like this: to narrow things down, as I've noticed in your sound example that stepping occurs approx. every 4.2s, exactly the period of your panning parameter LFO. |
@d1ffeq-diy Thank you for the review. While setting up an updated example to simplify the demonstration, I think I've come across the problem. As per the current documentation on
Here's an audio recording of the above example, first with I'll need to double check the constructor code for |
If I replace
I can generate the graph below (in LibreOffice Calc): It looks as if the default waveform is functioning as intended, but it is somehow not affecting the effect parameter correctly unless a waveform is specified by the user. |
@relic-se any progress on tracking the LFO creation code? |
@d1ffeq-diy I haven't dig too deep into it as of yet. If you've got the know-how, feel free to poke around in the core. Otherwise, because the work-around is fairly simple (just providing your own waveform), I've got this as a low priority item atm. |
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: