Reply To: Radio button in a modulator group needs a default setting

Home Forums General Programming Radio button in a modulator group needs a default setting Reply To: Radio button in a modulator group needs a default setting

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

    Hi Damien,

    Here is a panel that might do what you want to do using uiButtonImage.

    Previous post has been blocked again and is awaiting moderation.

    I’ll post it again here:


    This is how to do it using when modulator value changes with uiImageButton. It’s a bit more complicated.
    If I understand the sysex you’re trying to send that is,

    
    UnitSelect = function(--[[ CtrlrModulator --]] mod, --[[ number --]] value, --[[ number --]] source)
    if source==4 then -- should stop this code running on start
    	
    	local n=L(mod:getName())
    	local t={ViButComA=0,ViButComB=1,ViButComC=2,ViButComD=3}
    
    	console("Unit Selected Value : "..n)
    
    	for k,v in pairs(t)do
    if k==n then
    panel:sendMidiMessageNow(CtrlrMidiMessage({0xf0, 0x0f, 0x40, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, v, 0xf7})) -- press button
    panel:sendMidiMessageNow(CtrlrMidiMessage({0xf0, 0x0f, 0x40, 0x00, 0x00, 0x01, 0x00, 0x02, 0x08, v, 0xf7})) -- release button
    		else
    			panel:getModulatorByName(k):setValue(0, true)
    		console(k.." was set to zero")
    		end -- fi
    	end -- for
    	console('----------------------------')
    end -- source ==4 (user clicked on a button - not lua generated
    end
    

    In an init function:

    
    init = function(--[[ CtrlrInstance --]] type)
    
    panel:getModulatorByName("ViButComA"):setValue(1,true)
    panel:getModulatorByName("ViButComB"):setValue(0,true)
    panel:getModulatorByName("ViButComC"):setValue(0,true)
    panel:getModulatorByName("ViButComD"):setValue(0,true)
    end
    
    • This reply was modified 3 years, 9 months ago by dnaldoog. Reason: added blocked post comments
    • This reply was modified 3 years, 8 months ago by dnaldoog. Reason: fixed some buggy code and reluploaded a new panel
    • This reply was modified 3 years, 8 months ago by dnaldoog.
    Attachments:
    You must be logged in to view attached files.
    Ctrlr