Is it possible to have a button for each sublayer inside the “All” layer that if activated bypasses the “All-Bus” and goes straight to the “Pianism-Bus”?
Thanks in advance for any help!
Is it possible to have a button for each sublayer inside the “All” layer that if activated bypasses the “All-Bus” and goes straight to the “Pianism-Bus”?
Thanks in advance for any help!
Assuming each sublayer has its own bus you could do something like this:
programBus = this.parent.parent:getBus()
print(programBus.name)
layers = this.parent:findLayers()
for i, layer in ipairs(layers) do
defineParameter("BypassAllBus"..i, nil, false, function() bypassChanged(i) end)
end
function bypassChanged(i)
local bus = layers[i]:getBus()
if _G["BypassAllBus"..i] then
bus:setOutputBus(programBus)
else
bus:setOutputBus(nil)
end
end