Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

Feature Sample Sound Synthesis has math error #68

Open
utekai opened this issue Feb 3, 2019 · 0 comments
Open

Feature Sample Sound Synthesis has math error #68

utekai opened this issue Feb 3, 2019 · 0 comments

Comments

@utekai
Copy link

utekai commented Feb 3, 2019

osc1 = osc1 + 1.0f % 360.0f;
osc2 = osc2 + 1.002f % 360.0f;

Those lines should be:

osc1 = (osc1 + 1.0f) % 360.0f;
osc2 = (osc2 + 1.002f) % 360.0f;

The idea is to clamp osc1 and osc2 under 360, but as is just adds ( 1 % 360 = 1) each iteration.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant