def __init__(self, matrix, top_buttons, side_buttons, config_button): assert isinstance(matrix, ButtonMatrixElement) assert matrix.width() == 8 and matrix.height() == 8 assert isinstance(top_buttons, tuple) assert len(top_buttons) == 8 assert isinstance(side_buttons, tuple) assert len(side_buttons) == 8 assert isinstance(config_button, ButtonElement) ModeSelectorComponent.__init__(self) self._session_ring = SessionRingComponent(matrix.width(), matrix.height()) self._session = SpecialSessionComponent( session_ring=self._session_ring) #self._zooming = DeprecatedSessionZoomingComponent(self._session) self._zooming = SessionOverviewComponent( session_ring=self._session_ring, enable_skinning=True) self._session.name = u'Session_Control' #self._zooming.name = u'Session_Overview' self._matrix = matrix self._side_buttons = side_buttons self._nav_buttons = top_buttons[:4] self._config_button = config_button #self._zooming.set_empty_value(LED_OFF) self._all_buttons = [] for button in self._side_buttons + self._nav_buttons: self._all_buttons.append(button) self._sub_modes = SubSelectorComponent(matrix, side_buttons, self._session) self._sub_modes.name = u'Mixer_Modes' self._sub_modes.set_update_callback(self._update_control_channels) self._init_session() self._all_buttons = tuple(self._all_buttons) self.set_modes_buttons(top_buttons[4:])
def _setup_session(self): self._session_ring = SessionRingComponent(name='Session_Ring', num_tracks=4, num_scenes=4) self._session = SessionComponent(name='Session', session_ring=self._session_ring, auto_name=True) self._session.cliplaunch_layer = AddLayerMode( self._session, Layer(priority=4, clip_launch_buttons=self._matrix.submatrix[:, :])) self._session.stop_layer = AddLayerMode( self._session, Layer(priority=4, stop_track_clip_buttons=self._matrix.submatrix[:, 3])) self._session_navigation = SessionNavigationComponent( name='Session_Navigation', session_ring=self._session_ring) self._session_navigation._horizontal_layer = AddLayerMode( self._session_navigation, Layer(priority=4, left_button=self._top_button[0], right_button=self._top_button[1])) self._session_navigation._vertical_layer = AddLayerMode( self._session_navigation, Layer(priority=4, up_button=self._top_button[0], down_button=self._top_button[1])) self._session_navigation.set_enabled(False)
def _create_session(self): self._session_ring = SessionRingComponent(8, 8, name = u'Session_Ring') self._session = SpecialSessionComponent(session_ring = self._session_ring, name = u'Session', is_enabled = False, auto_name = True) self._session_navigation = SessionNavigationComponent(session_ring = self._session_ring, name = u'SessionNavigation', is_enabled = False) self._session_navigation._vertical_banking.scroll_up_button.color = 'Session.NavigationButtonOn' self._session_navigation._vertical_banking.scroll_up_button.disabled_color = 'Session.NavigationButtonOff' self._session_navigation._vertical_banking.scroll_down_button.color = 'Session.NavigationButtonOn' self._session_navigation._vertical_banking.scroll_down_button.disabled_color = 'Session.NavigationButtonOff' self._session_navigation._horizontal_banking.scroll_up_button.color = 'Session.NavigationButtonOn' self._session_navigation._horizontal_banking.scroll_up_button.disabled_color = 'Session.NavigationButtonOff' self._session_navigation._horizontal_banking.scroll_down_button.color = 'Session.NavigationButtonOn' self._session_navigation._horizontal_banking.scroll_down_button.disabled_color = 'Session.NavigationButtonOff' self._session_navigation._vertical_paginator.scroll_up_button.color = 'Session.PageNavigationButtonOn' self._session_navigation._vertical_paginator.scroll_up_button.disabled_color = 'Session.PageNavigationButtonOff' self._session_navigation._vertical_paginator.scroll_down_button.color = 'Session.PageNavigationButtonOn' self._session_navigation._vertical_paginator.scroll_down_button.disabled_color = 'Session.PageNavigationButtonOff' self._session_navigation._horizontal_paginator.scroll_up_button.color = 'Session.PageNavigationButtonOn' self._session_navigation._horizontal_paginator.scroll_up_button.disabled_color = 'Session.PageNavigationButtonOff' self._session_navigation._horizontal_paginator.scroll_down_button.color = 'Session.PageNavigationButtonOn' self._session_navigation._horizontal_paginator.scroll_down_button.disabled_color = 'Session.PageNavigationButtonOff' self._zooming = SessionOverviewComponent(session_ring = self._session_ring, enable_skinning = True, name = u'Session_Zooming', is_enabled = False) self._zooming.layer = Layer(button_matrix = self._matrix) self._session_navigation.nav_layer = AddLayerMode(self._session_navigation, Layer(up_button = self._top_buttons[0], down_button = self._top_buttons[1], left_button = self._top_buttons[2], right_button = self._top_buttons[3])) self._session_navigation.page_layer = AddLayerMode(self._session_navigation, Layer(page_up_button = self._top_buttons[0], page_down_button = self._top_buttons[1], page_left_button = self._top_buttons[2], page_right_button = self._top_buttons[3])) self._session.cliplaunch_layer = AddLayerMode(self._session, Layer(priority = 1, clip_launch_buttons = self._matrix, scene_launch_buttons = self._side_matrix)) self._session.clipstop_layer = AddLayerMode(self._session, Layer(priority = 1, stop_all_clips_button = self._side_buttons[4], stop_track_clip_buttons = self._matrix.submatrix[:, 4:5]))
def _setup_session(self): self._session_ring = SessionRingComponent(name = 'Session_Ring', num_tracks = 4, num_scenes = 4) self._session = SessionComponent(name = 'Session', session_ring = self._session_ring, auto_name = True) self._session.layer = Layer(priority = 2, clip_launch_buttons = self._pad_matrix,) # stop_all_clips_button = self._button[5]) self._session.set_enabled(False) self._session_navigation = SessionNavigationComponent(name = 'Session_Navigation', session_ring = self._session_ring) self._session_navigation.layer = Layer(priority = 2, left_button = self._button[0], right_button = self._button[1]) self._session_navigation.set_enabled(False)
def _setup_mixer(self): self._session_ring = SessionRingComponent(name='Session_Ring', num_tracks=0, num_scenes=0) self._mixer = MonoMixerComponent(name='Mixer', tracks_provider=self._session_ring, track_assigner=simple_track_assigner, invert_mute_feedback=True, auto_name=True, enable_skinning=True) self._mixer._selected_strip.layer = Layer( priority=4, volume_control=self._pedal[13], arm_button=self._pedal[7])