def _create_session_mode(self):
     session_modes = ModesComponent(is_enabled=False)
     session_modes.add_mode('session', self._session_mode)
     session_modes.add_mode('overview', self._session_overview_mode)
     session_modes.layer = Layer(cycle_mode_button='layout_button')
     session_modes.selected_mode = 'session'
     return [session_modes, self._session_navigation]
Esempio n. 2
0
 def _create_clip_mode(self):
     base_loop_layer = Layer(shift_button='shift_button', loop_button='track_state_buttons_raw[1]')
     self._loop_controller = LoopSettingsControllerComponent(is_enabled=False)
     self._model.loopSettingsView = self._loop_controller
     audio_clip_layer = Layer(warp_mode_encoder='parameter_controls_raw[5]', transpose_encoder='parameter_controls_raw[6]', detune_encoder=self._with_shift('parameter_controls_raw[6]'), gain_encoder='parameter_controls_raw[7]', shift_button='shift_button')
     audio_clip_controller = AudioClipSettingsControllerComponent(is_enabled=False)
     self._model.audioClipSettingsView = audio_clip_controller
     clip_control_mode_selector = ModesComponent(is_enabled=False)
     clip_control_mode_selector.add_mode('midi', [make_freeze_aware(self._loop_controller, base_loop_layer + Layer(encoders=self.elements.global_param_controls.submatrix[:3, :]))])
     clip_control_mode_selector.add_mode('audio', [make_freeze_aware(self._loop_controller, base_loop_layer + Layer(encoders=self.elements.global_param_controls.submatrix[1:4, :], zoom_encoder='fine_grain_param_controls_raw[0]')), make_freeze_aware(audio_clip_controller, audio_clip_layer)])
     clip_control_mode_selector.add_mode('no_clip', [])
     clip_control_mode_selector.selected_mode = 'no_clip'
     clip_control = ClipControlComponent(loop_controller=self._loop_controller, audio_clip_controller=audio_clip_controller, mode_selector=clip_control_mode_selector, decorator_factory=self._clip_decorator_factory, is_enabled=False)
     self._model.clipView = clip_control
     return [partial(self._view_control.show_view, 'Detail/Clip'), clip_control_mode_selector, clip_control]
 def _create_slicing_modes(self):
     slicing_modes = ModesComponent(name='Slicing_Modes', is_enabled=False)
     slicing_modes.add_mode('64pads', [AddLayerMode(self._slicing_component, Layer(matrix='matrix')), LayerMode(self._pitch_mod_touch_strip, self._pitch_mod_touch_strip_layer)])
     slicing_modes.add_mode('sequencer', [self._slice_step_sequencer, self._note_editor_settings_component, AddLayerMode(self._slicing_component, Layer(matrix=self.elements.matrix.submatrix[:4, 4:8], page_strip='touch_strip_control', scroll_strip=self._with_shift('touch_strip_control')))])
     slicing_modes.selected_mode = '64pads'
     return slicing_modes