本文整理汇总了Python中_Framework.SessionZoomingComponent.SessionZoomingComponent.set_playing_value方法的典型用法代码示例。如果您正苦于以下问题:Python SessionZoomingComponent.set_playing_value方法的具体用法?Python SessionZoomingComponent.set_playing_value怎么用?Python SessionZoomingComponent.set_playing_value使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类_Framework.SessionZoomingComponent.SessionZoomingComponent
的用法示例。
在下文中一共展示了SessionZoomingComponent.set_playing_value方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MainSelectorComponent
# 需要导入模块: from _Framework.SessionZoomingComponent import SessionZoomingComponent [as 别名]
# 或者: from _Framework.SessionZoomingComponent.SessionZoomingComponent import set_playing_value [as 别名]
#.........这里部分代码省略.........
if as_active:
self._stepseq._mode = mode
self._stepseq._force_update = True
self._stepseq._is_active = True
self._stepseq.set_enabled(True)
self._stepseq._on_notes_changed()
self._stepseq.update_buttons()
self._config_button.send_value(32)
else:
self._stepseq._mode = 1
self._stepseq._is_active = False
self._stepseq.set_enabled(False)
def _setup_device_controller(self, as_active):
if self._device_controller != None:
if as_active:
# for button in range(8):
# self._side_buttons[button].set_enabled(True)
self._device_controller._is_active = True
self._device_controller.set_enabled(True)
self._device_controller.update()
self._config_button.send_value(32)
else:
self._device_controller._is_active = False
self._device_controller.set_enabled(False)
def _setup_mixer(self, as_active):
assert isinstance(as_active, type(False))
if as_active and self._sub_modes.is_enabled():
self._sub_modes.set_mode(-1)
self._sub_modes.set_enabled(as_active)
def _setup_user1(self, release_matrix=True, release_side_buttons=True, release_nav_buttons=True):
for scene_index in range(8):
if release_side_buttons:
scene_button = self._side_buttons[scene_index]
scene_button.set_on_off_values(127, LED_OFF)
scene_button.turn_off()
scene_button.set_enabled((not release_side_buttons))
for track_index in range(8):
button = self._matrix.get_button(track_index, scene_index)
button.set_on_off_values(127, LED_OFF)
button.turn_off()
button.set_enabled((not release_matrix))
for button in self._nav_buttons:
if release_nav_buttons:
button.set_on_off_values(127, LED_OFF)
button.turn_off()
button.set_enabled((not release_nav_buttons))
if release_matrix:
self._config_button.send_value(2)
self._config_button.send_value(32, force_send=True)
def _setup_user2(self, release_buttons):
for scene_index in range(8):
scene_button = self._side_buttons[scene_index]
scene_button.set_on_off_values(127, LED_OFF)
scene_button.turn_off()
scene_button.set_enabled(not release_buttons)
for track_index in range(8):
button = self._matrix.get_button(track_index, scene_index)
button.set_on_off_values(127, LED_OFF)
button.turn_off()
button.set_enabled(not release_buttons)
for button in self._nav_buttons:
button.set_on_off_values(127, LED_OFF)
button.turn_off()
button.set_enabled(not release_buttons)
if release_buttons:
self._config_button.send_value(2)
self._config_button.send_value(32, force_send=True)
def _init_session(self):
self._session.set_stop_track_clip_value(AMBER_BLINK)
for scene_index in range(self._matrix.height()):
scene = self._session.scene(scene_index)
scene.set_triggered_value(GREEN_BLINK)
scene.name = "Scene_" + str(scene_index)
for track_index in range(self._matrix.width()):
clip_slot = scene.clip_slot(track_index)
clip_slot.set_triggered_to_play_value(GREEN_BLINK)
clip_slot.set_triggered_to_record_value(RED_BLINK)
clip_slot.set_stopped_value(AMBER_FULL)
clip_slot.set_started_value(GREEN_FULL)
clip_slot.set_recording_value(RED_FULL)
clip_slot.name = str(track_index) + "_Clip_Slot_" + str(scene_index)
self._all_buttons.append(self._matrix.get_button(track_index, scene_index))
self._zooming.set_stopped_value(RED_FULL)
self._zooming.set_selected_value(AMBER_FULL)
self._zooming.set_playing_value(GREEN_FULL)
def log_message(self, message):
self._parent.log_message(message)
示例2: MainSelectorComponent
# 需要导入模块: from _Framework.SessionZoomingComponent import SessionZoomingComponent [as 别名]
# 或者: from _Framework.SessionZoomingComponent.SessionZoomingComponent import set_playing_value [as 别名]
#.........这里部分代码省略.........
def _setup_user_mode(self, release_matrix=True, release_side_buttons=True, release_nav_buttons = True, drum_rack_mode = True):
for scene_index in range(8):
scene_button = self._side_buttons[scene_index]
scene_button.set_on_off_values(127, LED_OFF)
scene_button.force_next_send()
scene_button.turn_off()
scene_button.set_enabled((not release_side_buttons))
for track_index in range(8):
button = self._matrix.get_button(track_index, scene_index)
button.set_on_off_values(127, LED_OFF)
button.turn_off()
button.set_enabled((not release_matrix))
for button in self._nav_buttons:
button.set_on_off_values(127, LED_OFF)
button.turn_off()
button.set_enabled((not release_nav_buttons))
if drum_rack_mode:
self._config_button.send_value(2)
self._config_button.send_value(32)
def _setup_step_sequencer(self, as_active, mode=0):
if(self._stepseq!=None):
if(self._stepseq.is_enabled()!=as_active or self._stepseq._mode!=mode):
if as_active:
self._activate_scene_buttons(True)
self._activate_matrix(True)
self._activate_navigation_buttons(True)
self._config_button.send_value(32)
self._stepseq.set_enabled(True)
else:
self._stepseq.set_enabled(False)
def _setup_mixer(self, as_active):
assert isinstance(as_active, type(False))
if as_active:
self._activate_navigation_buttons(True)
self._activate_scene_buttons(True)
self._activate_matrix(True)
if(self._sub_modes.is_enabled()):
#go back to default mode
self._sub_modes.set_mode(-1)
self._sub_modes.set_enabled(as_active)
def _init_session(self):
self._session.set_stop_track_clip_value(AMBER_BLINK)
for scene_index in range(self._matrix.height()):
scene = self._session.scene(scene_index)
scene.set_triggered_value(GREEN_BLINK)
scene.name = 'Scene_' + str(scene_index)
for track_index in range(self._matrix.width()):
clip_slot = scene.clip_slot(track_index)
clip_slot.set_triggered_to_play_value(GREEN_BLINK)
clip_slot.set_triggered_to_record_value(RED_BLINK)
clip_slot.set_stopped_value(AMBER_FULL)
clip_slot.set_started_value(GREEN_FULL)
clip_slot.set_recording_value(RED_FULL)
clip_slot.set_record_button_value(RED_THIRD)
clip_slot.set_clip_palette(CLIP_COLOR_TABLE)
#clip_slot.set_clip_rgb_table(RGB_COLOR_TABLE)
clip_slot.name = str(track_index) + '_Clip_Slot_' + str(scene_index)
self._all_buttons.append(self._matrix.get_button(track_index, scene_index))
self._zooming.set_stopped_value(RED_FULL)
self._zooming.set_selected_value(AMBER_FULL)
self._zooming.set_playing_value(GREEN_FULL)
def _activate_navigation_buttons(self,active):
for button in self._nav_buttons:
button.set_enabled(active)
def _activate_scene_buttons(self,active):
for button in self._side_buttons:
button.set_enabled(active)
def _activate_matrix(self,active):
for scene_index in range(8):
for track_index in range(8):
self._matrix.get_button(track_index, scene_index).set_enabled(active)
def log_message(self, msg):
self._parent.log_message(msg)
#Update the channels of the buttons in the user modes..
def _update_control_channels(self):
new_channel = self.channel_for_current_mode()
for button in self._all_buttons:
button.set_channel(new_channel)
button.set_force_next_value()
示例3: OhmModesHH
# 需要导入模块: from _Framework.SessionZoomingComponent import SessionZoomingComponent [as 别名]
# 或者: from _Framework.SessionZoomingComponent.SessionZoomingComponent import set_playing_value [as 别名]
#.........这里部分代码省略.........
num_tracks = 7
num_scenes = 7 ###changed from 5 for HH
global session
session = SessionComponent(num_tracks, num_scenes)
session.name = "Session"
session.set_offsets(0, 0)
self._session = session
self._scene = [None for index in range(num_scenes)]
for row in range(num_scenes):
self._scene[row] = session.scene(row)
self._scene[row].name = 'Scene_' + str(row)
for column in range(num_tracks):
clip_slot = self._scene[row].clip_slot(column)
clip_slot.name = str(column) + '_Clip_Slot_' + str(row)
session.set_mixer(mixer)
self._session_zoom = SessionZoomingComponent(session)
self._session_zoom.name = 'Session_Overview'
#self._session_zoom.set_enabled(False)
self.set_highlighting_session_component(self._session)
def _assign_session_colors(self):
num_tracks = 7
num_scenes = 7
self._session.set_stop_clip_value(STOP_CLIP_COLOR[self._rgb])
for row in range(num_scenes):
for column in range(num_tracks):
self._scene[row].clip_slot(column).set_triggered_to_play_value(CLIP_TRIGD_TO_PLAY_COLOR[self._rgb])
self._scene[row].clip_slot(column).set_triggered_to_record_value(CLIP_TRIGD_TO_RECORD_COLOR[self._rgb])
self._scene[row].clip_slot(column).set_stopped_value(CLIP_STOPPED_COLOR[self._rgb])
self._scene[row].clip_slot(column).set_started_value(CLIP_STARTED_COLOR[self._rgb])
self._scene[row].clip_slot(column).set_recording_value(CLIP_RECORDING_COLOR[self._rgb])
self._session_zoom.set_stopped_value(ZOOM_STOPPED_COLOR[self._rgb])
self._session_zoom.set_playing_value(ZOOM_PLAYING_COLOR[self._rgb])
self._session_zoom.set_selected_value(ZOOM_SELECTED_COLOR[self._rgb])
def _setup_device_control(self):
self._device = DeviceComponent()
self._device.name = 'Device_Component'
self.set_device_component(self._device)
self._device_navigator = DetailViewControllerComponent()
self._device_navigator.name = 'Device_Navigator'
self._device_selection_follows_track_selection = FOLLOW
def device_follows_track(self, val):
self._device_selection_follows_track_selection = (val == 1)
return self
def _setup_crossfader(self):
self._mixer.set_crossfader_control(self._crossfader)
def _setup_scene_selector(self):
for index in range(5):
self._menu[index].add_value_listener(self._select_new_scene, True)
def set_bank(self, val):
self._scene_bank = int(val)
self._monobridge._send('bank', self._scene_bank)
self._display_bank()
def _select_mode(self, value):
self.log_message('select mode update' + str(value))
示例4: code
# 需要导入模块: from _Framework.SessionZoomingComponent import SessionZoomingComponent [as 别名]
# 或者: from _Framework.SessionZoomingComponent.SessionZoomingComponent import set_playing_value [as 别名]
#.........这里部分代码省略.........
mixer.track_filter(index).name = 'Mixer_Filter_' + str(index) #added by a
mixer.channel_strip(index)._invert_mute_feedback = True
#mixer.channel_strip(index).set_select_button(ButtonElement(is_momentary, MIDI_NOTE_TYPE, CH, track_select_notes[index]))
self.song().view.selected_track = mixer.channel_strip(0)._track #set the selected strip to the first track, so that we don't, for example, try to assign a button to arm the master track, which would cause an assertion error
""" Technically, we aren't using the session control, but I'm going to set it up in case inter-script communication needs it"""
def _setup_session_control(self):
is_momentary = True
num_tracks = COLS
num_scenes = ROWS
global session
session = SessionComponent(num_tracks, num_scenes)
session.name = "Session"
session.set_offsets(0, 0)
self._session = session
self._session.set_stop_track_clip_value(0)
self._scene = [None for index in range(ROWS)]
for row in range(num_scenes):
self._scene[row] = session.scene(row)
self._scene[row].name = 'Scene_' + str(row)
for column in range(num_tracks):
clip_slot = self._scene[row].clip_slot(column)
clip_slot.name = str(column) + '_Clip_Slot_' + str(row)
clip_slot.set_triggered_to_play_value(64)
clip_slot.set_triggered_to_record_value(64)
clip_slot.set_stopped_value(0)
clip_slot.set_started_value(64)
clip_slot.set_recording_value(64)
#clip_slot.set_launch_button(self._grid[column][row]) #comment out if you don't want clip launch
session.set_mixer(mixer)
self._session_zoom = SessionZoomingComponent(session)
self._session_zoom.name = 'Session_Overview'
self._session_zoom.set_stopped_value(0)
self._session_zoom.set_playing_value(64)
self._session_zoom.set_selected_value(64)
if STANDALONE is True:
self.set_highlighting_session_component(self._session)
self._session.set_track_bank_buttons(self._grid[5][3], self._grid[4][3]) #comment out when using with Griid
self._session.set_scene_bank_buttons(self._grid[7][3], self._grid[6][3]) # comment out when using with Griid
"""this is where we take care of setting up the the multiple devices per page, we will need 4"""
def _setup_device_controls(self):
self._device = [None for index in range(4)]
for index in range(ROWS):
self._device[index] = DeviceComponent()
self._device[index].name = 'Device_Component_' + str(index)
#self.set_device_component(self._device) #this doesn't work anymore, because we have multiple devices for the controller....we'll have to get fancy here, but that's for later
#self._device_navigator = DetailViewControllerComponent() #its unclear if we'll need this....how is device navigation (i.e. banking for device parameter banks) going to be handled by the script?
#self._device_navigator.name = 'Device_Navigator'
device_param_controls = []
for control in range(COLS):
"""this setups up 8 device parameters per row"""
#dial_index = control + (index*COLS)
"""alternatively, this setus up device controls in 4 4x2 groups"""
dial_index = device_encoders[control + (index*COLS)]
device_param_controls.append(self._dial[dial_index])
self._device[index].set_parameter_controls(tuple(device_param_controls))
"""this is where we deassign every control that will be changing function when we switch modes...best to just deassign them all, and reassign them on update"""
def deassign_matrix(self):
for index in range(DIALCOUNT): #this should totally work!!! I'm over appealing to Python's sadistic mannerisms right now....
self._dial[index].send_value(0, True) ##this is kind of a hack, and should be unnecessary; the bool at the end tells the send_value method to force the value out to the controller
示例5: LemurPad
# 需要导入模块: from _Framework.SessionZoomingComponent import SessionZoomingComponent [as 别名]
# 或者: from _Framework.SessionZoomingComponent.SessionZoomingComponent import set_playing_value [as 别名]
#.........这里部分代码省略.........
self._pedal = [None for index in range(8)]
if self._use_pedal is True:
for index in range(8):
self._pedal[index] = EncoderElement(MIDI_CC_TYPE, 0, 25+index, Live.MidiMap.MapMode.absolute)
self._pedal[index].name = 'Pedal_'+str(index)
self._pedal[index]._report = False
def _setup_session_control(self):
is_momentary = True
num_tracks = 4
num_scenes = 5
self._session = NameServerSessionComponent(num_tracks, num_scenes, self)
self._session.name = "Left_Session"
self._session.set_offsets(0, 0)
self._session.set_stop_clip_value(self._color_defs['STOP_CLIP'])
self._scene = [None for index in range(5)]
for row in range(num_scenes):
self._scene[row] = self._session.scene(row)
self._scene[row].name = 'L_Scene_' + str(row)
for column in range(num_tracks):
clip_slot = self._scene[row].clip_slot(column)
clip_slot.name = str(column) + '_Clip_Slot_L_' + str(row)
clip_slot.set_triggered_to_play_value(self._color_defs['CLIP_TRG_PLAY'])
clip_slot.set_triggered_to_record_value(self._color_defs['CLIP_TRG_REC'])
clip_slot.set_stopped_value(self._color_defs['CLIP_STOP'])
clip_slot.set_started_value(self._color_defs['CLIP_STARTED'])
clip_slot.set_recording_value(self._color_defs['CLIP_RECORDING'])
self._session.set_mixer(self._mixer)
self._session_zoom = SessionZoomingComponent(self._session)
self._session_zoom.name = 'L_Session_Overview'
self._session_zoom.set_stopped_value(self._color_defs['ZOOM_STOPPED'])
self._session_zoom.set_playing_value(self._color_defs['ZOOM_PLAYING'])
self._session_zoom.set_selected_value(self._color_defs['ZOOM_SELECTED'])
self._session_zoom._zoom_button = (self._dummy_button)
self._session_zoom.set_enabled(True)
self._session2 = SessionComponent(num_tracks, num_scenes)
self._session2.name = 'Right_Session'
self._session2.set_offsets(4, 0)
self._session2.set_stop_clip_value(self._color_defs['STOP_CLIP'])
self._scene2 = [None for index in range(5)]
for row in range(num_scenes):
self._scene2[row] = self._session2.scene(row)
self._scene2[row].name = 'R_Scene_' + str(row)
for column in range(num_tracks):
clip_slot = self._scene2[row].clip_slot(column)
clip_slot.name = str(column) + '_Clip_Slot_R_' + str(row)
clip_slot.set_triggered_to_play_value(self._color_defs['CLIP_TRG_PLAY'])
clip_slot.set_triggered_to_record_value(self._color_defs['CLIP_TRG_REC'])
clip_slot.set_stopped_value(self._color_defs['CLIP_STOP'])
clip_slot.set_started_value(self._color_defs['CLIP_STARTED'])
clip_slot.set_recording_value(self._color_defs['CLIP_RECORDING'])
self._session2.set_mixer(self._mixer2)
self._session2.add_offset_listener(self._on_session_offset_changes)
self._session_zoom2 = SessionZoomingComponent(self._session2)
self._session_zoom2.name = 'R_Session_Overview'
self._session_zoom2.set_stopped_value(self._color_defs['ZOOM_STOPPED'])
self._session_zoom2.set_playing_value(self._color_defs['ZOOM_PLAYING'])
self._session_zoom2.set_selected_value(self._color_defs['ZOOM_SELECTED'])
self._session_zoom.set_enabled(True)
self._session_zoom2._zoom_button = (self._dummy_button2)
self._session_main = SessionComponent(8, num_scenes)
self._session_main.name = 'Main_Session'
self._session_main.set_stop_clip_value(self._color_defs['STOP_CLIP'])
self._scene_main = [None for index in range(5)]
示例6: MainSelectorComponent
# 需要导入模块: from _Framework.SessionZoomingComponent import SessionZoomingComponent [as 别名]
# 或者: from _Framework.SessionZoomingComponent.SessionZoomingComponent import set_playing_value [as 别名]
#.........这里部分代码省略.........
def _setup_session(self, as_active, as_enabled):
assert isinstance(as_active, type(False))
for button in self._nav_buttons:
if as_enabled:
button.set_on_off_values(GREEN_FULL, GREEN_THIRD)
else:
button.set_on_off_values(127, LED_OFF)
for scene_index in range(8):
scene = self._session.scene(scene_index)
if as_active:
scene_button = self._side_buttons[scene_index]
scene_button.set_on_off_values(127, LED_OFF)
scene.set_launch_button(scene_button)
else:
scene.set_launch_button(None)
for track_index in range(8):
if as_active:
button = self._matrix.get_button(track_index, scene_index)
button.set_on_off_values(127, LED_OFF)
scene.clip_slot(track_index).set_launch_button(button)
else:
scene.clip_slot(track_index).set_launch_button(None)
if as_active:
self._zooming.set_zoom_button(self._modes_buttons[0])
self._zooming.set_button_matrix(self._matrix)
self._zooming.set_scene_bank_buttons(self._side_buttons)
self._zooming.set_nav_buttons(self._nav_buttons[0], self._nav_buttons[1], self._nav_buttons[2], self._nav_buttons[3])
self._zooming.update()
else:
self._zooming.set_zoom_button(None)
self._zooming.set_button_matrix(None)
self._zooming.set_scene_bank_buttons(None)
self._zooming.set_nav_buttons(None, None, None, None)
if as_enabled:
self._session.set_track_bank_buttons(self._nav_buttons[3], self._nav_buttons[2])
self._session.set_scene_bank_buttons(self._nav_buttons[1], self._nav_buttons[0])
self._session.set_show_highlight(True)
else:
self._session.set_track_bank_buttons(None, None)
self._session.set_scene_bank_buttons(None, None)
self._session.set_show_highlight(False)
def _setup_mixer(self, as_active):
assert isinstance(as_active, type(False))
self._sub_modes.set_enabled(as_active)
def _setup_user(self, release_buttons):
for scene_index in range(8):
scene_button = self._side_buttons[scene_index]
scene_button.set_on_off_values(127, LED_OFF)
scene_button.turn_off()
scene_button.set_enabled((not release_buttons))
for track_index in range(8):
button = self._matrix.get_button(track_index, scene_index)
button.set_on_off_values(127, LED_OFF)
button.turn_off()
button.set_enabled((not release_buttons))
for button in self._nav_buttons:
button.set_on_off_values(127, LED_OFF)
button.turn_off()
button.set_enabled((not release_buttons))
self._config_button.send_value(32)
if release_buttons:
self._config_button.send_value(2)
def _init_session(self):
self._session.set_stop_track_clip_value(AMBER_BLINK)
for scene_index in range(self._matrix.height()):
scene = self._session.scene(scene_index)
scene.set_triggered_value(GREEN_BLINK)
for track_index in range(self._matrix.width()):
clip_slot = scene.clip_slot(track_index)
clip_slot.set_triggered_to_play_value(GREEN_BLINK)
clip_slot.set_triggered_to_record_value(RED_BLINK)
clip_slot.set_stopped_value(AMBER_FULL)
clip_slot.set_started_value(GREEN_FULL)
clip_slot.set_recording_value(RED_FULL)
self._all_buttons.append(self._matrix.get_button(track_index, scene_index))
self._zooming.set_stopped_value(RED_FULL)
self._zooming.set_selected_value(AMBER_FULL)
self._zooming.set_playing_value(GREEN_FULL)
示例7: MainSelectorComponent
# 需要导入模块: from _Framework.SessionZoomingComponent import SessionZoomingComponent [as 别名]
# 或者: from _Framework.SessionZoomingComponent.SessionZoomingComponent import set_playing_value [as 别名]
#.........这里部分代码省略.........
scene.set_launch_button(scene_button)
else:
scene.set_launch_button(None)
for track_index in range(8):
if as_active:
button = self._matrix.get_button(track_index, scene_index)
button.set_on_off_values(127, LED_OFF)
scene.clip_slot(track_index).set_launch_button(button)
else:
scene.clip_slot(track_index).set_launch_button(None)
if as_active:
self._zooming.set_zoom_button(self._modes_buttons[0])
self._zooming.set_button_matrix(self._matrix)
self._zooming.set_scene_bank_buttons(self._side_buttons)
self._zooming.set_nav_buttons(
self._nav_buttons[0], self._nav_buttons[1], self._nav_buttons[2], self._nav_buttons[3]
)
self._zooming.update()
else:
self._zooming.set_zoom_button(None)
self._zooming.set_button_matrix(None)
self._zooming.set_scene_bank_buttons(None)
self._zooming.set_nav_buttons(None, None, None, None)
if as_enabled:
self._session.set_track_bank_buttons(self._nav_buttons[3], self._nav_buttons[2])
self._session.set_scene_bank_buttons(self._nav_buttons[1], self._nav_buttons[0])
# self._session.set_show_highlight(True) #Needs to be replaced with L9 equivalent
else:
self._session.set_track_bank_buttons(None, None)
self._session.set_scene_bank_buttons(None, None)
# self._session.set_show_highlight(False) #Needs to be replaced with L9 equivalent
def _setup_mixer(self, as_active):
assert isinstance(as_active, type(False))
as_active and self._sub_modes.is_enabled() and self._sub_modes.set_mode(-1)
self._sub_modes.set_enabled(as_active)
def _setup_user(self, release_buttons):
for scene_index in range(8):
scene_button = self._side_buttons[scene_index]
scene_button.set_on_off_values(127, LED_OFF)
scene_button.turn_off()
scene_button.set_enabled(not release_buttons)
for track_index in range(8):
button = self._matrix.get_button(track_index, scene_index)
button.set_on_off_values(127, LED_OFF)
button.turn_off()
button.set_enabled(not release_buttons)
for button in self._nav_buttons:
button.set_on_off_values(127, LED_OFF)
button.turn_off()
button.set_enabled(not release_buttons)
if release_buttons:
self._config_button.send_value(2)
self._config_button.send_value(32, force=True)
def _init_session(self):
self._session.set_stop_track_clip_value(AMBER_BLINK)
for scene_index in range(self._matrix.height()):
scene = self._session.scene(scene_index)
scene.set_triggered_value(GREEN_BLINK)
scene.name = "Scene_" + str(scene_index)
for track_index in range(self._matrix.width()):
clip_slot = scene.clip_slot(track_index)
clip_slot.set_triggered_to_play_value(GREEN_BLINK)
clip_slot.set_triggered_to_record_value(RED_BLINK)
clip_slot.set_stopped_value(AMBER_FULL)
clip_slot.set_started_value(GREEN_FULL)
clip_slot.set_recording_value(RED_FULL)
clip_slot.name = str(track_index) + "_Clip_Slot_" + str(scene_index)
self._all_buttons.append(self._matrix.get_button(track_index, scene_index))
self._zooming.set_stopped_value(RED_FULL)
self._zooming.set_selected_value(AMBER_FULL)
self._zooming.set_playing_value(GREEN_FULL)
"""Mono Overrides and Additions"""
def _mode_value(self, value, sender):
assert len(self._modes_buttons) > 0
assert isinstance(value, int)
assert isinstance(sender, ButtonElement)
assert self._modes_buttons.count(sender) == 1
if self._script._host.is_enabled() != True:
if (value is not 0) or (not sender.is_momentary()):
if ((self._modes_buttons[1]._last_received_value > 0) and (self._modes_buttons.index(sender) == 2)) or (
(self._modes_buttons[2]._last_received_value > 0) and (self._modes_buttons.index(sender) == 1)
):
if self._script._host._active_client != None:
self.set_mode(4)
else:
self._script.show_message("Monomodular Script not inserted")
else:
self.set_mode(self._modes_buttons.index(sender))
else:
if self._modes_buttons.index(sender) == 3 and value > 0:
self.set_mode(0)
示例8: MainSelectorComponent
# 需要导入模块: from _Framework.SessionZoomingComponent import SessionZoomingComponent [as 别名]
# 或者: from _Framework.SessionZoomingComponent.SessionZoomingComponent import set_playing_value [as 别名]
#.........这里部分代码省略.........
else:
raise False or AssertionError
self._session.set_allow_update(True)
self._zooming.set_allow_update(True)
self._update_control_channels()
def _update_control_channels(self):
new_channel = self.channel_for_current_mode()
for button in self._all_buttons:
button.set_channel(new_channel)
button.set_force_next_value()
def _setup_session(self, as_active, as_enabled):
if not isinstance(as_active, type(False)):
raise AssertionError
for button in self._nav_buttons:
if as_enabled:
button.set_on_off_values(GREEN_FULL, GREEN_THIRD)
else:
button.set_on_off_values(127, LED_OFF)
for scene_index in range(8):
scene = self._session.scene(scene_index)
if as_active:
scene_button = self._side_buttons[scene_index]
scene_button.set_on_off_values(127, LED_OFF)
scene.set_launch_button(scene_button)
else:
scene.set_launch_button(None)
for track_index in range(8):
if as_active:
button = self._matrix.get_button(track_index, scene_index)
button.set_on_off_values(127, LED_OFF)
scene.clip_slot(track_index).set_launch_button(button)
else:
scene.clip_slot(track_index).set_launch_button(None)
if as_active:
self._zooming.set_zoom_button(self._modes_buttons[0])
self._zooming.set_button_matrix(self._matrix)
self._zooming.set_scene_bank_buttons(self._side_buttons)
self._zooming.set_nav_buttons(self._nav_buttons[0], self._nav_buttons[1], self._nav_buttons[2], self._nav_buttons[3])
self._zooming.update()
else:
self._zooming.set_zoom_button(None)
self._zooming.set_button_matrix(None)
self._zooming.set_scene_bank_buttons(None)
self._zooming.set_nav_buttons(None, None, None, None)
as_enabled and self._session.set_track_bank_buttons(self._nav_buttons[3], self._nav_buttons[2])
self._session.set_scene_bank_buttons(self._nav_buttons[1], self._nav_buttons[0])
else:
self._session.set_track_bank_buttons(None, None)
self._session.set_scene_bank_buttons(None, None)
def _setup_mixer(self, as_active):
if not isinstance(as_active, type(False)):
raise AssertionError
as_active and self._sub_modes.is_enabled() and self._sub_modes.set_mode(-1)
self._sub_modes.set_enabled(as_active)
def _setup_user(self, release_buttons):
for scene_index in range(8):
scene_button = self._side_buttons[scene_index]
scene_button.set_on_off_values(127, LED_OFF)
scene_button.turn_off()
scene_button.set_enabled(not release_buttons)
for track_index in range(8):
button = self._matrix.get_button(track_index, scene_index)
button.set_on_off_values(127, LED_OFF)
button.turn_off()
button.set_enabled(not release_buttons)
for button in self._nav_buttons:
button.set_on_off_values(127, LED_OFF)
button.turn_off()
button.set_enabled(not release_buttons)
if release_buttons:
self._config_button.send_value(2)
self._config_button.send_value(32, force_send=True)
def _init_session(self):
self._session.set_stop_track_clip_value(AMBER_BLINK)
for scene_index in range(self._matrix.height()):
scene = self._session.scene(scene_index)
scene.set_triggered_value(GREEN_BLINK)
scene.name = 'Scene_' + str(scene_index)
for track_index in range(self._matrix.width()):
clip_slot = scene.clip_slot(track_index)
clip_slot.set_triggered_to_play_value(GREEN_BLINK)
clip_slot.set_triggered_to_record_value(RED_BLINK)
clip_slot.set_stopped_value(AMBER_FULL)
clip_slot.set_started_value(GREEN_FULL)
clip_slot.set_recording_value(RED_FULL)
clip_slot.name = str(track_index) + '_Clip_Slot_' + str(scene_index)
self._all_buttons.append(self._matrix.get_button(track_index, scene_index))
self._zooming.set_stopped_value(RED_FULL)
self._zooming.set_selected_value(AMBER_FULL)
self._zooming.set_playing_value(GREEN_FULL)
示例9: OhmModes
# 需要导入模块: from _Framework.SessionZoomingComponent import SessionZoomingComponent [as 别名]
# 或者: from _Framework.SessionZoomingComponent.SessionZoomingComponent import set_playing_value [as 别名]
#.........这里部分代码省略.........
num_scenes = 5
session = SessionComponent(num_tracks, num_scenes)
session.name = 'Session'
self._session = session
session.set_offsets(0, 0)
self._scene = [ None for index in range(6) ]
for row in range(num_scenes):
self._scene[row] = session.scene(row)
self._scene[row].name = 'Scene_' + str(row)
for column in range(num_tracks):
clip_slot = self._scene[row].clip_slot(column)
clip_slot.name = str(column) + '_Clip_Slot_' + str(row)
session.set_mixer(self._mixer)
session.set_show_highlight(True)
self._session_zoom = SessionZoomingComponent(session)
self._session_zoom.name = 'Session_Overview'
self.set_highlighting_session_component(self._session)
def _assign_session_colors(self):
self.log_message('assign session colors')
num_tracks = 7
num_scenes = 5
self._session.set_stop_track_clip_value(STOP_CLIP_COLOR[self._rgb])
for row in range(num_scenes):
for column in range(num_tracks):
self._scene[row].clip_slot(column).set_triggered_to_play_value(CLIP_TRIGD_TO_PLAY_COLOR[self._rgb])
self._scene[row].clip_slot(column).set_triggered_to_record_value(CLIP_TRIGD_TO_RECORD_COLOR[self._rgb])
self._scene[row].clip_slot(column).set_stopped_value(CLIP_STOPPED_COLOR[self._rgb])
self._scene[row].clip_slot(column).set_started_value(CLIP_STARTED_COLOR[self._rgb])
self._scene[row].clip_slot(column).set_recording_value(CLIP_RECORDING_COLOR[self._rgb])
self._session_zoom.set_stopped_value(ZOOM_STOPPED_COLOR[self._rgb])
self._session_zoom.set_playing_value(ZOOM_PLAYING_COLOR[self._rgb])
self._session_zoom.set_selected_value(ZOOM_SELECTED_COLOR[self._rgb])
for row in range(8):
for column in range(8):
self._grid[column][row].set_force_next_value()
self._session.on_scene_list_changed()
self._shift_mode.update()
def _setup_device_control(self):
self._device = DeviceComponent()
self._device.name = 'Device_Component'
self.set_device_component(self._device)
self._device_navigator = DetailViewControllerComponent()
self._device_navigator.name = 'Device_Navigator'
self._device_selection_follows_track_selection = FOLLOW
def device_follows_track(self, val):
self._device_selection_follows_track_selection = val == 1
return self
def _setup_crossfader(self):
self._mixer.set_crossfader_control(self._crossfader)
def disconnect(self):
"""clean things up on disconnect"""
self.song().view.remove_selected_track_listener(self._update_selected_device)
self.log_message(time.strftime('%d.%m.%Y %H:%M:%S', time.localtime()) + '--------------= OhmModes log closed =--------------')
ControlSurface.disconnect(self)
def _get_num_tracks(self):
return self.num_tracks
示例10: OhmModes
# 需要导入模块: from _Framework.SessionZoomingComponent import SessionZoomingComponent [as 别名]
# 或者: from _Framework.SessionZoomingComponent.SessionZoomingComponent import set_playing_value [as 别名]
#.........这里部分代码省略.........
def _setup_session_control(self):
is_momentary = True
num_tracks = 7
num_scenes = 5
global session
session = SessionComponent(num_tracks, num_scenes)
session.name = "Session"
self._session = session
session.set_offsets(0, 0)
self._scene = [None for index in range(6)]
for row in range(num_scenes):
self._scene[row] = session.scene(row)
self._scene[row].name = 'Scene_' + str(row)
for column in range(num_tracks):
clip_slot = self._scene[row].clip_slot(column)
clip_slot.name = str(column) + '_Clip_Slot_' + str(row)
session.set_mixer(self._mixer)
self._session_zoom = SessionZoomingComponent(session)
self._session_zoom.name = 'Session_Overview'
def _assign_session_colors(self):
num_tracks = 7
num_scenes = 5
self._session.set_stop_track_clip_value(STOP_CLIP_COLOR[self._rgb])
for row in range(num_scenes):
for column in range(num_tracks):
self._scene[row].clip_slot(column).set_triggered_to_play_value(CLIP_TRIGD_TO_PLAY_COLOR[self._rgb])
self._scene[row].clip_slot(column).set_triggered_to_record_value(CLIP_TRIGD_TO_RECORD_COLOR[self._rgb])
self._scene[row].clip_slot(column).set_stopped_value(CLIP_STOPPED_COLOR[self._rgb])
self._scene[row].clip_slot(column).set_started_value(CLIP_STARTED_COLOR[self._rgb])
self._scene[row].clip_slot(column).set_recording_value(CLIP_RECORDING_COLOR[self._rgb])
self._session_zoom.set_stopped_value(ZOOM_STOPPED_COLOR[self._rgb])
self._session_zoom.set_playing_value(ZOOM_PLAYING_COLOR[self._rgb])
self._session_zoom.set_selected_value(ZOOM_SELECTED_COLOR[self._rgb])
def _setup_device_control(self):
self._device = DeviceComponent()
self._device.name = 'Device_Component'
self.set_device_component(self._device)
self._device_navigator = DetailViewControllerComponent()
self._device_navigator.name = 'Device_Navigator'
self._device_selection_follows_track_selection = FOLLOW
def device_follows_track(self, val):
self._device_selection_follows_track_selection = (val == 1)
return self
def _setup_crossfader(self):
self._mixer.set_crossfader_control(self._crossfader)
def disconnect(self):
"""clean things up on disconnect"""
self.song().view.remove_selected_track_listener(self._update_selected_device)
self.log_message(time.strftime("%d.%m.%Y %H:%M:%S", time.localtime()) + "--------------= OhmModes log closed =--------------") #Create entry in log file
ControlSurface.disconnect(self)
return None
def _get_num_tracks(self):
return self.num_tracks
示例11: Tweaker
# 需要导入模块: from _Framework.SessionZoomingComponent import SessionZoomingComponent [as 别名]
# 或者: from _Framework.SessionZoomingComponent.SessionZoomingComponent import set_playing_value [as 别名]
#.........这里部分代码省略.........
#self._mixer._reassign_tracks()
def _setup_session_control(self):
is_momentary = True
num_tracks = NUM_TRACKS
num_scenes = NUM_SCENES
self._session = SessionComponent(num_tracks, num_scenes)
self._session.name = "Session"
self._session.set_offsets(0, 0)
self._session.set_stop_track_clip_value(STOP_CLIP)
self._scene = [None for index in range(3)]
for row in range(num_scenes):
self._scene[row] = self._session.scene(row)
self._scene[row].name = 'Scene_' + str(row)
for column in range(num_tracks):
clip_slot = self._scene[row].clip_slot(column)
clip_slot.name = str(column) + '_Clip_Slot_' + str(row)
clip_slot.set_triggered_to_play_value(CLIP_TRG_PLAY)
clip_slot.set_triggered_to_record_value(CLIP_TRG_REC)
clip_slot.set_stopped_value(CLIP_STOP)
clip_slot.set_started_value(CLIP_STARTED)
clip_slot.set_recording_value(CLIP_RECORDING)
self._session._stop_track_value = self._session_stop_track_value(self._session)
self._session._on_fired_slot_index_changed = self._session_on_fired_slot_index_changed(self._session)
self._session._change_offsets = self._session_change_offsets(self._session)
self._session.update = self._session_update(self._session)
#self._session.add_offset_listener(self._update_navigation_view)
self._session.set_mixer(self._mixer)
self.set_highlighting_session_component(self._session)
self._session_zoom = SessionZoomingComponent(self._session)
self._session_zoom.name = 'Session_Overview'
self._session_zoom.set_stopped_value(ZOOM_STOPPED)
self._session_zoom.set_playing_value(ZOOM_PLAYING)
self._session_zoom.set_selected_value(ZOOM_SELECTED)
#self._session_zoom.set_enabled(True)
def _setup_device_control(self):
self._device = [None for index in range(2)]
for index in range(2):
self._device[index] = DeviceComponent()
self._device[index].name = 'Device_Component_'+str(index)
self._device[index].set_enabled(True)
self._device[index]._number_of_parameter_banks = self._device_number_of_parameter_banks(self._device[index])
self._device[index]._assign_parameters = self._device_assign_parameters(self._device[index])
self._device[index]._device_banks = DEVICE_DICT
self._device[index]._device_best_banks = DEVICE_BOB_DICT
self._device[index]._device_bank_names = BANK_NAME_DICT
def _setup_crossfader(self):
self._mixer.set_crossfader_control(self._crossfader)
def _setup_modes(self):
self._pad_offset = PadOffsetComponent(self)
self._pad_offset._set_protected_mode_index(0)
self._pad_offset.set_enabled(False)
def _setup_pads(self):
for pad in self._pad_pressure:
pad.add_value_listener(self._light_pad, True)
示例12: AumTroll_G
# 需要导入模块: from _Framework.SessionZoomingComponent import SessionZoomingComponent [as 别名]
# 或者: from _Framework.SessionZoomingComponent.SessionZoomingComponent import set_playing_value [as 别名]
class AumTroll_G(AumTroll):
def __init__(self, *a, **k):
super(AumTroll_G, self).__init__(*a, **k)
with self.component_guard():
self._setup_session_recording_component()
self._setup_APC_detail_component()
self.log_message('Aumtroll G 4')
def _setup_session_recording_component(self):
self._recorder = SessionRecordingComponent(ClipCreator(), ViewControlComponent())
def _setup_APC_detail_component(self):
self._alt_device_navigator = DetailViewCntrlComponent()
"""the mixer component corresponds and moves with our selection in Live, and allows us to assign physical controls"""
"""to Live's mixer functions without having to make all the links ourselves"""
def _setup_mixer_control(self):
is_momentary = True
self._num_tracks = (8) #A mixer is one-dimensional;
self._mixer = MixerComponent(8, 2, True, False) #These values represent the (Number_of_tracks, Number_of_returns, EQ_component, Filter_component)
self._mixer.name = 'Mixer' #We name everything that we might want to access in m4l
self._mixer.set_track_offset(0) #Sets start point for mixer strip (offset from left)
for index in range(8):
#self._mixer.channel_strip(index).set_volume_control(self._fader[index]) #Since we gave our mixer 4 tracks above, we'll now assign our fader controls to it
self._mixer.channel_strip(index).name = 'Mixer_ChannelStrip_' + str(index) #We also name the individual channel_strip so we can access it
self._mixer.track_eq(index).name = 'Mixer_EQ_' + str(index) #We also name the individual EQ_component so we can access it
self._mixer.channel_strip(index)._invert_mute_feedback = True #This makes it so that when a track is muted, the corresponding button is turned off
self.song().view.selected_track = self._mixer.channel_strip(0)._track #set the selected strip to the first track, so that we don't, for example, try to assign a button to arm the master track, which would cause an assertion error
self._send_reset = ResetSendsComponent(self) #This creates a custom MonoComponent that allows us to reset all the sends on a track to zero with a single button
self._send_reset.name = 'Sends_Reset' #We name it so that we can access it from m4l
"""the session component represents a grid of buttons that can be used to fire, stop, and navigate clips in the session view"""
def _setup_session_control(self):
is_momentary = True
num_tracks = 8 #we are working with a 4x4 grid,
num_scenes = 4 #so the height and width are both set to 4
self._session = SessionComponent(num_tracks, num_scenes) #we create our SessionComponent with the variables we set above it
self._session.name = "Session" #we name it so we can access it in m4l
self._session.set_offsets(0, 0) #we set the initial offset to the far left, top of the session grid
self._session._track_banking_increment = 4
self._session.set_stop_clip_value(STOP_CLIP[self._rgb]) #we assign the colors that will be displayed when the stop_clip button is pressed. This value comes from CNTRLR_Map.py, which is imported in the header of our script
self._scene = [None for index in range(4)] #we create an array to hold the Scene subcomponents so that we can get to them if we need them.
for row in range(num_scenes): #now we'll fill the array with different objects that were created when we called the SessionComponent() module
self._scene[row] = self._session.scene(row) #each session row is a SceneComponent
self._scene[row].name = 'Scene_' + str(row) #name it so we can access it in m4l
for column in range(num_tracks): #now we'll create holders and names for the contents of each scene
clip_slot = self._scene[row].clip_slot(column) #we use our assignment of the scene above to gain access to the individual clipslots. Here, we are just assigning 'clip_slot' each time as a local variable so we can manipulated it's properties
clip_slot.name = str(column) + '_Clip_Slot' + str(row) #name it so that we can acces it in m4l
clip_slot.set_triggered_to_play_value(CLIP_TRG_PLAY[self._rgb]) #set its triggered to play color
clip_slot.set_triggered_to_record_value(CLIP_TRG_REC[self._rgb])#set its triggered to record color
clip_slot.set_stopped_value(CLIP_STOP[self._rgb]) #set its stop color
clip_slot.set_started_value(CLIP_STARTED[self._rgb]) #set its started color
clip_slot.set_recording_value(CLIP_RECORDING[self._rgb]) #set its recording value
self._session.set_mixer(self._mixer) #now we link the MixerComponent we created in _setup_mixer_control() to our session component so that they will follow each other when either is navigated
self.set_highlighting_session_component(self._session)
self._session_zoom = SessionZoomingComponent(self._session) #this creates the ZoomingComponent that allows navigation when the shift button is pressed
self._session_zoom.name = 'Session_Overview' #name it so we can access it in m4l
self._session_zoom.set_stopped_value(ZOOM_STOPPED[self._rgb]) #set the zooms stopped color
self._session_zoom.set_playing_value(ZOOM_PLAYING[self._rgb]) #set the zooms playing color
self._session_zoom.set_selected_value(ZOOM_SELECTED[self._rgb]) #set the zooms selected color
self._session_zoom.set_button_matrix(self._matrix) #assign the ButtonMatrixElement that we created in _setup_controls() to the zooming component so that we can control it
self._session_zoom.set_zoom_button(self._button[31]) #assign a shift button so that we can switch states between the SessionComponent and the SessionZoomingComponent
"""this section is used so that we can reassign the color properties of each state. Legacy, from the OhmModes script, to support either RGB or Monochrome"""
def _assign_session_colors(self):
num_tracks = 8
num_scenes = 4
self._session.set_stop_clip_value(STOP_ALL[self._rgb])
for row in range(num_scenes):
for column in range(num_tracks):
self._scene[row].clip_slot(column).set_triggered_to_play_value(CLIP_TRG_PLAY[self._rgb])
self._scene[row].clip_slot(column).set_triggered_to_record_value(CLIP_TRG_REC[self._rgb])
self._scene[row].clip_slot(column).set_stopped_value(CLIP_STOP[self._rgb])
self._scene[row].clip_slot(column).set_started_value(CLIP_STARTED[self._rgb])
self._scene[row].clip_slot(column).set_recording_value(CLIP_RECORDING[self._rgb])
self._session_zoom.set_stopped_value(ZOOM_STOPPED[self._rgb])
self._session_zoom.set_playing_value(ZOOM_PLAYING[self._rgb])
self._session_zoom.set_selected_value(ZOOM_SELECTED[self._rgb])
self.refresh_state()
def deassign_live_controls(self, *a, **k):
for index in range(4):
self._encoder[index].send_value(0, True)
self._encoder[index].clear_send_cache()
self._mixer.channel_strip(index+4).set_volume_control(None) #Since we gave our mixer 4 tracks above, we'll now assign our fader controls to it #for the left side of the mixer
self._mixer.channel_strip(index+4).set_solo_button(None) #remove the solo button assignments
self._mixer.channel_strip(index+4).set_arm_button(None) #remove the arm button assignments
self._mixer.channel_strip(index+4).set_mute_button(None) #remove the mute button assignments
self._mixer.channel_strip(index+4).set_select_button(None) #remove the select button assignments
#self._alt_device_navigator.set_arrange_session_toggle_button(None)
self._alt_device_navigator.set_device_clip_toggle_button(None)
self._alt_device_navigator.set_detail_toggle_button(None)
#.........这里部分代码省略.........
示例13: MainSelectorComponent
# 需要导入模块: from _Framework.SessionZoomingComponent import SessionZoomingComponent [as 别名]
# 或者: from _Framework.SessionZoomingComponent.SessionZoomingComponent import set_playing_value [as 别名]
#.........这里部分代码省略.........
button.turn_off()
button.set_enabled((not release_nav_buttons))
if drum_rack_mode:
self._config_button.send_value(2)
self._config_button.send_value(32)
def _setup_step_sequencer(self, as_active):
if(self._stepseq!=None):
if(self._stepseq.is_enabled()!=as_active):
if as_active:
self._activate_scene_buttons(True)
self._activate_matrix(True)
self._activate_navigation_buttons(True)
self._config_button.send_value(32)
self._stepseq.set_enabled(True)
else:
self._stepseq.set_enabled(False)
def _setup_step_sequencer2(self, as_active):
if(self._stepseq2!=None):
if(self._stepseq2.is_enabled()!=as_active):
if as_active:
self._activate_scene_buttons(True)
self._activate_matrix(True)
self._activate_navigation_buttons(True)
self._config_button.send_value(32)
self._stepseq2.set_enabled(True)
else:
self._stepseq2.set_enabled(False)
def _setup_mixer(self, as_active):
assert isinstance(as_active, type(False))
if as_active:
self._activate_navigation_buttons(True)
self._activate_scene_buttons(True)
self._activate_matrix(True)
if(self._sub_modes.is_enabled()):
#go back to default mode
self._sub_modes.set_mode(-1)
self._sub_modes.set_enabled(as_active)
def _init_session(self):
if self._parent._live_major_version >= 9 and self._parent._live_minor_version >= 1 and self._parent._live_bugfix_version >= 2:
#api changed in 9.1.2
self._session.set_stop_clip_value(AMBER_THIRD)
self._session.set_stop_clip_triggered_value(AMBER_BLINK)
else:
# api for 9.1.1 below
self._session.set_stop_track_clip_value(AMBER_BLINK)
for scene_index in range(self._matrix.height()):
scene = self._session.scene(scene_index)
scene.set_triggered_value(GREEN_BLINK)
scene.name = 'Scene_' + str(scene_index)
for track_index in range(self._matrix.width()):
clip_slot = scene.clip_slot(track_index)
clip_slot.set_triggered_to_play_value(GREEN_BLINK)
clip_slot.set_triggered_to_record_value(RED_BLINK)
clip_slot.set_stopped_value(AMBER_FULL)
clip_slot.set_started_value(GREEN_FULL)
clip_slot.set_recording_value(RED_FULL)
clip_slot.set_record_button_value(RED_THIRD)
#clip_slot.set_clip_palette(CLIP_COLOR_TABLE)
#clip_slot.set_clip_rgb_table(RGB_COLOR_TABLE)
clip_slot.name = str(track_index) + '_Clip_Slot_' + str(scene_index)
self._all_buttons.append(self._matrix.get_button(track_index, scene_index))
self._zooming.set_stopped_value(RED_FULL)
self._zooming.set_selected_value(AMBER_FULL)
self._zooming.set_playing_value(GREEN_FULL)
def _activate_navigation_buttons(self,active):
for button in self._nav_buttons:
button.set_enabled(active)
def _activate_scene_buttons(self,active):
for button in self._side_buttons:
button.set_enabled(active)
def _activate_matrix(self,active):
for scene_index in range(8):
for track_index in range(8):
self._matrix.get_button(track_index, scene_index).set_enabled(active)
def log_message(self, msg):
self._parent.log_message(msg)
#Update the channels of the buttons in the user modes..
def _update_control_channels(self):
new_channel = self.channel_for_current_mode()
for button in self._all_buttons:
button.set_channel(new_channel)
button.set_force_next_value()