Adressing Quick Controls

Yes that’s right.

You need to be careful when using “this.program” though.
It should work fine in your program as it is now. But if you loaded the entire program as a layer into another program then what was originally program becomes a layer of the new program. Calling “this.program” would return a different object (program) and your script might not work as expected.

But you could also address the “SIMPLE” layer as parent of the parent of the script module (parent of “Engine” layer)

Engine = this.parent
SIMPLE = Engine.parent

Or you could do it directly. Even though it looks like a typing mistake it should work:

SIMPLE = this.parent.parent



Also if you don’t mind can you help me address effects? I tried to use the manual but failed. I’m trying to tie two effect parameters (from different effects) to the same parameter. I feel like I have the right idea but the issue has to do with the position of the parameter definition or function line.

This is actually quite clever. Just change line 6 to:

if effect1 and effect2 then

So only if it finds both effects then it defines the parameter and its function.

bus = this.parent:getBus("Internal FX")
if bus then
    --locate the distortion effect of the bus
    effect1 = bus:getEffect("Overdrive")
    effect2 = bus:getEffect("Distortion")
    if effect1 and effect2 then
        function onDistortionMixChange()
            effect2:setParameter(13, DistortionMix)
            effect1:setParameter(0, DistortionMix)
        end
        defineParameter("DistortionMix", "DistortionMix", 50, 0, 100, 1, onDistortionMixChange)
    end
end