This is a strange code for me. Timers are independent functions, so for each timer you have to create a function.
This is how I do it, you call the first timer and from this first timer you call the second timer.
— Called when a modulator value changes
— @mod http://ctrlr.org/api/class_ctrlr_modulator.html
— @value new numeric value of the modulator
Trigger = function(–[[ CtrlrModulator –]] mod, –[[ number –]] value)
ret1 = panel:getModulatorByName(“pB001″)
ret1:setValue (1, true)
———————————————–
— /// timer:setCallback (0, timerCallback0)
— /// timer:startTimer(0,100)
end
function timerCallback0 (timerId)
ret2 = panel:getModulatorByName(“pB002″)
ret2:setValue (1, true)
timer:setCallback (1, timerCallback1)
timer:startTimer(1,200)
timer:stopTimer(0)
end
function timerCallback1 (timerId)
ret3 = panel:getModulatorByName(“pB003″)
ret3:setValue (1, true)
timer:stopTimer(1)
end