-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Fix Envelope/LFO knob scaling and add Tempo Sync #7811
base: master
Are you sure you want to change the base?
Conversation
I tested this PR with demos/JousBoxx-BuzzerBeater and it sounds OK on playback. However, the sensitivity of the knobs I believe to be a regression in this PR. Now, adjusting the parameters is much less fine-grained. Here's a comparison video. envelope.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Request for knob sensitivity to be reconsidered.
… instead of attributes. And make upgraded knobs log by default.
TLDR It should be fixed now. I think the behavior you are experiencing is due to old project knobs being updated to the correct values, but the knobs still staying in linear scale, rather than logarithmic (on the gui side). Since the range of possible values for something like attack in master goes from 0 to 20 seconds, I made the knobs go from 0 to 20, but this is a very large range which most users will not need, so I also made the knobs logarithmic by default (on the gui side of course; the actual value of the knob does not change, just the sensitivity scaling) But, knobs in old projects which were set to linear would keep their scaling and not update to be logarithmic. (Or at least that's what I thought; it's a bit more complicated than that since there are two ways knobs can be stored in the xml, either as attributes or as child nodes; only knobs stored as child nodes can have special things like scale types or automation. Then I realized that the upgrade routine didn't account for that, so reworked it so that it should upgrade the knobs correctly even if they are stored as child nodes. Aaand just because I could, I decided to also force the old env/lfo knobs to be set to logarithmic by default, which should hopefully fix the issue you are experiencing and make it easier to use) I still don't know what we should do about upgrading automated knobs. |
This PR fixes the scaling of the knobs in the envelope/LFO tab of instruments to give the knobs meaningful values. Previously, the value in the knobs were first squared and then multiplied by a constant before used in calculating the envelope time, which is not intuitive. I have changed it so that the value shown on the knob is exactly how long, in seconds, that part of the envelope will last. This also means that the knobs can be tempo-synced, so that users can precisely time the lengths of the attack/decay to match the beat.
Preview
Knobs values are in seconds now:
And you can tempo-sync them:
NOTE!
Changes
expKnobVal()
withinEnvelopeAndLfoParameters.cpp
, and reworked the calculations to use raw seconds. This required changing the model min/max's to allow for the same range.TempoSyncKnob
s/TempoSyncFloatModel
s, and set them to logarithmic by default.Also why is expKnobVal used in the filter cutoff calculation? Like why? Doesn't that mean the filter cutoff isn't linearly moving with the envelope, unlike the volume or resonance? (???)
Notes about testing
This PR needs to be tested with old projects to make sure everything sounds the same! I tried my best to make sure the upgrade routine works correctly, but it is possible I could have made a mistake somewhere. If the envelope/lfos of old instruments aren't behaving the same as they did, please let me know!