@@ -1056,11 +1056,8 @@ def cb_midi_in(self, data, timestamp, force_channel=None):
1056
1056
# self.midi_write(self.split_out, data, timestamp)
1057
1057
# else:
1058
1058
# self.midi_write(self.midi_out, data, timestamp)
1059
- elif note and note .location is not None :
1060
- col = note .location .x
1061
- row = note .location .y
1062
- split_chan = self .channel_from_split (col , row )
1063
- if split_chan :
1059
+ elif note and note .split is not None :
1060
+ if note .split :
1064
1061
self .midi_write (self .split_out , data , timestamp )
1065
1062
else :
1066
1063
self .midi_write (self .midi_out , data , timestamp )
@@ -1641,6 +1638,11 @@ def __init__(self):
1641
1638
self .btn_sharps_flats = pygame_gui .elements .UIButton (
1642
1639
relative_rect = pygame .Rect ((bs .x * 16 + 2 , y ), (bs .x , bs .y )),
1643
1640
text = '#/b' ,
1641
+ manager = self .gui
1642
+ )
1643
+ self .btn_quit = pygame_gui .elements .UIButton (
1644
+ relative_rect = pygame .Rect ((bs .x * 17 + 2 , y ), (bs .x , bs .y )),
1645
+ text = 'QUIT' ,
1644
1646
manager = self .gui
1645
1647
)
1646
1648
# self.next_scale = pygame_gui.elements.UIButton(
@@ -2242,6 +2244,8 @@ def logic(self, dt):
2242
2244
self .prev_mode ()
2243
2245
elif ev .ui_element == self .btn_sharps_flats :
2244
2246
self .toggle_sharps_flats ()
2247
+ elif ev .ui_element == self .btn_quit :
2248
+ self .quit ()
2245
2249
# elif ev.type == pygame_gui.UI_HORIZONTAL_SLIDER_MOVED:
2246
2250
# if ev.ui_element == self.slider_velocity:
2247
2251
# global self.options.velocity_curve
0 commit comments