当前位置: 首页>>代码示例>>Python>>正文


Python ButtonSliderElement.ButtonSliderElement类代码示例

本文整理汇总了Python中_Framework.ButtonSliderElement.ButtonSliderElement的典型用法代码示例。如果您正苦于以下问题:Python ButtonSliderElement类的具体用法?Python ButtonSliderElement怎么用?Python ButtonSliderElement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ButtonSliderElement类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

	def __init__(self, buttons, parent):
		ButtonSliderElement.__init__(self, buttons)
		self._num_buttons = len(buttons)
		self._value_map = tuple([float(index) / (self._num_buttons-1) for index in range(self._num_buttons)])
		self._precision_mode = False
		self._parent = parent
		self._enabled = True
开发者ID:Tatum666,项目名称:Launchpad95,代码行数:7,代码来源:DeviceControllerStrip.py

示例2: __init__

	def __init__(self, buttons):
		ButtonSliderElement.__init__(self, buttons)
		num_buttons = len(buttons)
		self._disabled = False
		self._mode = SLIDER_MODE_VOLUME
		self._value_map = tuple([ float((index / num_buttons)) for index in range(num_buttons) ])
		self._parent = None
		self._precision_mode = False
开发者ID:ltackett,项目名称:Launchpad85,代码行数:8,代码来源:PreciseButtonSliderElement.py

示例3: release_parameter

    def release_parameter(self):
        old_param = self._parameter_to_map_to
        ButtonSliderElement.release_parameter(self)
        if not self._disabled and old_param != None:
            for button in self._buttons:
                button.reset()

        return
开发者ID:cce,项目名称:buttons,代码行数:8,代码来源:PreciseButtonSliderElement.py

示例4: __init__

	def __init__(self, buttons, control_surface, parent = None):
		ButtonSliderElement.__init__(self, buttons)
		self._control_surface = control_surface
		self._skin = self._control_surface._skin
		self._parent = parent
		self._num_buttons = len(buttons)
		self._value_map = tuple([float(index) / (self._num_buttons-1) for index in range(self._num_buttons)])
		self._precision_mode = False
	
		self._enabled = True
开发者ID:spoutnikz,项目名称:Launchpad95,代码行数:10,代码来源:DeviceControllerStrip.py

示例5: send_value

	def send_value(self, value):
		assert self._disabled or value != None
		assert isinstance(value, int)
		assert value in range(128)
		if value != self._last_sent_value:
			if self._mode == SLIDER_MODE_SINGLE:
				ButtonSliderElement.send_value(self, value)
			elif self._mode == SLIDER_MODE_VOLUME:
				self._send_value_volume(value)
			elif self._mode == SLIDER_MODE_PAN:
				self._send_value_pan(value)
			else:
				assert False
			self._last_sent_value = value
开发者ID:Adamdma,项目名称:monomodular,代码行数:14,代码来源:PreciseButtonSliderElement.py

示例6: send_value

 def send_value(self, value):
     if (not self._disabled):
         assert (value != None)
         assert isinstance(value, int)
         assert (value in range(128))
         if (value != self._last_sent_value):
             if (self._mode == SLIDER_MODE_SINGLE):
                 ButtonSliderElement.send_value(self, value)
             elif (self._mode == SLIDER_MODE_VOLUME):
                 self._send_value_volume(value)
             elif (self._mode == SLIDER_MODE_PAN):
                 self._send_value_pan(value)
             else:
                 assert False
             self._last_sent_value = value
开发者ID:Adamdma,项目名称:monomodular,代码行数:15,代码来源:PreciseButtonSliderElement.py

示例7: send_value

 def send_value(self, value):
     raise self._disabled or value != None or AssertionError
     raise isinstance(value, int) or AssertionError
     if not value in range(128):
         raise AssertionError
         if value != self._last_sent_value:
             if self._mode == SLIDER_MODE_SINGLE:
                 ButtonSliderElement.send_value(self, value)
             elif self._mode == SLIDER_MODE_VOLUME:
                 self._send_value_volume(value)
             elif self._mode == SLIDER_MODE_PAN:
                 self._send_value_pan(value)
             else:
                 raise False or AssertionError
             self._last_sent_value = value
开发者ID:SteveClement,项目名称:AbletonLive9_RemoteScripts,代码行数:15,代码来源:PreciseButtonSliderElement.py

示例8: release_parameter

 def release_parameter(self):
     old_param = self._parameter_to_map_to
     ButtonSliderElement.release_parameter(self)
     if ((not self._disabled) and (old_param != None)):
         for button in self._buttons:
             button.reset()
开发者ID:Adamdma,项目名称:monomodular,代码行数:6,代码来源:PreciseButtonSliderElement.py

示例9: connect_to

 def connect_to(self, parameter):
     ButtonSliderElement.connect_to(self, parameter)
     if (self._parameter_to_map_to != None):
         self._last_sent_value = -1
         self._on_parameter_changed()
开发者ID:Adamdma,项目名称:monomodular,代码行数:5,代码来源:PreciseButtonSliderElement.py


注:本文中的_Framework.ButtonSliderElement.ButtonSliderElement类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。