Re: Lua in CTRLR 101

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

    • Topics: 159
    • Replies: 2945
    • Total: 3104
    • ★★★★★

    you can’t do
    value = setModulatorValue(whatever.....)
    this makes no sense, you need to call the setModulatorValue on an object
    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)

    assuming i understand what you want to do, that is set the value of the "Osc1Pitch" and "Osc2Pitcj" to the value of PitchBend