-
Notifications
You must be signed in to change notification settings - Fork 55
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
CSine<> Amplitude drift #44
Comments
As a workaround, it appears that the amplitude drift doesn't occur when using CSine double. |
Yes, for very long decays, double precision is required. For no decay, since single precision may be faster (it is on all my machines), another workaround may be to normalize 'val' every so often. Since I can't think of an automatic way to prevent drift that doesn't incur extra overhead (on each sample), I've added a note to the CSine comment section. |
We have no decay on ours. It runs away after 30 minutes with single precision. It turns out that double precision didn't fix it either, as it runs away after a longer period of time (even with no decay). We'll look into automatic normalization and see if we can fix it that way without too much overhead. |
Automatic normalization has fixed it for us. However, new bug: Higher frequencies cause the sine wave to decay instead of increase in amplitude (even with decay = -1). I believe this is occurring with frequencies > (Nyquist/2.0). Try the following: ` typedef gam::Complex complex; int main()
} |
We're having issues with CSine<> changing amplitude very slowly over time, even with decay = -1. We're experiencing audible amplitude drift after 30+ minutes.
The text was updated successfully, but these errors were encountered: