Get Network Name from Hardcoded Master FX
-
I have an effect slot which contains a Hardcoded Master FX.
I save my Hardcoded Master FX by usingEngine.addModuleStateToUserPreset('Effect Slot1');
This works fine I can restore all states.
I would like to know which Network is currently loaded inside the Hardcoded Master FX.
By getting the ID of the effect itself I am only getting 'Hardcoded Master FX'. When opening the preset in a text editor, I can see that the network name is saved (so it can be restored).Is there a way I can get the network name from a Hardcoded Master FX module?
<Processor Type="Hardcoded Master FX" ID="Effect Slot1_Hardcoded Master FX" Bypassed="0" Network="Delay" Time="1.0" Fade="1.0"> ...
Thanks in advance!
-
@oskarsh Does
SlotFX.getCurrentEffectId()
work? -
@d-healey just prints
Hardcoded Master FX
which is technically correct. -
@oskarsh What about
SlotFX.getCurrentEffect()
? Does it return the loaded effect from which you can then get the ID? -
@d-healey getting the effect first then the id yields:
Effect Slot1_Hardcoded Master FX
.I feel like this is a special case since the effects were probably designed without having 'sub effects' in mind. I have not yet checked the source code but HISE might be lacking such a function.
-
@d-healey also
SlotFX.getCurrentEffect().getAttributeId(index);
is only returning the parameters that are assigned.I think one really cheeky work around would be to define a new parameter inside my ScriptFX named after the Network itself and get it via the
getAttributeId(index)
.@Christoph-Hart do you have some insights on this topic?
-
@oskarsh said in Get Network Name from Hardcoded Master FX:
I think one really cheeky workaround would be to define a new parameter inside my ScriptFX named after the Network itself and get it via the
getAttributeId(index)
.This works!
I simply named the first parameter which is not connected to anything with my Network name. By usingSlotFX.getCurrentEffect().getAttributeId(0)
I can get the corresponding network name.This almost felt like rubber duck debugging ^^
thanks @d-healey ! -
-
-
A work around but not a good solution