AMP Envelope Curve Parameter - assign?

Is there any clever way (via LUA?) to access the envelop curve parameter, and have it as a modulation or macro knob target?
Thx.

You need to get the array with envelope points, modify the curve of desired point and then use the modified array to set the envelope points parameter of the zone.

Something like:

ampEnvPointIndex = 2

function setAmpCurve()
	local zones = this.parent:findZones(true)	
	for i, zone in ipairs(zones) do
		local envelopePoints = zone:getParameter("Amp Env.EnvelopePoints")
		if envelopePoints[ampEnvPointIndex] then
			envelopePoints[ampEnvPointIndex].curve = Curve
		end
		zone:setParameter("Amp Env.EnvelopePoints", envelopePoints)
	end	
end

defineParameter("Curve", nil, 0, -1, 1, setAmpCurve)

If you have a single zone and you know the envelope will not change you can move some of the variables out of the function and make it more simple.

ampEnvPointIndex = 2
zone = this.parent:getZone()
envelopePoints = zone:getParameter("Amp Env.EnvelopePoints")

function setAmpCurve()
	envelopePoints[ampEnvPointIndex].curve = Curve			
	zone:setParameter("Amp Env.EnvelopePoints", envelopePoints)	
end

defineParameter("Curve", nil, 0, -1, 1, setAmpCurve)

insertEnvelopePoint - HALion 7.0.0 (steinbergmedia.github.io)

1 Like

U Da Man! Thx much.