-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Envelope Generator - Don't divide by zero #3381
Conversation
0fdbf16
to
3969b22
Compare
Removing from RC3 project as this is nothing new and needs more time. |
@zonkmachine is this targeted for 1.2? |
No. I don't think we should do any changes for 1.2 concerning NaN's and 0 divisions etc. It's not one bug and it's not introduced in 1.2 . It sucks a bit but I won't have time to work on this now. |
964a012
to
28247fc
Compare
I had a second go at this as #3687 made debugging so much easier. The ones in the envelope seems clearly defined and straight forward to just give a minimum frame of 1. This one is ready to be merged into master. It should clear up a couple of the NaN oriented bugs for sure. |
We perform division with some Envelope and LFO variables so they mustn't be zero. They are given a minimum value of one frame ( f_cnt_t ). Since LMMS#3687 we have a compile flag to turn on debugging of floating point operations. This will currently not let you pass the Envelope/LFO initiation and this is also fixed by this PR.
28247fc
to
cbf6010
Compare
Some final adjustments. To test this commit I suggest compiling with and without I intend to merge this in a day. |
We perform division with some Envelope and LFO variables so they mustn't be zero. They are given a minimum value of one frame ( f_cnt_t ). Since LMMS#3687 we have a compile flag to turn on debugging of floating point operations. This will currently not let you pass the Envelope/LFO initiation and this is also fixed by this PR.
Some think it's rude so I cleaned up
EnvelopeAndLfoParameters.cpp
a bit. I caught this because the new reverb went NaN and things shut down when I turned up the decay.I made
const f_cnt_t minimumFrames
and didn't touch the knob values even though you could give them saner minimum values but you would still need to set some of the f_cnt_t variables inEnvelopeAndLfoParameters::updateSampleVars()
so I went this way instead.In the LFO
m_lfoAttackFrames
also useminimumFrames
.