- Topics: 4
- Replies: 480
- Total: 484
I have tried to unravel what’s going on there, but it is confusing. I think I would need to have a deeper understanding of C++ than I do to really know what’s going on, but what I meant by value(“changedByLua”,5) is that if you change a modulator using lua ie from a function triggered by an incoming midi message or another modulator you will notice ‘source’ passes in 5. If the user adjusts the dial, you will see 4 passed in.
I discovered this and have used it in the C-PLG150-AN, but have not really read about it on the forums. I’m sure it would be referred to somewhere else though. ctrlr.org/c-plg150-an/
So if you had a function like:
runsource = function(--[[ CtrlrModulator --]] mod, --[[ number --]] value, --[[ number --]] source) panel:getLabel("d"):setText(""..source) end
… all you would need to do to filter out non-user GUI changes to the modulator:
runsource = function(--[[ CtrlrModulator --]] mod, --[[ number --]] value, --[[ number --]] source) if source == 4 then --run the code end end
See attached panel.
- This reply was modified 7 months ago by dnaldoog. Reason: reworded confusing text