Killswitch Button - play_note not triggering Keyswitch

MTC84
MTC84 Member Posts: 71 Member
edited October 2024 in Scripting Workshop

Hi,

I have a Killswitch Button that I want to trigger a Keyswitch (CC NUMBER 0) but it isn't working as it I thought it would.

When I set the CC value to trigger a note rather than the keyswitch, it works perfectly. The correct note/sample is triggered.

When I use the button to trigger CC 0 (where I have set the keyswitch to) the Keyswitch stays untriggered.

When pressing CC 0 on the keyboard, the samples are killed as they should be.

Can anyone please help? Thanks.

	on ui_control ($Killswitch_Button)
		play_note(0, 0, 0, -1)
		$Killswitch_Button := 0
	end on

Comments

  • MTC84
    MTC84 Member Posts: 71 Member

    I have ended up scrapping the Keyswitch and simply used the Killswitch Button instead so all is working.

    	on ui_control ($Killswitch_Button)
    		if ($Killswitch_Button = 1)
        		        fade_out(by_marks($MARK_1), $Fade_Out_Time, 0)
    			$Fade_Out := 0
    			$Killswitch_Button := 0
    		end if
            end on
    
This discussion has been closed.
Back To Top