(fix) avoid automatic key offset after track load with keylock mode 'Keep current key'#16460
Open
ronso0 wants to merge 3 commits into
Open
(fix) avoid automatic key offset after track load with keylock mode 'Keep current key'#16460ronso0 wants to merge 3 commits into
ronso0 wants to merge 3 commits into
Conversation
Member
Author
|
Yes, this definitly fixes it for me. No key issues anymore in a 5h set 🎉 Will fixup the unused param issues and add a regression test soon. |
…n and LockCurrentKey mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Final fix for #12027
The issue is that track load triggers a cascade of calls in
KeyControlwhich lead to unintended und annoying key offsets on track load withReproduce issue / confirm fix:
reset_keycontrol -> key is reset, pitch = 0-> previously: pitch != 0
-> now: pitch = 0
The issue stems from the fact that in #1222 we decided to not make the Key knob (
pitch_adjust) jump when locking so that users can easily turn back to original key with it.The consequence is that
pitch_adjustshould stay steady on track load.The culprit is that
BaseTrackPlayerImpl::slotTrackLoaded()did always resetpitch_adjustto0on track load.The fix is to reset
pitch(notpitch_adjust) to0in this case (key locked with "Keep current key").Works beautifully and key tests pass 🤷♂️
FWIW actually we should refactor KeyControl as it seems too complicated with all its interleaved, potentially infinitly looping valueChanged() connections, as well as the interaction with BaseTrackPlayer and EngineBuffer, but I'm certainly not gonna refactor that, so consider this a quick but solid fix.