Hi FedericoS,
You can adapt the setParameterOfZones function to make it work with modulation matrix parameters:
function setModParameterOfZones(rowNumber, parameterName, value)
local zones = this.parent:findZones(true)
for i, zone in ipairs(zones) do
local modRow = zone:getModulationMatrixRow(rowNumber)
modRow:setParameter(parameterName, value)
end
end
setModParameterOfZones(1, "Destination.Depth", 25)
You could also combine the two and use it for both regular zone parameters and modulation matrix parameters:
-- last argument is optional
-- only used with modulation matrix parameters
function setParameterOfZones(parameterName, value, rowNumber)
local zones = this.parent:findZones(true)
for i, zone in ipairs(zones) do
if rowNumber and type(rowNumber) == "number" then
local modRow = zone:getModulationMatrixRow(rowNumber)
modRow:setParameter(parameterName, value)
else
zone:setParameter(parameterName, value)
end
end
end
setParameterOfZones("ZoneType", 1)
setParameterOfZones("Destination.Depth", 50, 1)