Re: Lua in CTRLR 101

Home Forums General Programming Lua in CTRLR 101 Re: Lua in CTRLR 101

#2971
atom
Keymaster
  • Topics: 159
  • Replies: 2945
  • Total: 3104
  • ★★★★★

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

Ctrlr