@@ -12,63 +12,88 @@ def __init__(self, core, out, mode, index=0, octave_separation=0):
12
12
# self.pos = glm.ivec2(0, 0)
13
13
14
14
def button (self , x , y ):
15
- if self .mode == 'lpx' :
16
- if y == - 1 :
17
- if x == 0 :
18
- self .octave += 1
19
- self .core .clear_marks (use_lights = False )
20
- self .core .send_all_notes_off ()
21
- elif x == 1 :
22
- self .octave -= 1
23
- self .core .clear_marks (use_lights = False )
24
- self .core .send_all_notes_off ()
25
- elif x == 2 :
26
- self .core .move_board (- 1 )
27
- # self.pos.x -= 1
28
- elif x == 3 :
29
- self .core .move_board (1 )
30
- elif x == 4 :
31
- self .core .set_tonic (self .core .tonic - 1 )
32
- elif x == 5 :
33
- self .core .set_tonic (self .core .tonic + 1 )
34
- if x == 8 :
35
- if y == 0 :
36
- self .core .next_scale ()
37
- elif y == 1 :
38
- self .core .prev_scale ()
39
- elif y == 2 :
40
- self .core .next_mode ()
41
- elif y == 3 :
42
- self .core .prev_mode ()
43
- elif y == 4 :
44
- self .core .next_bank ()
45
- elif y == 5 :
46
- self .core .prev_bank ()
47
- elif y == 6 :
48
- self .core .next_program ()
49
- elif y == 7 :
50
- self .core .prev_program ()
51
-
15
+ # if self.mode == 'lpx':
16
+ if y == - 1 :
17
+ if x == 0 :
18
+ if self .core .options .debug :
19
+ print ("OCT+" )
20
+ self .octave += 1
21
+ self .core .clear_marks (use_lights = False )
22
+ self .core .send_all_notes_off ()
23
+ elif x == 1 :
24
+ if self .core .options .debug :
25
+ print ("OCT-" )
26
+ self .octave -= 1
27
+ self .core .clear_marks (use_lights = False )
28
+ self .core .send_all_notes_off ()
29
+ elif x == 2 :
30
+ if self .core .options .debug :
31
+ print ("MOV-" )
32
+ self .core .move_board (- 1 )
33
+ # self.pos.x -= 1
34
+ elif x == 3 :
35
+ if self .core .options .debug :
36
+ print ("MOV+" )
37
+ self .core .move_board (1 )
38
+ elif x == 4 :
39
+ if self .core .options .debug :
40
+ print ("TRA-" )
41
+ self .core .set_tonic (self .core .tonic - 1 )
42
+ elif x == 5 :
43
+ if self .core .options .debug :
44
+ print ("TRA+" )
45
+ self .core .set_tonic (self .core .tonic + 1 )
46
+ if x == 8 :
47
+ if y == 0 :
48
+ if self .core .options .debug :
49
+ print ("SCL+" )
50
+ self .core .next_scale ()
51
+ elif y == 1 :
52
+ if self .core .options .debug :
53
+ print ("SCL-" )
54
+ self .core .prev_scale ()
55
+ elif y == 2 :
56
+ if self .core .options .debug :
57
+ print ("MOD+" )
58
+ self .core .next_mode ()
59
+ elif y == 3 :
60
+ if self .core .options .debug :
61
+ print ("MOD-" )
62
+ self .core .prev_mode ()
63
+ elif y == 4 :
64
+ if self .core .options .debug :
65
+ print ("BANK+" )
66
+ self .core .next_bank ()
67
+ elif y == 5 :
68
+ if self .core .options .debug :
69
+ print ("BANK-" )
70
+ self .core .prev_bank ()
71
+ elif y == 6 :
72
+ if self .core .options .debug :
73
+ print ("PROG+" )
74
+ self .core .next_program ()
75
+ elif y == 7 :
76
+ if self .core .options .debug :
77
+ print ("PROG-" )
78
+ self .core .prev_program ()
52
79
53
80
def set_lights (self ):
54
- if self .mode == "lpx" :
55
- self .out .LedCtrlXY (0 , 0 , 0 , 0 , 63 )
56
- self .out .LedCtrlXY (1 , 0 , 0 , 0 , 63 )
57
- self .out .LedCtrlXY (2 , 0 , 63 , 0 , 63 )
58
- self .out .LedCtrlXY (3 , 0 , 63 , 0 , 63 )
59
- self .out .LedCtrlXY (4 , 0 , 63 , 0 , 0 )
60
- self .out .LedCtrlXY (5 , 0 , 63 , 0 , 0 )
61
-
62
- self .out .LedCtrlXY (8 , 1 , 63 , 63 , 0 )
63
- self .out .LedCtrlXY (8 , 2 , 63 , 63 , 0 )
64
- self .out .LedCtrlXY (8 , 3 , 0 , 63 , 63 )
65
- self .out .LedCtrlXY (8 , 4 , 0 , 63 , 63 )
66
- self .out .LedCtrlXY (8 , 5 , 63 , 24 , 63 )
67
- self .out .LedCtrlXY (8 , 6 , 63 , 24 , 63 )
68
- self .out .LedCtrlXY (8 , 7 , 24 , 63 , 63 )
69
- self .out .LedCtrlXY (8 , 8 , 24 , 63 , 63 )
70
-
71
-
81
+ # if self.mode == "lpx":
82
+ self .out .LedCtrlXY (0 , 0 , 0 , 0 , 63 )
83
+ self .out .LedCtrlXY (1 , 0 , 0 , 0 , 63 )
84
+ self .out .LedCtrlXY (2 , 0 , 63 , 0 , 63 )
85
+ self .out .LedCtrlXY (3 , 0 , 63 , 0 , 63 )
86
+ self .out .LedCtrlXY (4 , 0 , 63 , 0 , 0 )
87
+ self .out .LedCtrlXY (5 , 0 , 63 , 0 , 0 )
88
+
89
+ self .out .LedCtrlXY (8 , 1 , 63 , 63 , 0 )
90
+ self .out .LedCtrlXY (8 , 2 , 63 , 63 , 0 )
91
+ self .out .LedCtrlXY (8 , 3 , 0 , 63 , 63 )
92
+ self .out .LedCtrlXY (8 , 4 , 0 , 63 , 63 )
93
+ self .out .LedCtrlXY (8 , 5 , 63 , 24 , 63 )
94
+ self .out .LedCtrlXY (8 , 6 , 63 , 24 , 63 )
95
+ self .out .LedCtrlXY (8 , 7 , 24 , 63 , 63 )
96
+ self .out .LedCtrlXY (8 , 8 , 24 , 63 , 63 )
72
97
73
98
def get_octave (self ):
74
99
return self .octave_separation + self .octave
0 commit comments