-
Notifications
You must be signed in to change notification settings - Fork 137
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
How can I force a waveform to be updated only when it has finished playing #121
Comments
Ah, yeah, that's tricky. The trouble is that the |
Thank you, that's a very good idea. However, if I'm correct, for each Oscil I'd need two Lines patched to the same UGenInput (for fading in and out), but that's not possible. Is there something I'm missing? |
You only need one |
When using an Oscil, the waveform can simply be a float array, which is not copied but referred to, so in order to swap the waveform it is sufficient to change every element of the array. However, if the waveform needs to be updated frequently, this creates a lot of discontinuities in the signal, resulting in a popping sound for each swap. This happens also for all the wavetable modifiers like flip(), invert(), ... I would like to have a sort of "protection" when updating the waveform, so that it will be effectively changed only when the current one has finished playing. In that way, as long as the last value of a waveform and the first value of the next one are similar, there should be no popping sound. I've left a simple processing sketch to show the problem.
wavetableproblem.txt
Is there a way to do that with existing methods? I've tried with Audiolisteners but without any luck.
If not, how can I solve this problem considering I'm not a super-advanced coder?
Thank you
The text was updated successfully, but these errors were encountered: