Exclude UI elements from updateConnectedComponentsFromModuleState()
-
Hey all! :-)
Is there a way to exclude certain UI elements from
UserPresetHandler.updateConnectedComponentsFromModuleState(), even if they are connected to a module viaprocessorID / parameterId?Thanks,
Oli -
@Oli-Ullmann yes, you can give it a list of properties to remove from the module state, if they are parameter IDs they will be static
-
Okay, I'm a little lost. I tried the following:
ph.updateConnectedComponentsFromModuleState([“rvsldAttackGlobalEnv1”]);<- The name of the sliderph.updateConnectedComponentsFromModuleState([rvsldAttackGlobalEnv1]);<- The slider as an objectBoth give me the following error message:
argument amount mismatch: 1, Expected: 0Basically, I have a problem with the mod system here:
I control the attack of an envelope with a slider viaprocessorId/parameterId. The attack slider is saveInPreset and has a matrixTargetId. I have set an LFO as the modulation source for the slider.So I modulate the attack of the envelope with this LFO.
When I load a preset,
updateConnectedComponentsFromModuleState()is called in the postCallback. Not for the envelope. Its module status is not stored in the preset at all. I need this for other elements. However, since the slider is connected to the envelope via theprocessorID/parameterID, it is still updated. The problem here is the modulation. Apparently, the sequence is as follows:- Preset is loaded (all UI elements with saveInPreset are loaded correctly)
- Modulation of the envelope attack by the LFO begins.
- Only now is the slider updated by
updateConnectedComponentsFromModuleState(), which causes the slider to receive the incorrect, already modulated value of the envelope attack.
I think one solution would be to control the attack of the envelope not via
processorId / parameterId, but to do the whole thing manually in SliderControlCallback. Then the slider won't be updated. However, this is not a good solution in principle, as HISE'sprocessorId / parameterIdsystem can then no longer be used with sliders that are connected to module parameters via it and also are modulable via the matrixTargetId .That's why my idea was to exclude the attack slider from
updateConnectedComponentsFromModuleState().Or do you have another idea?
-
@Oli-Ullmann said in Exclude UI elements from updateConnectedComponentsFromModuleState():
The attack slider is saveInPreset
That's your problem. You're basically saving it twice. Just set
saveInPresetto false and let the module state do its job. You can use this methodto update all sliders after the preset has been loaded.