Compare commits
2 Commits
551afbc885
...
04dbc311fe
Author | SHA1 | Date | |
---|---|---|---|
04dbc311fe | |||
de33a5956a |
60
VB.ahk
60
VB.ahk
@ -1,4 +1,4 @@
|
||||
#NoEnv
|
||||
SetWorkingDir, C:\Users\Leand.000\Documents\D3K
|
||||
#SingleInstance force
|
||||
#MaxHotkeysPerInterval 99000000
|
||||
#HotkeyInterval 99000000
|
||||
@ -9,7 +9,6 @@ ListLines Off
|
||||
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
|
||||
SetTitleMatchMode RegEx
|
||||
StringCaseSense Off
|
||||
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
|
||||
|
||||
OnExit("cleanup_before_exit")
|
||||
SetFormat, Float, 0.3
|
||||
@ -70,7 +69,7 @@ midiCCin:
|
||||
|
||||
Switch chan
|
||||
{
|
||||
Case 1: ; The first fader: Work Laptop Out
|
||||
Case 1: ; The first fader: Work Laptop Receive
|
||||
Switch cc
|
||||
{
|
||||
Case 0:
|
||||
@ -92,7 +91,7 @@ midiCCin:
|
||||
Default:
|
||||
Return
|
||||
}
|
||||
Case 2: ; The second fader: Work Laptop In
|
||||
Case 2: ; The second fader: Work Laptop Send
|
||||
Switch cc
|
||||
{
|
||||
Case 0:
|
||||
@ -130,7 +129,7 @@ midiCCin:
|
||||
Default:
|
||||
Return
|
||||
}
|
||||
Case 4: ; The third fader: Comms In
|
||||
Case 4: ; The third fader: Comms Send
|
||||
Switch cc
|
||||
{
|
||||
Case 0:
|
||||
@ -159,7 +158,7 @@ midiCCin:
|
||||
Default:
|
||||
Return
|
||||
}
|
||||
Case 5: ; The fifth fader: Comms Out
|
||||
Case 5: ; The fifth fader: Comms Receive
|
||||
Switch cc
|
||||
{
|
||||
Case 0:
|
||||
@ -226,9 +225,17 @@ midiCCin:
|
||||
Case 3:
|
||||
adjustToggle("Strip[2].Mute", val)
|
||||
Return
|
||||
Case 4:
|
||||
Case 4: ; Send audio to Comms out & record
|
||||
adjustToggle("Strip[2].B1", val)
|
||||
adjustToggle("Strip[2].B2", val)
|
||||
if (val)
|
||||
{
|
||||
Send {F22} ; Toggle PTT/Voice Activity
|
||||
Send {F23 down}
|
||||
} else {
|
||||
Send {F23 up}
|
||||
Send {F22} ; Toggle PTT/Voice Activity
|
||||
}
|
||||
Return
|
||||
Default:
|
||||
Return
|
||||
@ -252,23 +259,47 @@ midiCCin:
|
||||
Send, {Media_Play_Pause}
|
||||
Return
|
||||
Case 4: ; Set button / death sound
|
||||
Random, temp, 1, 4
|
||||
adjustString("Recorder.Load", "D:\Combine\metropolice\die" . temp . ".wav")
|
||||
if (val)
|
||||
{
|
||||
Send {F22} ; Toggle PTT/Voice Activity
|
||||
Send {F23 down}
|
||||
;Random, temp, 1, 4
|
||||
;adjustString("Recorder.Load", "D:\Combine\metropolice\die" . temp . ".wav")
|
||||
adjustToggle("Recorder.Play", True) ; Temp fix until file loading works
|
||||
} else {
|
||||
Send {F23 up}
|
||||
Send {F22}
|
||||
adjustToggle("Recorder.Stop", True)
|
||||
Sleep, 250 ; Makes sure the playback is reset to the beginning, temp until loading files is possible
|
||||
adjustToggle("Recorder.Stop", True)
|
||||
}
|
||||
Return
|
||||
Case 5: ; <- under Marker / dislike song
|
||||
if !(val)
|
||||
{
|
||||
Send ^+{PgDn}
|
||||
}
|
||||
Return
|
||||
Case 6: ; -> under Marker / like song
|
||||
if !(val)
|
||||
{
|
||||
Send ^+{PgUp}
|
||||
}
|
||||
Return
|
||||
Case 7: ; Rewind
|
||||
if (val)
|
||||
{
|
||||
adjustToggle("Recorder.REW", true)
|
||||
adjustToggle("Recorder.REW", True)
|
||||
} else {
|
||||
adjustToggle("Recorder.Play", true)
|
||||
adjustToggle("Recorder.Play", True)
|
||||
}
|
||||
Return
|
||||
Case 8: ; Fast Forward
|
||||
if (val)
|
||||
{
|
||||
adjustToggle("Recorder.FF", true)
|
||||
adjustToggle("Recorder.FF", True)
|
||||
} else {
|
||||
adjustToggle("Recorder.Play", true)
|
||||
adjustToggle("Recorder.Play", True)
|
||||
}
|
||||
Return
|
||||
Case 9:
|
||||
@ -401,7 +432,6 @@ adjustToggle(func, togg) {
|
||||
}
|
||||
|
||||
adjustString(func, str) {
|
||||
MsgBox % str
|
||||
DllCall(VMR_FUNCTIONS["SetParameterFloat"], "AStr", func, "AStr", str, "Str")
|
||||
}
|
||||
|
||||
@ -422,4 +452,4 @@ cleanup_before_exit(exit_reason, exit_code) {
|
||||
die(die_string:="UNSPECIFIED FATAL ERROR.", exit_status:=254) {
|
||||
MsgBox 16, FATAL ERROR, %die_string%
|
||||
ExitApp exit_status
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user