Update config file, clean up code quite a bit
This commit is contained in:
parent
89be8ada50
commit
605f57448a
93
VB.ahk
93
VB.ahk
@ -75,19 +75,19 @@ midiCCin:
|
||||
{
|
||||
Case 0:
|
||||
Lvl := fader_to_fader(val)
|
||||
adjustVolLvl("Strip[0]" . ".Gain", Lvl)
|
||||
adjustVolLvl("Strip[0].Gain", Lvl)
|
||||
Return
|
||||
Case 1:
|
||||
Lvl := dial_to_pan(val)
|
||||
adjustVolLvl("Strip[0]" . ".Pan_x", Lvl)
|
||||
adjustVolLvl("Strip[0].Pan_x", Lvl)
|
||||
Case 2:
|
||||
adjustToggle("Strip[0]" . ".Solo", val)
|
||||
adjustToggle("Strip[0].Solo", val)
|
||||
Return
|
||||
Case 3:
|
||||
adjustToggle("Strip[0]" . ".Mute", val)
|
||||
adjustToggle("Strip[0].Mute", val)
|
||||
Return
|
||||
Case 4:
|
||||
adjustToggle("Strip[0]" . ".B2", val)
|
||||
adjustToggle("Strip[0].B2", val)
|
||||
Return
|
||||
Default:
|
||||
Return
|
||||
@ -97,10 +97,10 @@ midiCCin:
|
||||
{
|
||||
Case 0:
|
||||
Lvl := fader_to_fader(val)
|
||||
adjustVolLvl("Bus[2]" . ".Gain", Lvl)
|
||||
adjustVolLvl("Bus[2].Gain", Lvl)
|
||||
Return
|
||||
Case 3:
|
||||
adjustToggle("Bus[2]" . ".Mute", val)
|
||||
adjustToggle("Bus[2].Mute", val)
|
||||
Return
|
||||
Default:
|
||||
Return
|
||||
@ -110,19 +110,19 @@ midiCCin:
|
||||
{
|
||||
Case 0:
|
||||
Lvl := fader_to_fader(val)
|
||||
adjustVolLvl("Strip[3]" . ".Gain", Lvl)
|
||||
adjustVolLvl("Strip[3].Gain", Lvl)
|
||||
Return
|
||||
Case 1:
|
||||
Lvl := dial_to_pan(val)
|
||||
adjustVolLvl("Strip[3]" . ".Pan_x", Lvl)
|
||||
adjustVolLvl("Strip[3].Pan_x", Lvl)
|
||||
Case 2:
|
||||
adjustToggle("Strip[3]" . ".Solo", val)
|
||||
adjustToggle("Strip[3].Solo", val)
|
||||
Return
|
||||
Case 3:
|
||||
adjustToggle("Strip[3]" . ".Mute", val)
|
||||
adjustToggle("Strip[3].Mute", val)
|
||||
Return
|
||||
Case 4:
|
||||
adjustToggle("Strip[3]" . ".B2", val)
|
||||
adjustToggle("Strip[3].B2", val)
|
||||
Return
|
||||
Default:
|
||||
Return
|
||||
@ -132,10 +132,10 @@ midiCCin:
|
||||
{
|
||||
Case 0:
|
||||
Lvl := fader_to_fader(val)
|
||||
adjustVolLvl("Bus[3]" . ".Gain", Lvl)
|
||||
adjustVolLvl("Bus[3].Gain", Lvl)
|
||||
Return
|
||||
Case 3:
|
||||
adjustToggle("Bus[3]" . ".Mute", val)
|
||||
adjustToggle("Bus[3].Mute", val)
|
||||
Return
|
||||
Default:
|
||||
Return
|
||||
@ -145,19 +145,19 @@ midiCCin:
|
||||
{
|
||||
Case 0:
|
||||
Lvl := fader_to_fader(val)
|
||||
adjustVolLvl("Strip[4]" . ".Gain", Lvl)
|
||||
adjustVolLvl("Strip[4].Gain", Lvl)
|
||||
Return
|
||||
Case 1:
|
||||
Lvl := dial_to_pan(val)
|
||||
adjustVolLvl("Strip[4]" . ".Pan_x", Lvl)
|
||||
adjustVolLvl("Strip[4].Pan_x", Lvl)
|
||||
Case 2:
|
||||
adjustToggle("Strip[4]" . ".Solo", val)
|
||||
adjustToggle("Strip[4].Solo", val)
|
||||
Return
|
||||
Case 3:
|
||||
adjustToggle("Strip[4]" . ".Mute", val)
|
||||
adjustToggle("Strip[4].Mute", val)
|
||||
Return
|
||||
Case 4:
|
||||
adjustToggle("Strip[4]" . ".B2", val)
|
||||
adjustToggle("Strip[4].B2", val)
|
||||
Return
|
||||
Default:
|
||||
Return
|
||||
@ -167,10 +167,10 @@ midiCCin:
|
||||
{
|
||||
Case 0:
|
||||
Lvl := fader_to_fader(val)
|
||||
adjustVolLvl("Bus[0]" . ".Gain", Lvl)
|
||||
adjustVolLvl("Bus[0].Gain", Lvl)
|
||||
Return
|
||||
Case 3:
|
||||
adjustToggle("Bus[0]" . ".Mute", val)
|
||||
adjustToggle("Bus[0].Mute", val)
|
||||
Return
|
||||
Default:
|
||||
Return
|
||||
@ -180,10 +180,10 @@ midiCCin:
|
||||
{
|
||||
Case 0:
|
||||
Lvl := fader_to_fader(val)
|
||||
adjustVolLvl("Bus[1]" . ".Gain", Lvl)
|
||||
adjustVolLvl("Bus[1].Gain", Lvl)
|
||||
Return
|
||||
Case 3:
|
||||
adjustToggle("Bus[1]" . ".Mute", val)
|
||||
adjustToggle("Bus[1].Mute", val)
|
||||
Return
|
||||
Default:
|
||||
Return
|
||||
@ -193,20 +193,20 @@ midiCCin:
|
||||
{
|
||||
Case 0:
|
||||
Lvl := fader_to_fader(val)
|
||||
adjustVolLvl("Strip[2]" . ".Gain", Lvl)
|
||||
adjustVolLvl("Strip[2].Gain", Lvl)
|
||||
Return
|
||||
Case 1:
|
||||
Lvl := dial_to_pan(val)
|
||||
adjustVolLvl("Strip[2]" . ".Pan_x", Lvl)
|
||||
adjustVolLvl("Strip[2].Pan_x", Lvl)
|
||||
Case 2:
|
||||
adjustToggle("Strip[2]" . ".Solo", val)
|
||||
adjustToggle("Strip[2].Solo", val)
|
||||
Return
|
||||
Case 3:
|
||||
adjustToggle("Strip[2]" . ".Mute", val)
|
||||
adjustToggle("Strip[2].Mute", val)
|
||||
Return
|
||||
Case 4:
|
||||
adjustToggle("Strip[2]" . ".B1", val)
|
||||
adjustToggle("Strip[2]" . ".B2", val)
|
||||
adjustToggle("Strip[2].B1", val)
|
||||
adjustToggle("Strip[2].B2", val)
|
||||
Return
|
||||
Default:
|
||||
Return
|
||||
@ -215,19 +215,19 @@ midiCCin:
|
||||
Switch cc
|
||||
{
|
||||
Case 7: ; Rewind
|
||||
adjustToggle("Recorder" . ".REW", val)
|
||||
adjustToggle("Recorder.REW", val)
|
||||
Return
|
||||
Case 8: ; Fast Forward
|
||||
adjustToggle("Recorder" . ".FF", val)
|
||||
adjustToggle("Recorder.FF", val)
|
||||
Return
|
||||
Case 9:
|
||||
adjustToggle("Recorder" . ".Stop", val)
|
||||
adjustToggle("Recorder.Stop", val)
|
||||
Return
|
||||
Case 10:
|
||||
adjustToggle("Recorder" . ".Play", val)
|
||||
adjustToggle("Recorder.Play", val)
|
||||
Return
|
||||
Case 11:
|
||||
adjustToggle("Recorder" . ".Record", val)
|
||||
adjustToggle("Recorder.Record", val)
|
||||
Return
|
||||
Default:
|
||||
Return
|
||||
@ -254,14 +254,14 @@ dial_to_pan(val)
|
||||
; =============
|
||||
|
||||
Volume_Mute::
|
||||
b0M := Round(readParam("Bus[0]" . ".Mute")) ; Speakers
|
||||
b1M := Round(readParam("Bus[1]" . ".Mute")) ; Headphones
|
||||
b0M := Round(readParam("Bus[0].Mute")) ; Speakers
|
||||
b1M := Round(readParam("Bus[1].Mute")) ; Headphones
|
||||
cM := b0M + b1M
|
||||
|
||||
if (cM = "2")
|
||||
{ ; Unmute the ones that were unmuted before
|
||||
adjustToggle("Bus[0]" . ".Mute", b0Ms) ; Speakers
|
||||
adjustToggle("Bus[1]" . ".Mute", b1Ms) ; Headphones
|
||||
adjustToggle("Bus[0].Mute", b0Ms) ; Speakers
|
||||
adjustToggle("Bus[1].Mute", b1Ms) ; Headphones
|
||||
} else {
|
||||
if !(b0M) ; Speakers
|
||||
{
|
||||
@ -277,8 +277,8 @@ Volume_Mute::
|
||||
b1Ms := False
|
||||
}
|
||||
; Mute
|
||||
adjustToggle("Bus[0]" . ".Mute", "0") ; Speakers
|
||||
adjustToggle("Bus[1]" . ".Mute", "0") ; Headphones
|
||||
adjustToggle("Bus[0].Mute", "0") ; Speakers
|
||||
adjustToggle("Bus[1].Mute", "0") ; Headphones
|
||||
}
|
||||
Return
|
||||
|
||||
@ -315,12 +315,12 @@ adjustVolLvl(loc, tVol) {
|
||||
DllCall(VMR_FUNCTIONS["SetParameterFloat"], "AStr", loc, "Float", tVol, "Int")
|
||||
}
|
||||
|
||||
adjustToggle(loc, tM) {
|
||||
if (tM = 0)
|
||||
tM := 1
|
||||
else
|
||||
tM := 0
|
||||
DllCall(VMR_FUNCTIONS["SetParameterFloat"], "AStr", loc, "Float", tM, "Int")
|
||||
adjustToggle(func, togg) {
|
||||
DllCall(VMR_FUNCTIONS["SetParameterFloat"], "AStr", func, "Float", togg, "Int")
|
||||
}
|
||||
|
||||
adjustString(func, str) {
|
||||
DllCall(VMR_FUNCTIONS["SetParameterFloat"], "AStr", func, "Float", str, "Str")
|
||||
}
|
||||
|
||||
|
||||
@ -341,4 +341,3 @@ die(die_string:="UNSPECIFIED FATAL ERROR.", exit_status:=254) {
|
||||
MsgBox 16, FATAL ERROR, %die_string%
|
||||
ExitApp exit_status
|
||||
}
|
||||
|
||||
|
BIN
default.nktrl2_data
Normal file
BIN
default.nktrl2_data
Normal file
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user