Handling Unloaded Effects in MasterFX Script Without Errors
-
Hi there,
I’m working on a project where I have 3 HardcodedMasterFX modules. I have a total of 10 effects that can be loaded into these three modules via comboboxes in the UI.
My question is: How can I make sure that my control sliders still work without causing errors, even if a specific effect is mentioned in the script but hasn’t been loaded into the HardcodedMasterFX?
Right now, if the effect module isn’t loaded, the script throws an error because it can’t find the referenced module. Is there a way to check if a module exists before trying to access its parameters, or to make the script more flexible for such cases?
-
@treynterrio I recently shared this as one (easier) method for handling dynamic effect loading and unloading:
Modular FX Template - changing Fx order with drag and drop panels
@AxiomCrux Noo unfortunatley I don't believe you can add and delete modules in the module tree (at least not in HISE script). Probably you would experience t...
Forum (forum.hise.audio)
In your particular use case yes it is possible. What I've done in the past is written out all the knob values in JSON. I then used a timer (though a broadcaster would be better) to check for what effect is loaded in what effect slot. Then you update the parameters of the knobs based on the network name.
-
@HISEnberg thank you! I'll have a look now