-
Notifications
You must be signed in to change notification settings - Fork 0
/
BaseChannelStripComponent.py
37 lines (31 loc) · 1.3 KB
/
BaseChannelStripComponent.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
from _Framework.ChannelStripComponent import ChannelStripComponent
from BaseMessenger import BaseMessenger
from Utilities import set_channel
class BaseChannelStripComponent(ChannelStripComponent, BaseMessenger):
""" Calls reset on some buttons when they're assigned.
This clears out changes to pad enabled, channel and note made by
the Step Sequencer or Melodic Components. This is because we're using
buttons from the Matrix for these controls, which are prone to being fucked with
"""
def set_arm_button(self, button):
if button:
button.reset()
button.set_on_off_values('MixerButton.Arm', 'Button.Off')
super(BaseChannelStripComponent, self).set_arm_button(button)
self.update()
def set_solo_button(self, button):
if button:
button.reset()
button.set_on_off_values('MixerButton.Solo', 'Button.Off')
super(BaseChannelStripComponent, self).set_solo_button(button)
self.update()
def set_mute_button(self, button):
if button:
button.reset()
button.set_on_off_values('MixerButton.Mute', 'Button.Off')
super(BaseChannelStripComponent, self).set_mute_button(button)
self.update()
def set_volume_control(self, control):
set_channel([control], 1)
super(BaseChannelStripComponent, self).set_volume_control(control)
self.update()