@@ -54,6 +54,8 @@ export enum CommonActions {
5454 // Delay
5555 SetDelay = 'set-delay' ,
5656 SetDelayAmount = 'set-delay-amount' ,
57+ // EQ
58+ SetEqOn = 'set-eq-on' ,
5759
5860 //////////// SEND
5961 SetSendMute = 'set-send-mute' ,
@@ -640,6 +642,27 @@ export function createCommonActions(self: InstanceBaseExt<WingConfig>): Companio
640642 }
641643 } ,
642644 } ,
645+ [ CommonActions . SetEqOn ] : {
646+ name : 'Set EQ On' ,
647+ description : 'Enable, disable or toggle the on-state of an EQ on a channel, bus, aux, matrix or main.' ,
648+ options : [ GetDropdown ( 'Selection' , 'sel' , allChannels ) , GetOnOffToggleDropdown ( 'enable' , 'Enable' ) ] ,
649+ callback : async ( event ) => {
650+ const sel = event . options . sel as string
651+ const cmd = ActionUtil . getEqEnableCommand ( sel , getNodeNumber ( event , 'sel' ) )
652+ const val = ActionUtil . getNumber ( event , 'enable' )
653+ const currentVal = StateUtil . getBooleanFromState ( cmd , state )
654+ if ( val < 2 ) {
655+ send ( cmd , val )
656+ } else {
657+ send ( cmd , Number ( ! currentVal ) )
658+ }
659+ } ,
660+ subscribe : ( event ) => {
661+ const sel = event . options . sel as string
662+ const cmd = ActionUtil . getSoloCommand ( sel , getNodeNumber ( event , 'sel' ) )
663+ ensureLoaded ( cmd )
664+ } ,
665+ } ,
643666
644667 ////////////////////////////////////////////////////////////////
645668 // Send Fader
0 commit comments