-
Notifications
You must be signed in to change notification settings - Fork 2
/
worms midi key test.ahk
65 lines (56 loc) · 1.06 KB
/
worms midi key test.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
SendMode Input
SetWorkingDir %A_ScriptDir%
OnExit, sub_exit
if (midi_in_Open(0))
ExitApp
;-------------------- Midi "hotkey" mappings -----------------------
listenNote(55, "space")
listenNote(60, "note60")
listenNote(62, "note62")
listenNote(63, "note63")
listenNote(64, "note64")
return
;----------------------End of auto execute section--------------------
sub_exit:
midi_in_Close()
ExitApp
;-------------------------Miscellaneous hotkeys-----------------------
Esc::ExitApp
;-------------------------Midi "hotkey" functions---------------------
space(note, vel)
{
if (vel)
Send {Space down}
else
Send {Space up}
}
note60(note, vel)
{
if (vel)
Send {Left down}
else
Send {Left up}
}
note62(note, vel)
{
if (vel)
Send {Down down}
else
Send {Down up}
}
note63(note, vel)
{
if (vel)
Send {Up down}
else
Send {Up up}
}
note64(note, vel)
{
if (vel)
Send {Right down}
else
Send {Right up}
}
;------------------------- Midi input library ----------------------
#include midi_in_lib.ahk