Home › Forums › General › Programming › Sysex problem – doubled sysex recived. › Reply To: Sysex problem – doubled sysex recived.
Sometimes it’s possible that the HOST will re-send the value you are setting again, so you get two parameter changes, one triggered from the host and one by you. I’m working on a mechanism that will show you in Lua where the change came from. But i’m not sure if it will help a lot, i will look into that double/message problem anyway.
Ok – now i have small progress:
1. DAW when saving session make the ctrl double call luaPanelSaveState
this was my DAW problem – i opened vst in another one and the scipt is callen once like it should
This may be the problem :
Problems recalling plugin state versus current preset
I found workaround with simple timer to check minimal time between saves.
DawSaveRequest= function(--[[ ValueTree --]]stateData)
-- Makee sure that message is not doubled
if lastSaveTime == nil then
GetLastRigFileName()
console('DAW saves data')
else
lapse = (Time.getMillisecondCounterHiRes() - lastSaveTime)/1000
if lapse>0.1 then
--console(String(lapse))
console('DAW saves data')
GetLastRigFileName()
end
end
lastSaveTime=Time.getMillisecondCounterHiRes()
end
Now I have second problem:
2. My simple midiMessageRecived script is called twice but in midi monitor i have only one incoming message.
What i found is when i change panelMidiCtrlrDevice to none and then back to my Midi Device – the midiMessageRecived is called once per incoming message.
Temporary workaround is to run script after panel is loaded:
initialize = function()
a=panel:getProperty("panelMidiControllerDevice")
panel:setPropertyString("panelMidiControllerDevice","-- None")
panel:setPropertyString("panelMidiControllerDevice",a)
console(a)
end
- This reply was modified 8 years, 6 months ago by daimondamps.
- This reply was modified 8 years, 6 months ago by daimondamps.