Compare commits

..

No commits in common. "04dbc311feb21fb6faaa3632ea49784a820580cb" and "551afbc885c5b00333000899a61107d56062cdb0" have entirely different histories.

60
VB.ahk
View File

@ -1,4 +1,4 @@
SetWorkingDir, C:\Users\Leand.000\Documents\D3K
#NoEnv
#SingleInstance force
#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
@ -9,6 +9,7 @@ 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
@ -69,7 +70,7 @@ midiCCin:
Switch chan
{
Case 1: ; The first fader: Work Laptop Receive
Case 1: ; The first fader: Work Laptop Out
Switch cc
{
Case 0:
@ -91,7 +92,7 @@ midiCCin:
Default:
Return
}
Case 2: ; The second fader: Work Laptop Send
Case 2: ; The second fader: Work Laptop In
Switch cc
{
Case 0:
@ -129,7 +130,7 @@ midiCCin:
Default:
Return
}
Case 4: ; The third fader: Comms Send
Case 4: ; The third fader: Comms In
Switch cc
{
Case 0:
@ -158,7 +159,7 @@ midiCCin:
Default:
Return
}
Case 5: ; The fifth fader: Comms Receive
Case 5: ; The fifth fader: Comms Out
Switch cc
{
Case 0:
@ -225,17 +226,9 @@ midiCCin:
Case 3:
adjustToggle("Strip[2].Mute", val)
Return
Case 4: ; Send audio to Comms out & record
Case 4:
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
@ -259,47 +252,23 @@ midiCCin:
Send, {Media_Play_Pause}
Return
Case 4: ; Set button / death sound
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}
}
Random, temp, 1, 4
adjustString("Recorder.Load", "D:\Combine\metropolice\die" . temp . ".wav")
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:
@ -432,6 +401,7 @@ adjustToggle(func, togg) {
}
adjustString(func, str) {
MsgBox % str
DllCall(VMR_FUNCTIONS["SetParameterFloat"], "AStr", func, "AStr", str, "Str")
}
@ -452,4 +422,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
}
}