-
Notifications
You must be signed in to change notification settings - Fork 761
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
DemandEnvGen overshooting at high curve #1355
Comments
Checked briefly. Just for the record: DemandEnvGen uses (almost) the same code as EnvGen:
vs in EnvGen:
|
Hi! I am a total new developer on this codebase, I picked this issue to learn mechanics. Along the way, I was able to fix this but am having a bit of a hard time either "taking" this bug or making a fork on my github repo. I'll work on that a little later. The problem in the DemandUGen is that the curve "grows" by exp( curve / count ) (in the setup region) where count is initialized as phase. This is then applied for each sample until phase hits zero then it's all re-initialized. But of course if count is non-integral and curve is big, you overshoot a teeny bit. So I fixed it by doing a ceil( count ) in the init, and I get perfect alignment. The constructor also seems odd; even though the example here uses .ar() the _k generator is called. I tried to fix the constructor to route to the right function, but couldn't. I applied the fix to the _a code also, though, in case. Any advice on workflow or community would be appreciated. And I'm more than happy for you to not accept the diff or suggest I do things differently or whatever. I am very conscious, like I said, of being new to the community. Thanks for any comments or suggestions.
|
Oh hey, figured it out and made a pull request which again I'm happy if you reject or accept, and again for which I apologize if I haven't followed protocol |
And (so embarrassing) the pull request with the code that compiles is #2164 sorry! |
thanks! no worries. |
This might be related to #1241 but I saw it happening at audio rate, contrary to what that report/discussion says.
The output of following code is expected to converge to a squarish shape (with some flat gaps in between) at high (negative) curvature, but produces some obvious diagonal artifacts.
The bug is definitely not in plot because I can see it in a Stethoscope too. Also, the equivalent code using EnvGen does not exhibit this bug:
The text was updated successfully, but these errors were encountered: