def connect(self, parameter):
     if parameter:
         InputControlElement.connect_to(self, parameter)
         if self.mapped_parameter() is not None:
             try:
                 self.mapped_parameter().remove_value_listener(self.value_updated)
             except:
                 pass
 def connect(self, parameter):
     if parameter:
         InputControlElement.connect_to(self, parameter)
         if self.mapped_parameter() is not None:
             try:
                 self.mapped_parameter().remove_value_listener(
                     self.value_updated)
             except:
                 pass
Example #3
0
 def __init__(self, logger, is_momentary, msg_type, channel, identifier, *a, **k):
     """
     Button element that works with the HSB color skin.  Need to use custom button element because
     the _Framework assumes that color data can be sent on one MIDI channel but sending HSB to the X1
     values requires channels 1, 2 and 3 for Hue, Saturation, and Brightness respectively.
     """
     super(ColorButtonElement, self).__init__(is_momentary, msg_type, channel, identifier, *a, **k)       
     self.log_message = logger
     self._last_received_value = -1  
     self.interfaces = [InputControlElement(msg_type = msg_type, channel=i, identifier = identifier, *a, **k) for i in range(3)]
     for i in self.interfaces:
         i.send_depends_on_forwarding = False
         i._set_suppress_script_forwarding(True)
     self._last_message_sent = None
Example #4
0
	def script_wants_forwarding(self):
		if not self._is_enabled:
			return False
		else:
			return InputControlElement.script_wants_forwarding(self)
Example #5
0
	def release_parameter(self):
		if(self._parameter_to_map_to != None):
			self.remove_parameter_listener(self._parameter_to_map_to)
		self.send_value(0, True)
		InputControlElement.release_parameter(self)
		self._parameter_last_num_value = 0
 def disconnect(self):
     InputControlElement.disconnect(self)
Example #7
0
 def release_parameter(self):
     if (self._parameter_to_map_to != None):
         self.remove_parameter_listener(self._parameter_to_map_to)
     InputControlElement.release_parameter(self)
Example #8
0
	def send_value(self, value, force = False):
		if not self._script is None and self._script.flash_status:
			super(AumPCMonoButtonElement, self).send_value(value, force)
		else:
			InputControlElement.send_value(self, value, force)
	def release_parameter(self):
		if(self._parameter_to_map_to != None):
			self.remove_parameter_listener(self._parameter_to_map_to)
		InputControlElement.release_parameter(self)
	def receive_value(self, value):
		#for notification in self._value_notifications:
		#	self._script.log_message(str(self.name) + ' ' + str(notification))
		if self._is_enabled:
			InputControlElement.receive_value(self, value)