-
Notifications
You must be signed in to change notification settings - Fork 0
/
upperpadslights.py
78 lines (67 loc) · 2.63 KB
/
upperpadslights.py
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
66
67
68
69
70
71
72
73
74
75
76
77
78
### Upper pads lights
import ui
import device
import pads
import colors
import variables as var
import transport
def Padlights():
if ui.isMetronomeEnabled(): # Metronome pad lighting at start. Useful if your default template starts with metronome ON.
device.midiOutMsg(0x92,0,0x61,0x09)
else:
device.midiOutMsg(0x90,0,0x61,70)
if transport.getLoopMode(): # Looping mode pad lighting at start. Useful if your default template starts at Pattern mode.
device.midiOutMsg(0x92,0,pads.sespad1_DATA1,0x15)
else:
device.midiOutMsg(0x92,0,pads.sespad1_DATA1,0x09)
if ui.isStartOnInputEnabled():
device.midiOutMsg(0x90,0,0x62,0x09)
else:
device.midiOutMsg(0x90,0,0x62,70)
if ui.isPrecountEnabled():
device.midiOutMsg(0x90,0,0x63,0x09)
else:
device.midiOutMsg(0x90,0,0x63,70)
if ui.getVisible(2):
if var.isPlaying:
device.midiOutMsg(0x92,0,pads.sespad5_DATA1,colors.ORANGE2)
else:
device.midiOutMsg(0x90,0,pads.sespad5_DATA1,colors.ORANGE2)
else:
device.midiOutMsg(0x90,0,pads.sespad5_DATA1,70)
if ui.getVisible(1):
if var.isPlaying:
device.midiOutMsg(0x92,0,pads.sespad6_DATA1,colors.ORANGE2)
else:
device.midiOutMsg(0x90,0,pads.sespad6_DATA1,colors.ORANGE2)
else:
device.midiOutMsg(0x90,0,pads.sespad6_DATA1,70)
if not (var.SCENE_SEL== "Channel rack" and var.scmodes.get("CHANRACK_READYFOR") == "Stop"):
if ui.getVisible(3):
if var.isPlaying:
device.midiOutMsg(0x92,0,pads.sespad7_DATA1,colors.ORANGE2)
else:
device.midiOutMsg(0x90,0,pads.sespad7_DATA1,colors.ORANGE2)
else:
device.midiOutMsg(0x90,0,pads.sespad7_DATA1,70)
else:
device.midiOutMsg(0x92,0,pads.sespad7_DATA1,colors.crRectSel)
if not (var.SCENE_SEL== "Channel rack" and var.scmodes.get("CHANRACK_READYFOR") == "Stop"):
if ui.getVisible(0):
if var.isPlaying:
device.midiOutMsg(0x92,0,pads.sespad8_DATA1,colors.ORANGE2)
else:
device.midiOutMsg(0x90,0,pads.sespad8_DATA1,colors.ORANGE2)
else:
device.midiOutMsg(0x90,0,pads.sespad8_DATA1,70)
else:
device.midiOutMsg(0x92,0,pads.sespad8_DATA1,colors.crRectSel)
def transportLights():
if transport.isPlaying():
device.midiOutMsg(0xb2,0, 0x73, 0x03)
else:
device.midiOutMsg(0xb0,0, 0x73, 0x02)
if transport.isRecording():
device.midiOutMsg(0xb2, 0, 0x75, 0x03)
else:
device.midiOutMsg(0xbf, 0, 0x75, 0x00)