# Mute and Solo Buttons once again



## Kore G (Oct 1, 2017)

Hello guys i need please some help about mute and solo buttons.
I have read the other "mute and solo" threads
but nothing seems to help me.

I have 3 groups who have separate volumes, mute and solo buttons
i think two solutions for this.
One to set volume to 0 value
and the other with allow or disallow groups.

At first case it works perfect but the problem is how i can make 2 or 3 solo buttons be on at the same time.



```
on init

declare ui_slider $volume_osc_1(0, 1000000)
declare ui_slider $volume_osc_2(0, 1000000)
declare ui_slider $volume_osc_3(0, 1000000)
make_persistent($volume_osc_1)
make_persistent($volume_osc_2)
make_persistent($volume_osc_3)
declare ui_button $osc_1_solo_button
declare ui_button $osc_2_solo_button
declare ui_button $osc_3_solo_button
declare ui_button $osc_1_mute_button
declare ui_button $osc_2_mute_button
declare ui_button $osc_3_mute_button
end on

function solo_buttons_0
$osc_1_solo_button:=0
$osc_2_solo_button:=0
$osc_3_solo_button:=0
set_engine_par($ENGINE_PAR_VOLUME,$volume_osc_1,0,-1,-1)
set_engine_par($ENGINE_PAR_VOLUME,$volume_osc_2,1,-1,-1)
set_engine_par($ENGINE_PAR_VOLUME,$volume_osc_3,2,-1,-1)   
end function

function Buttons_value_0
$osc_1_solo_button:=0
$osc_2_solo_button:=0
$osc_3_solo_button:=0
$osc_1_mute_button:=0
$osc_2_mute_button:=0
$osc_3_mute_button:=0   
end function

on ui_control($osc_1_solo_button)
if ($osc_1_solo_button=1)
call Buttons_value_0
$osc_1_solo_button:=1
set_engine_par($ENGINE_PAR_VOLUME,$volume_osc_1,0,-1,-1)
set_engine_par($ENGINE_PAR_VOLUME,0,1,-1,-1)
set_engine_par($ENGINE_PAR_VOLUME,0,2,-1,-1)
else
call solo_buttons_0
end if   
end on

on ui_control($osc_2_solo_button)
if ($osc_2_solo_button=1)
call Buttons_value_0
$osc_2_solo_button:=1
set_engine_par($ENGINE_PAR_VOLUME,0,0,-1,-1)
set_engine_par($ENGINE_PAR_VOLUME,$volume_osc_2,1,-1,-1)
set_engine_par($ENGINE_PAR_VOLUME,0,2,-1,-1)
else
call solo_buttons_0
end if   
end on

on ui_control($osc_3_solo_button)
if ($osc_3_solo_button=1)
call Buttons_value_0
$osc_3_solo_button:=1
set_engine_par($ENGINE_PAR_VOLUME,0,0,-1,-1)
set_engine_par($ENGINE_PAR_VOLUME,0,1,-1,-1)
set_engine_par($ENGINE_PAR_VOLUME,$volume_osc_3,2,-1,-1)
else
call solo_buttons_0   
end if
end on

on ui_control($osc_1_mute_button)
if ($osc_1_mute_button=1)
set_engine_par($ENGINE_PAR_VOLUME,0,0,-1,-1)
else
set_engine_par($ENGINE_PAR_VOLUME,$volume_osc_1,0,-1,-1)
end if
end on

on ui_control($osc_2_mute_button)
if ($osc_2_mute_button=1)
set_engine_par($ENGINE_PAR_VOLUME,0,1,-1,-1)
else
set_engine_par($ENGINE_PAR_VOLUME,$volume_osc_2,1,-1,-1)
end if
end on

on ui_control($osc_3_mute_button)
if ($osc_3_mute_button=1)   
set_engine_par($ENGINE_PAR_VOLUME,0,2,-1,-1)
else
set_engine_par($ENGINE_PAR_VOLUME,$volume_osc_3,2,-1,-1)
end if
end on
```


At the second case with allow or disallow groups 
there are 9 groups with 3 selectors and of course the mute and solo buttons
The selectors works perfect and the mute buttons too.
But i don't know how to make the solo buttons to be work this way.



```
on init
    declare ui_knob $sel_1(0, 2, 1)
    make_persistent($sel_1)
    declare ui_switch $mute_1
    declare ui_switch $solo_1
    declare ui_knob $sel_2(3, 5, 1)
    make_persistent($sel_2)
    declare ui_switch $mute_2
    declare ui_switch $solo_2
    declare ui_knob $sel_3(6, 8, 1)
    make_persistent($sel_3)
    declare ui_switch $mute_3
    declare ui_switch $solo_3
end on

on note
disallow_group($ALL_GROUPS)
allow_group($sel_1)
allow_group($sel_2)
allow_group($sel_3)
if ($mute_1=1)
disallow_group($sel_1)   
else
allow_group($sel_1 )   
end if
if ($mute_2=1)
disallow_group($sel_2)   
else
allow_group($sel_2)   
end if
if ($mute_3=1)
disallow_group($sel_3)   
else
allow_group($sel_3)   
end if
end on
```


Thank's a lot.


----------



## Tod (Oct 1, 2017)

I use Kontakts "Instrument Buses" for this, it's much simpler. Just use a different bus for each group. It's been a while and I don't have Kontakt in front of me at the moment, but what I did, was set up a bus for each group. Actually I had many groups with up to 16 or more groups going to a single bus, it was a multi-miced drum library.

I think it was the "Gainer" FX I used for the mute part, with it's output turned completely off. Then just bypass the Gainer for unmute and un-bypass for mute. I also had Bus 16 set up for soloing the various kit pieces, but it's been a while and I don't remember exactly how I did it. I'd have to reverse engineer it and I'm sorry, but I don't have time for that.


----------



## Kore G (Oct 2, 2017)

Tod said:


> I use Kontakts "Instrument Buses" for this, it's much simpler. Just use a different bus for each group. It's been a while and I don't have Kontakt in front of me at the moment, but what I did, was set up a bus for each group. Actually I had many groups with up to 16 or more groups going to a single bus, it was a multi-miced drum library.
> 
> I think it was the "Gainer" FX I used for the mute part, with it's output turned completely off. Then just bypass the Gainer for unmute and un-bypass for mute. I also had Bus 16 set up for soloing the various kit pieces, but it's been a while and I don't remember exactly how I did it. I'd have to reverse engineer it and I'm sorry, but I don't have time for that.


I am trying that it works but still i cant make two solo buttons works at the same time...
Thanks a lot for your time.

```
on init
declare ui_button $mute_1
declare ui_button $mute_2
declare ui_button $mute_3

declare ui_button $solo_1
declare ui_button $solo_2
declare ui_button $solo_3
end on


function buses
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,$solo_1, -1,0,$NI_BUS_OFFSET+0)   
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,$solo_2, -1,0,$NI_BUS_OFFSET+1)   
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,$solo_3, -1,0,$NI_BUS_OFFSET+2)   
end function
function solo_1
$solo_1:=1
$solo_2:=0
$solo_3:=0
call buses
end function

function solo_2
$solo_1:=0
$solo_2:=1
$solo_3:=0
call buses
end function

function solo_3
$solo_1:=0
$solo_2:=0
$solo_3:=1
call buses
end function

on ui_control($mute_1)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,$mute_1 -1, -1,0,$NI_BUS_OFFSET+0)   
end on

on ui_control($mute_2)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,$mute_2 -1, -1,0,$NI_BUS_OFFSET+1)   
end on

on ui_control($mute_3)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,$mute_3 -1, -1,0,$NI_BUS_OFFSET+2)   
end on

on ui_control($solo_1)
call solo_1     
end on

on ui_control($solo_2)
call solo_2     
end on

on ui_control($solo_3)
call solo_3     
end on
```


----------



## P.N. (Oct 2, 2017)

Hi.

There may be some cases where you'd like to keep buses out of the equation (depending on how you set up FX sends, etc.)

If you'd like to use your first option, you could try this:



```
on init
    declare $count
    declare ui_slider $volume_osc_1(0, 1000000)
    declare ui_slider $volume_osc_2(0, 1000000)
    declare ui_slider $volume_osc_3(0, 1000000)
    make_persistent($volume_osc_1)
    make_persistent($volume_osc_2)
    make_persistent($volume_osc_3)
    declare ui_button $osc_1_solo_button
    declare ui_button $osc_2_solo_button
    declare ui_button $osc_3_solo_button
    declare ui_button $osc_1_mute_button
    declare ui_button $osc_2_mute_button
    declare ui_button $osc_3_mute_button
   
    declare $mute

    declare %solo_arr[3]
   
    declare %solo[3]
    $count:=0
    while($count<3)
        %solo[$count]:=$count
        inc($count)
    end while
   
    declare %solo_buttons[3]:=(get_ui_id($osc_1_solo_button),get_ui_id($osc_2_solo_button),get_ui_id($osc_3_solo_button))
    declare %mute_buttons[3]:=(get_ui_id($osc_1_mute_button),get_ui_id($osc_2_mute_button),get_ui_id($osc_3_mute_button))
    declare %vol_sliders[3]:=(get_ui_id($volume_osc_1),get_ui_id($volume_osc_2),get_ui_id($volume_osc_3))
end on

function mute
    if(get_control_par(%mute_buttons[$mute],$CONTROL_PAR_VALUE)=1)
        set_engine_par($ENGINE_PAR_VOLUME,0,$mute,-1,-1)
        set_control_par(%solo_buttons[$mute],$CONTROL_PAR_VALUE,0)
    else
        set_engine_par($ENGINE_PAR_VOLUME,get_control_par(%vol_sliders[$mute],$CONTROL_PAR_VALUE),$mute,-1,-1)
    end if  
end function

function solo
    $count:=0
    while($count<$NUM_GROUPS)
        if(get_control_par(%solo_buttons[%solo[$count]],$CONTROL_PAR_VALUE)=1)
            set_engine_par($ENGINE_PAR_VOLUME,get_control_par(%vol_sliders[%solo[$count]],$CONTROL_PAR_VALUE),%solo[$count],-1,-1)
            set_control_par(%mute_buttons[%solo[$count]],$CONTROL_PAR_VALUE,0)
        else
            set_engine_par($ENGINE_PAR_VOLUME,0,%solo[$count],-1,-1)
            set_control_par(%mute_buttons[%solo[$count]],$CONTROL_PAR_VALUE,1)  
        end if
        inc($count)
    end while
   
    $count:=0
    while($count<$NUM_GROUPS)
        %solo_arr[$count]:=get_control_par(%solo_buttons[%solo[$count]],$CONTROL_PAR_VALUE)
        inc($count)
    end while
   
    if(search(%solo_arr,1)=-1)
        $count:=0
        while($count<$NUM_GROUPS)
            set_engine_par($ENGINE_PAR_VOLUME,get_control_par(%vol_sliders[%solo[$count]],$CONTROL_PAR_VALUE),%solo[$count],-1,-1)
            set_control_par(%mute_buttons[%solo[$count]],$CONTROL_PAR_VALUE,0)
            inc($count)
        end while
    end if
       
end function

on ui_control($osc_1_solo_button)
    call solo
end on

on ui_control($osc_2_solo_button)
    call solo
end on

on ui_control($osc_3_solo_button)
    call solo
end on

on ui_control($osc_1_mute_button)
    $mute:=0
    call mute
end on

on ui_control($osc_2_mute_button)
    $mute:=1
    call mute
end on

on ui_control($osc_3_mute_button)
    $mute:=2
    call mute
end on
```

I probably complicated things a little. Maybe a good scripter can help you with better code... until then, i hope this helps.

Cheers.


----------



## Kore G (Oct 2, 2017)

P.N. said:


> Hi.
> 
> There may be some cases where you'd like to keep buses out of the equation (depending on how you set up FX sends, etc.)
> 
> ...


It has an error but i solved it and works actually perfect with three different groups

```
on init
    declare $count
    declare ui_slider $volume_osc_1(0, 1000000)
    declare ui_slider $volume_osc_2(0, 1000000)
    declare ui_slider $volume_osc_3(0, 1000000)
    make_persistent($volume_osc_1)
    make_persistent($volume_osc_2)
    make_persistent($volume_osc_3)
    declare ui_button $osc_1_solo_button
    declare ui_button $osc_2_solo_button
    declare ui_button $osc_3_solo_button
    declare ui_button $osc_1_mute_button
    declare ui_button $osc_2_mute_button
    declare ui_button $osc_3_mute_button
  
    declare $mute

    declare %solo_arr[3]
  
    declare %solo[3]
    $count:=0
    while($count<3)
        %solo[$count]:=$count
        inc($count)
    end while
  
declare %solo_buttons[3]
%solo_buttons[0] := get_ui_id($osc_1_solo_button)
%solo_buttons[1] := get_ui_id($osc_2_solo_button)
%solo_buttons[2] := get_ui_id($osc_3_solo_button)

declare %mute_buttons[3]   
%mute_buttons[0] := get_ui_id($osc_1_mute_button)
%mute_buttons[1] := get_ui_id($osc_2_mute_button)
%mute_buttons[2] := get_ui_id($osc_3_mute_button)

declare %vol_sliders[3]
%vol_sliders[0] := get_ui_id($volume_osc_1)
%vol_sliders[1] := get_ui_id($volume_osc_2)
%vol_sliders[2] := get_ui_id($volume_osc_3)

    
end on

function mute
    if(get_control_par(%mute_buttons[$mute],$CONTROL_PAR_VALUE)=1)
        set_engine_par($ENGINE_PAR_VOLUME,0,$mute,-1,-1)
        set_control_par(%solo_buttons[$mute],$CONTROL_PAR_VALUE,0)
    else
        set_engine_par($ENGINE_PAR_VOLUME,get_control_par(%vol_sliders[$mute],$CONTROL_PAR_VALUE),$mute,-1,-1)
    end if 
end function

function solo
    $count:=0
    while($count<$NUM_GROUPS)
        if(get_control_par(%solo_buttons[%solo[$count]],$CONTROL_PAR_VALUE)=1)
            set_engine_par($ENGINE_PAR_VOLUME,get_control_par(%vol_sliders[%solo[$count]],$CONTROL_PAR_VALUE),%solo[$count],-1,-1)
            set_control_par(%mute_buttons[%solo[$count]],$CONTROL_PAR_VALUE,0)
        else
            set_engine_par($ENGINE_PAR_VOLUME,0,%solo[$count],-1,-1)
            set_control_par(%mute_buttons[%solo[$count]],$CONTROL_PAR_VALUE,1) 
        end if
        inc($count)
    end while
  
    $count:=0
    while($count<$NUM_GROUPS)
        %solo_arr[$count]:=get_control_par(%solo_buttons[%solo[$count]],$CONTROL_PAR_VALUE)
        inc($count)
    end while
  
    if(search(%solo_arr,1)=-1)
        $count:=0
        while($count<$NUM_GROUPS)
            set_engine_par($ENGINE_PAR_VOLUME,get_control_par(%vol_sliders[%solo[$count]],$CONTROL_PAR_VALUE),%solo[$count],-1,-1)
            set_control_par(%mute_buttons[%solo[$count]],$CONTROL_PAR_VALUE,0)
            inc($count)
        end while
    end if
      
end function

on ui_control($osc_1_solo_button)
    call solo
end on

on ui_control($osc_2_solo_button)
    call solo
end on

on ui_control($osc_3_solo_button)
    call solo
end on

on ui_control($osc_1_mute_button)
    $mute:=0
    call mute
end on

on ui_control($osc_2_mute_button)
    $mute:=1
    call mute
end on

on ui_control($osc_3_mute_button)
    $mute:=2
    call mute
end on
```

In my real case i have 3 sources (oscillators)each one has 9 groups
I don't understand how that could work on 27 different groups...
Thanks a lot for the code and your time.


----------



## P.N. (Oct 2, 2017)

Sorry, i didn't catch the mistake in the code i posted.
Your first post said "3 groups"...
The code could be adjusted to account for more groups per button, if that's what you're asking.
The foundation for it is there.

But i'm not sure exactly how you're organizing it. More code (the "real case") would be necessary to further assist you.
Otherwise, there's always the buses option, which, if you don't have any "crazy stuff" going on, could be easier and you can even apply some of the concepts of my code to manage the button states.

Cheers.


----------



## Tod (Oct 2, 2017)

Look closely, what your doing is when you solo one bus you're un-soloing the other two. You're going to need some if statements to make them function properly. If I can find some time I'll see what I can do.



Kore G said:


> I am trying that it works but still i cant make two solo buttons works at the same time...
> Thanks a lot for your time.
> 
> ```
> ...


----------



## EvilDragon (Oct 2, 2017)

In general, the way I do mute/solo is by using 3 arrays (storing state for mute, solo and what actually needs to be played), some functions and macros. Also I recommend using an Inverter in group FX that will do the muting (set the Output knob of it to -oo dB and bypass it), so that group volume controls stay free for regular adjustments. SublimeKSP needed for this code:


```
on init
   declare const MUTE_SLOT := 0
   declare const NUM_CHANNELS := 3

   family mixer
       declare active[NUM_CHANNELS] := (1)
       declare mute[NUM_CHANNELS]
       declare solo[NUM_CHANNELS]
     
       declare ui_switch MicMute1
       declare ui_switch MicMute2
       declare ui_switch MicMute3
       declare ui_switch MicSolo1
       declare ui_switch MicSolo2
       declare ui_switch MicSolo3

       declare MicMute[NUM_CHANNELS]
       declare MicSolo[NUM_CHANNELS]
   end family

   declare i

   for i := 0 to NUM_CHANNELS - 1
       mixer.MicMute[i] := get_ui_id(mixer.MicMute1) + i
       mixer.MicSolo[i] := get_ui_id(mixer.MicSolo1) + i
   end for

   make_persistent(mixer.active)
   make_persistent(mixer.mute)
   make_persistent(mixer.solo)
end on


function mute_solo()
   declare local i
 
   { initializing mic states - all mics play }
   for i := 0 to NUM_CHANNELS - 1
       mixer.active[i] := 1
   end for
 
   { processing soloed mics }
   if search(mixer.solo, 1) # -1
       for i := 0 to NUM_CHANNELS - 1
           mixer.active[i] := mixer.solo[i]
       end for
   end if
 
   { processing muted mics }
   for i := 0 to NUM_CHANNELS - 1
       if mixer.mute[i] = 1
           mixer.active[i] := 0
       end if
   end for
 
   { muting groups that aren't supposed to play }
   { can easily be repurposed to busses etc. }
   for i := 0 to NUM_CHANNELS - 1
       set_engine_par(ENGINE_PAR_EFFECT_BYPASS, mixer.active[i], i, MUTE_SLOT, -1)
   end for
end function


macro MuteControl(#num#, #id#)
   on ui_control (mixer.MicMute#num#)
       if mixer.MicMute[#id#] -> key_control = 1
           for i := 0 to NUM_CHANNELS - 1
               if i # #id#
                   mixer.MicMute[i] -> value := 0
               else
                   mixer.MicMute[i] -> value := 1
               end if
               mixer.mute[i] := mixer.MicMute[i] -> value
           end for
       else
           mixer.mute[#id#] := mixer.MicMute[#id#] -> value
       end if
       call mute_solo()
   end on
end macro

macro SoloControl(#num#, #id#)
   on ui_control (mixer.MicSolo#num#)
       if mixer.MicSolo[#id#] -> key_control = 1
           for i := 0 to NUM_CHANNELS - 1
               if i # #id#
                   mixer.MicSolo[i] -> value := 0
               else
                   mixer.MicSolo[i] -> value := 1
               end if
               mixer.solo[i] := mixer.MicSolo[i] -> value
           end for
       else
           mixer.solo[#id#] := mixer.MicSolo[#id#] -> value
       end if
       call mute_solo()
   end on
end macro


MuteControl(1, 0)
MuteControl(2, 1)
MuteControl(3, 2)
SoloControl(1, 0)
SoloControl(2, 1)
SoloControl(3, 2)


on note
    { allow only active, non-muted groups to play }
    disallow_group($ALL_GROUPS)

    for i := 0 to NUM_CHANNELS - 1
        allow_group(i * mixer.active[i])
    end for
end on
```


Bonus here is that Ctrl/Command+clicking the mute/solo buttons does exclusive mute/solo.


----------



## Tod (Oct 2, 2017)

Heh heh, well I see Mario beat me to it. Oh well, I took some time so I'll post mine too, although Mario's looks much more useful.

I didn't do anything special, I just got it to working, so a lot more would have to be done.


```
on init
  declare $x1
  declare $x2
  declare $nx
 
  declare %Mute_ID[3]
  declare ui_button $mute_1
    %Mute_ID[0]:=get_ui_id($mute_1)
  declare ui_button $mute_2
    %Mute_ID[1]:=get_ui_id($mute_2)
  declare ui_button $mute_3
    %Mute_ID[2]:=get_ui_id($mute_3)
 
  declare %Solo_ID[3]
  declare ui_button $solo_1
    %Solo_ID[0]:=get_ui_id($solo_1)
  declare ui_button $solo_2
    %Solo_ID[1]:=get_ui_id($solo_2)
  declare ui_button $solo_3
    %Solo_ID[2]:=get_ui_id($solo_3)
end on


function solo_on_off
  $x1:=$solo_1+$solo_2+$solo_3
  if ($x1>0)  {a solo is on}
    for $x2 := 0 to 2
      if (%Solo_ID[$x2]->value = 0) {not soloed so mute}
        %Mute_ID[$x2]->value:=1
        set_engine_par($ENGINE_PAR_EFFECT_BYPASS,%Mute_ID[$x2]->value, -1,0,$NI_BUS_OFFSET+$x2)
      else
        %Mute_ID[$x2]->value:=0
        set_engine_par($ENGINE_PAR_EFFECT_BYPASS,%Mute_ID[$x2]->value, -1,0,$NI_BUS_OFFSET+$x2)
      end if
    end for
  else  {no solo button on}
    for $x2 := 0 to 2
      %Mute_ID[$x2]->value:=0
      set_engine_par($ENGINE_PAR_EFFECT_BYPASS,%Mute_ID[$x2]->value, -1,0,$NI_BUS_OFFSET+$x2)
    end for
  end if
end function

on ui_control($mute_1)
  set_engine_par($ENGINE_PAR_EFFECT_BYPASS,$mute_1 -1, -1,0,$NI_BUS_OFFSET+0)   
end on

on ui_control($mute_2)
  set_engine_par($ENGINE_PAR_EFFECT_BYPASS,$mute_2 -1, -1,0,$NI_BUS_OFFSET+1)   
end on

on ui_control($mute_3)
  set_engine_par($ENGINE_PAR_EFFECT_BYPASS,$mute_3 -1, -1,0,$NI_BUS_OFFSET+2)   
end on

on ui_control($solo_1)
  $nx:=0
  call solo_on_off}
end on

on ui_control($solo_2)
  $nx:=1
  call solo_on_off}
end on

on ui_control($solo_3)
  $nx:=2
  call solo_on_off}
end on
```


----------



## Kore G (Oct 3, 2017)

P.N. said:


> Sorry, i didn't catch the mistake in the code i posted.
> Your first post said "3 groups"...
> The code could be adjusted to account for more groups per button, if that's what you're asking.
> The foundation for it is there.
> ...


Sorry for my late reply.
If it helps i manage my groups this way...
Thanks a lot for help and your time.


```
$count:=0
while ($count<9)
set_engine_par($ENGINE_PAR_VOLUME,$volume_osc_1,$count,-1,-1)
inc($count)
end while

$count:=9
while ($count<18)
set_engine_par($ENGINE_PAR_VOLUME,$volume_osc_2,$count,-1,-1)
inc($count)
end while

$count:=18
while ($count<27)
set_engine_par($ENGINE_PAR_VOLUME,$volume_osc_3,$count,-1,-1)
inc($count)
end while
```


----------



## Kore G (Oct 3, 2017)

EvilDragon said:


> In general, the way I do mute/solo is by using 3 arrays (storing state for mute, solo and what actually needs to be played), some functions and macros. Also I recommend using an Inverter in group FX that will do the muting (set the Output knob of it to -oo dB and bypass it), so that group volume controls stay free for regular adjustments. SublimeKSP needed for this code:
> 
> 
> ```
> ...



Thanks a lot Evil Dragon for the script and sorry for my late reply 
I test your script and the solo buttons works perfect.
But the mute buttons turn on/off the slot 1 of group insert fx.


----------



## EvilDragon (Oct 3, 2017)

Yes, this is intended. Don't touch the group volume controls. Instead use an Inverted effect in one slot of Group FX (preferably the last one, and then set MUTE_SLOT constant to 7!), set Output to -oo... I explained everything in my post. Then all you need is to modify the mute_solo() function to make it work on exactly which groups you want.


----------



## Kore G (Oct 3, 2017)

EvilDragon said:


> Yes, this is intended. Don't touch the group volume controls. Instead use an Inverted effect in one slot of Group FX (preferably the last one, and then set MUTE_SLOT constant to 7!), set Output to -oo... I explained everything in my post. Then all you need is to modify the mute_solo() function to make it work on exactly which groups you want.


Thanks a lot i will try it!


----------



## geronimo (Nov 4, 2017)

EvilDragon said:


> Bonus here is that Ctrl/Command+clicking the mute/solo buttons does exclusive mute/solo.



Thank you for the pedagogy on the Script and the notion of group containing the Inverter effect; it's ingenious.

It is the alternation with the keys Command / Control + click of which I am less confident; I understand that it allows to alternate between the functions Mute and Solo according to the key used (Command or Control), in addition to the click. Am I good ?

Or is it the notion for Ctrl --> PC
and Command --> Apple _


----------



## EvilDragon (Nov 5, 2017)

geronimo said:


> Or is it the notion for Ctrl --> PC
> and Command --> Apple



It's that. Also, it doesn't alternate between Mute and Solo, it does exclusive mute OR solo (depending on which button you click on). That means if you had, say, 3 out of 4 mute buttons activated, ctrl+clicking either of the 4 buttons will make just THAT one active, and disable all others, meaning only one of them would be active at any given time.


----------



## geronimo (Nov 5, 2017)

Okay; many thanks for this clarification .


----------



## ritik (May 28, 2021)

EvilDragon said:


> In general, the way I do mute/solo is by using 3 arrays (storing state for mute, solo and what actually needs to be played), some functions and macros. Also I recommend using an Inverter in group FX that will do the muting (set the Output knob of it to -oo dB and bypass it), so that group volume controls stay free for regular adjustments. SublimeKSP needed for this code:
> 
> 
> ```
> ...


this script is saying variable expected and and when I'm assigning them with '$' then it's saying end on expected at 'family mixer' line. Can you please help?


----------



## geronimo (May 28, 2021)

Try to open it with Sublime Text 3 _


----------



## ritik (May 29, 2021)

geronimo said:


> Try to open it with Sublime Text 3 _


in sublime there are no errors but when I'm pasting it into kontakt it's showing those errors.


----------



## polypx (May 29, 2021)

You have to compile it with Sublime before pasting it into Kontakt.


----------

