def _init_matrix_modes(self): """ Switch between Session and StepSequencer modes """ """here we go trying to switch.... lew 05:53 21/10/17""" self._auto_arm = AutoArmComponent(name='Auto_Arm') self._matrix_modes = ModesComponent(name='Matrix_Modes', is_root=True) self._matrix_modes.default_behaviour = ImmediateBehaviour() self._matrix_modes.add_mode( 'disable', [self._matrix_background, self._background, self._mod_background]) self._matrix_modes.add_mode('sends', self._session_mode_layers()) self._matrix_modes.add_mode('user', self._user_mode_layers()) self._matrix_modes.add_mode('user2', self._user2_mode_layers()) self._matrix_modes.add_mode('session', self._session_mode_layers()) #self._matrix_modes.add_mode('user', [self._user_modes], behaviour=CustomReenterBehaviour(on_reenter=self.switch_note_mode_layout, on_enter=self.enter_note_mode_layout)) #self._matrix_modes.add_mode('user', [self._drum_group_finder, self._view_control, self._user_modes], # behaviour=self._auto_arm.auto_arm_restore_behaviour(ReenterBehaviour, # on_reenter=self.switch_note_mode_layout)) self._matrix_modes.layer = Layer(session_button=self._pan_button, sends_button=self._sends_button, user_button=self._user_button, user2_button=self._metronome_button) self._on_matrix_mode_changed.subject = self._matrix_modes self._matrix_modes.selected_mode = 'session'
def _create_mixer(self): self._mixer = MixerComponent(NUM_TRACKS, auto_name=True, is_enabled=False, invert_mute_feedback=True, layer=Layer(volume_controls=(self._volume_controls), arm_buttons=(self._arm_buttons), solo_buttons=(self._solo_buttons), mute_buttons=(self._mute_buttons), shift_button=(self._shift_button), track_select_buttons=(self._select_buttons), prehear_volume_control=(self._prehear_control), crossfader_control=(self._crossfader_control), crossfade_buttons=(self._crossfade_buttons))) self._mixer.master_strip().layer = Layer(volume_control=(self._master_volume_control), select_button=(self._master_select_button)) self._encoder_mode = ModesComponent(name='Encoder_Mode', is_enabled=False) self._encoder_mode.default_behaviour = ImmediateBehaviour() self._encoder_mode.add_mode('pan', [AddLayerMode(self._mixer, Layer(pan_controls=(self._mixer_encoders)))]) self._encoder_mode.add_mode('sends', [ AddLayerMode(self._mixer, Layer(send_controls=(self._mixer_encoders))), DelayMode(AddLayerMode(self._mixer, Layer(send_select_buttons=(self._send_select_buttons))))]) self._encoder_mode.add_mode('user', [AddLayerMode(self._mixer, Layer(user_controls=(self._mixer_encoders)))]) self._encoder_mode.layer = Layer(pan_button=(self._pan_button), sends_button=(self._sends_button), user_button=(self._user_button)) self._encoder_mode.selected_mode = 'pan'
def _create_session_mode(self): """ Switch between Session and StepSequencer modes """ self._session_mode = ModesComponent(name='Session_Mode', is_enabled = False) self._session_mode.default_behaviour = ImmediateBehaviour() self._session_mode.add_mode('session', self._session_mode_layers()) self._session_mode.add_mode('session_2', self._session_mode_layers()) self._session_mode.add_mode('sequencer', (self._sequencer, self._sequencer_layer())) self._session_mode.layer = Layer( session_button = self._pan_button, session_2_button = self._sends_button, sequencer_button = self._user_button) self._session_mode.selected_mode = "session"