Home › Forums › General › Programming › Lua in CTRLR 101 › Re: Lua in CTRLR 101
July 18, 2011 at 8:14 pm
#2971
you can’t do
[code:ldl15fzk]
value = setModulatorValue(whatever.....)
[/code:ldl15fzk]
this makes no sense, you need to call the setModulatorValue on an object
[code:ldl15fzk]
OscPitchBend = function(modulator, newValue)
bend = panel:getModulatorValue("PitchBend")
pbOsc1 = panel:getModulatorByName("Osc1Pitch")
pbOsc2 = panel:getModulatorByName("Osc2Pitch")
pbOsc1:setModulatorValue (bend, true, true, true)
pbOsc2:setModulatorValue (bend, true, true, true)
end
[/code:ldl15fzk]
assuming i understand what you want to do, that is set the value of the "Osc1Pitch" and "Osc2Pitcj" to the value of PitchBend