change mute button to mute all output, volume buttons control desktop volume

This commit is contained in:
David Daily 2020-05-20 14:14:48 -05:00
parent 1dbef5671d
commit a6bd9c5d14

68
VB.ahk
View File

@ -255,9 +255,11 @@ midiCCin:
adjustToggle("Recorder.Record", val)
Return
Default:
Gosub, SendCC
Return
}
Default:
Gosub, SendCC
Return
}
Return
@ -281,29 +283,57 @@ dial_to_pan(val)
Volume_Mute::
b0M := Round(readParam("Bus[0].Mute")) ; Speakers
b1M := Round(readParam("Bus[1].Mute")) ; Headphones
cM := b0M + b1M
if (cM = "2")
b2M := Round(readParam("Bus[2].Mute")) ; Work Laptop Send
b3M := Round(readParam("Bus[3].Mute")) ; Comms Send
b4M := Round(readParam("Bus[4].Mute")) ; Recording
cM := b0M + b1M + b2M + b3M + b4M
if (cM = "5")
{ ; Unmute the ones that were unmuted before
adjustToggle("Bus[0].Mute", b0Ms) ; Speakers
adjustToggle("Bus[1].Mute", b1Ms) ; Headphones
adjustToggle("Bus[2].Mute", b2Ms) ; Work Laptop Send
adjustToggle("Bus[3].Mute", b3Ms) ; Comms Send
adjustToggle("Bus[4].Mute", b4Ms) ; Recording
} else {
if !(b0M) ; Speakers
{
b0Ms := True
} else {
b0Ms := False
}
if !(b1M) ; Headphones
{
b1Ms := True
} else {
b1Ms := False
}
; Mute
adjustToggle("Bus[0].Mute", "0") ; Speakers
adjustToggle("Bus[1].Mute", "0") ; Headphones
adjustToggle("Bus[0].Mute", True) ; Speakers
adjustToggle("Bus[1].Mute", True) ; Headphones
adjustToggle("Bus[2].Mute", True) ; Work Laptop Send
adjustToggle("Bus[3].Mute", True) ; Comms Send
adjustToggle("Bus[4].Mute", True) ; Recording
b0Ms := b0M
b1Ms := b1M
b2Ms := b2M
b3Ms := b3M
b4Ms := b4M
}
Return
Volume_Up::
cM := Round(readParam("Strip[3].Mute"))
if !(cM)
{
cLvl := readParam("Strip[3].Gain")
if (cLvl != "")
{
cLvl += 1
adjustVolLvl("Strip[3].Gain", cLvl)
}
}
Return
Volume_Down::
cM := Round(readParam("Strip[3].Mute"))
if !(cM)
{
cLvl := readParam("Strip[3].Gain")
if (cLvl != "")
{
cLvl -= 1
adjustVolLvl("Strip[3].Gain", cLvl)
}
}
Return