Home › Forums › General › Programming › LUA Scripts in Positive Feedback Loop › Reply To: LUA Scripts in Positive Feedback Loop
June 21, 2020 at 1:21 am
#118849
You could also have a global toggle in the midiReceived function
in an init function when panel loads
myGlobalBlock=false
then:
midiRecieved=function(--[[ CtrlrMidiMessage --]] midi)
myGlobalBlock=true
-- run midi received code
--uiSlider will be triggered but code not run
myLfo:setValue(val,false) -- could also set to true here
myGlobalBlock=false -- reset back to false
end
and in the callback function attached to the uiSlider myLfo function:
if myGlobalBlock==false then
-- run code
end
Again untested pseudo code, but something to consider and play around with!
?