def _create_device_mode(self):
     device_mode_scene_launch_translation = self._create_translation(
         'Device_Mode_Scene_Launch_Translation', consts.DEVICE_MAP_CHANNEL,
         Layer(scene_launch_buttons=self.
               _midimap['Scene_Launch_Button_Matrix']))
     device_layer_mode = LayerMode(
         self._device,
         layer=Layer(
             parameter_controls=self._midimap['Slider_Button_Matrix']))
     device_nav_layer_mode = LayerMode(
         self._device_navigation,
         layer=Layer(
             device_nav_left_button=self._midimap['Arrow_Left_Button'],
             device_nav_right_button=self._midimap['Arrow_Right_Button']))
     device_background_layer_mode = LayerMode(
         self._device_background,
         layer=Layer(arrow_up_button=self._midimap['Arrow_Up_Button'],
                     arrow_down_button=self._midimap['Arrow_Down_Button']))
     self._modes.add_mode('device_mode', [
         partial(self._layout_setup, consts.FADER_LAYOUT_SYSEX_BYTE),
         self._device, device_layer_mode, device_nav_layer_mode,
         device_background_layer_mode, self._clip_actions_component,
         self._clip_delete_layer_mode, device_mode_scene_launch_translation,
         self._show_playing_clip, self._set_clip_actions_type
     ],
                          behaviour=ReenterBehaviour(
                              self.toggle_detail_view))
 def _create_note_modes(self):
     note_mode_matrix_translation = self._create_translation('Note_Mode_Matrix_Translation', consts.CHROM_MAP_CHANNEL, Layer(button_matrix=self._midimap['Main_Button_Matrix'], note_button_matrix=self._midimap['Note_Button_Matrix'], drum_matrix=self._midimap['Drum_Button_Matrix'], mixer_button_matrix=self._midimap['Mixer_Button_Matrix']), should_enable=False)
     note_mode_scene_launch_translation = self._create_translation('Note_Mode_Scene_Launch_Translation', consts.CHROM_MAP_CHANNEL, Layer(scene_launch_buttons=self._midimap['Scene_Launch_Button_Matrix']))
     scale_setup_mode_button_lighting = LedLightingComponent(name='LED_Lighting_Component', is_enabled=False, layer=Layer(button=self._midimap.with_shift('Note_Mode_Button')))
     drum_mode_note_matrix_translation = self._create_translation('Drum_Mode_Note_Button_Translation', 0, Layer(note_button_matrix=self._midimap['Note_Button_Matrix']), should_enable=False, should_reset=False)
     drum_group_layer_mode = LayerMode(self._drum_group, layer=Layer(scroll_up_button=self._midimap['Arrow_Left_Button'], scroll_down_button=self._midimap['Arrow_Right_Button'], scroll_page_up_button=self._midimap['Arrow_Up_Button'], scroll_page_down_button=self._midimap['Arrow_Down_Button'], drum_matrix=self._midimap['Drum_Button_Matrix'], select_button=self._midimap['Shift_Button'], delete_button=self._midimap['Delete_Button']))
     self._note_modes = SpecialModesComponent(name='Note_Modes')
     self._note_modes.add_mode('chromatic_mode', [
      partial(self._layout_setup, consts.NOTE_LAYOUT_SYSEX_BYTE),
      self._clip_delete_layer_mode,
      note_mode_matrix_translation,
      scale_setup_mode_button_lighting])
     self._note_modes.add_mode('drum_mode', [
      partial(self._layout_setup, consts.DRUM_LAYOUT_SYSEX_BYTE),
      self._setup_drum_group,
      drum_group_layer_mode,
      drum_mode_note_matrix_translation])
     self._note_modes.add_mode('audio_mode', [
      partial(self._layout_setup, consts.AUDIO_LAYOUT_SYSEX_BYTE),
      self._clip_delete_layer_mode])
     self._note_modes.set_enabled(False)
     self._modes.add_mode('note_mode', [
      note_mode_scene_launch_translation,
      self._note_modes,
      self._select_note_mode,
      self._select_target_track,
      self._clip_actions_component,
      self._show_playing_clip,
      self._set_clip_actions_type], behaviour=ReenterBehaviour(self.toggle_detail_view))
     self._session_record.set_modes_component(self._modes)
     self._session_record.set_note_mode_name('note_mode')
Ejemplo n.º 3
0
 def _create_arrangement_mode(self):
     self._arrangement_mixer = SpecialMixerComponent(
         NUM_TRACKS,
         auto_name=True,
         is_enabled=True,
         invert_mute_feedback=True)
     self._arrangement_mixer.name = 'Arrangement_Mixer_Control'
     self._arrangement.set_mixer(self._arrangement_mixer)
     arrangement_mixer_layer_mode = LayerMode(
         self._arrangement_mixer,
         layer=Layer(
             track_select_buttons=self._midimap['Main_Button_Matrix'].
             submatrix[4, :],
             arm_buttons=self._midimap['Main_Button_Matrix'].submatrix[
                 7, :],
             solo_buttons=self._midimap['Main_Button_Matrix'].submatrix[
                 6, :],
             mute_buttons=self._midimap['Main_Button_Matrix'].submatrix[
                 5, :]))
     # LHS_layer_mode = LayerMode( quantize_button=self._midimap['Quantize_Button'] )
     self._modes.add_mode('arrangement_mode', [
         partial(self._layout_setup, consts.SESSION_LAYOUT_SYSEX_BYTE),
         arrangement_mixer_layer_mode,
         self._arrangement.update_navigation_buttons
     ],
                          behaviour=ReenterBehaviour(
                              self.toggle_detail_view))