Reply To: Send whole page at once

Home Forums General Panels, Components, Macros Send whole page at once Reply To: Send whole page at once

#120645
goodweather
Participant
    • Topics: 45
    • Replies: 550
    • Total: 595
    • ★★★

    Yes, this is possible. If needed, I’m also advising you to mark the modulators you want to send with a specific Custom Modulator index Group.
    Here is the code:

    -- Loop on all modulators in custom group 2
    n = panel:getNumModulators()
    		
    for i=0,n-1 do
    	local mod = panel:getModulatorByIndex(i)
    	-- local Name= L(mod:getName())
    	if mod:getPropertyInt("modulatorCustomIndexGroup") == 2 then 
    		-- console(tostring(i.." "..Name))
    		do_something
    	end
    end

    To get the Midi Controller Number use:
    mod:getMidiMessage():getProperty(“midiMessageCtrlrNumber”)

    Pay attention that not all modulators have a Midi Message (uiLabels…); therefore the trick is to only take the “Dynamic” modulators.

    Good luck 😉

    Ctrlr