Reply To: LUA Scripts in Positive Feedback Loop

Home Forums General Programming LUA Scripts in Positive Feedback Loop Reply To: LUA Scripts in Positive Feedback Loop

#118847
dnaldoog
Participant
    • Topics: 4
    • Replies: 480
    • Total: 484
    • ★★

    Hi Spiffo!

    Use the source

    I think this is where you can use that mysterious third parameter to a callback function ‘source’ – I haven’t tested this and it may take some experimenting, but something like:

    
    	if source == 2 then
    			--... do something
    		elseif source == 4 
    			--... do something else
    		end --
    ---------------------------------------------------------
    --[[
    https://github.com/RomanKubiak/ctrlr/blob/de28dc3ad3591a5832f1e38ce8adabc9369b1011/Source/Lua/CtrlrLuaModulator.cpp
    value("initialValue", 0),
    value("changedByHost", 1),
    value("changedByMidiIn", 2),
    value("changedByMidiController", 3),
    value("changedByGUI", 4),
    value("changedByLua", 5),
    value("changedByProgram", 6),
    value("changedByLink", 7),
    value("changeByUnknown", 8)
    --]]
    
    Ctrlr