Fix presets being set and state restore#4
Open
yamadapc wants to merge 1 commit intoCycling74:mainfrom
Open
Conversation
I'm not sure if preset handling will be totally correct since the parameters would not be notifying the hosts depending on how they are called. `RNBO::JuceAudioProcessor::setCurrentProgram` does not set `_isSettingPresetAsync` as far as I can tell. This fixes the test suite referenced in Cycling74#2. Closes Cycling74#2. - https://github.com/Cycling74/rnbo.adapter.juce/blob/dd233609adc495828fa9efcf756ab2a155a3bd1d/RNBO_JuceAudioProcessor.cpp#L412-L421
Contributor
|
I think this workaround shouldn't actually be needed once we resolve 18483 in rnbo's ticketing system |
Author
|
Hey, this issue is still present in v8.6.0. Additionally, now it seems a new zeroed preset is getting output after codegen. The extra preset is output even if the |
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.
This PR tries to fix an issue where preset changes and state restore are not working with RNBO v1.2.0 due to a fix to 'notifying' parameters, that will make it so that certain parts of RNBO state aren't updated with the new parameter values on those two scenarios. I need to test further to see if this will address the issue and am not familiar with the bigger picture of this project to tell if it'd be okay or problematic for
rnbo.getParameterValueto return a different result than the state objects or parameter values.I'm not sure if preset handling will be totally correct with this change since the parameters would not be notifying the hosts depending on how they are called.
RNBO::JuceAudioProcessor::setCurrentProgramdoes not set_isSettingPresetAsyncas far as I can tell. Therefore parameter change events forsetCurrentProgramandsetStateInformationare being dropped.This change makes it so that these events aren't dropped but still skips notifying hosts. Perhaps a more robust change could be to set a flag while the
setCurrentProgramandsetStateInformationrun and handle them in the same manner as "_isSettingPresetAsync".I might be totally wrong about the whole thing as well!
This fixes the test suite referenced in #2.
Closes #2.
rnbo.adapter.juce/RNBO_JuceAudioProcessor.cpp
Lines 412 to 421 in dd23360
All the best, happy patching