So, I took that code and changed it up to change the increments on the ADSR but I ran into a new issue. The defined parameter literally goes from 0 to 100. My goal was to convert the original -100 to 100 to 0-100 (instead it gave me half the range) so that the end user didn’t see negative numbers. Do you know what function I can use to convert this?
--ADSR for Amplitude Enevelope
print ("ADSR AMPlitude Envelope +++++++++++++++++++++++++++")
--Convert AMP Attack incrments
zone1=this.parent:getZone("Synth")
function onAmpAttackChange()
zone1:setParameter(200, AmpAttack)
end
defineParameter("AmpAttack", "AmpAttack", 50, 0, 100, 1, onAmpAttackChange)
--Convert AMP Decay incrments
zone1=this.parent:getZone("Synth")
function onAmpDecayChange()
zone1:setParameter(201, AmpDecay)
end
defineParameter("AmpDecay", "AmpDecay", 50, 0, 100, 1, onAmpDecayChange)
--Convert AMP Sustain incrments
zone1=this.parent:getZone("Synth")
function onAmpSustainChange()
zone1:setParameter(202, AmpSustain)
end
defineParameter("AmpSustain", "AmpSustain", 50, 0, 100, 1, onAmpSustainChange)