def __init__(self, target_track_component, *a, **k):
     self._target_track_component = target_track_component
     self._modes_component = None
     self._note_mode_name = None
     super(SpecialSessionRecordingComponent,
           self).__init__(ClipCreator(), True, *a, **k)
     return
Esempio n. 2
0
 def _create_session_recording(self):
     self._session_recording = SessionRecordingComponent(
         ClipCreator(),
         ViewControlComponent(),
         name=b'Session_Recording',
         is_enabled=False,
         layer=Layer(record_button=self._session_record_button))
     self._session_recording.set_enabled(True)
Esempio n. 3
0
    def __init__(self,
                 clip_creator=None,
                 parameter_provider=None,
                 grid_resolution=None,
                 note_editor_settings=None,
                 skin=None,
                 instrument_play_layer=None,
                 instrument_sequence_layer=None,
                 layer=None,
                 *a,
                 **k):
        super(MelodicComponent, self).__init__(*a, **k)
        self._matrices = None
        self._grid_resolution = grid_resolution

        clip_creator = ClipCreator()

        self._instrument = self.register_component(InstrumentComponent())

        self._note_editors = self.register_components(*[
            APCNoteEditorComponent(settings_mode=note_editor_settings,
                                   clip_creator=clip_creator,
                                   grid_resolution=self._grid_resolution,
                                   is_enabled=False)
            for _ in xrange(NUM_NOTE_EDITORS)
        ])
        self._paginator = NoteEditorPaginator(self._note_editors)
        self._loop_selector = self.register_component(
            LoopSelectorComponent(clip_creator=clip_creator,
                                  paginator=self._paginator,
                                  is_enabled=False))
        self._playhead = None
        self._playhead_component = self.register_component(
            PlayheadComponent(grid_resolution=grid_resolution,
                              paginator=self._paginator,
                              follower=self._loop_selector,
                              is_enabled=False))
        self.add_mode('play', LayerMode(self._instrument,
                                        instrument_play_layer))
        self.add_mode('sequence', [
            LayerMode(self._instrument, instrument_sequence_layer),
            self._loop_selector, note_editor_settings,
            LayerMode(self, layer), self._playhead_component
        ] + self._note_editors)
        self.selected_mode = 'play'
        scales = self._instrument.scales
        self._on_detail_clip_changed.subject = self.song().view
        self._on_scales_changed.subject = scales
        self._on_scales_preset_changed.subject = scales._presets
        self._on_notes_changed.subject = self._instrument
        self._on_playing_position_changed.subject = self._loop_selector
        self._on_selected_mode_changed.subject = self
        self._on_detail_clip_changed()
        self._update_note_editors()
        self._skin = skin
        self._playhead_color = 'Melodic.Playhead'
        self._update_playhead_color()
 def _create_recording(self):
     record_button = MultiElement(self._session_record_button,
                                  self._foot_pedal_button.single_press)
     self._session_recording = SessionRecordingComponent(
         ClipCreator(),
         self._view_control,
         name='Session_Recording',
         is_enabled=False,
         layer=Layer(new_button=self._foot_pedal_button.double_press,
                     record_button=record_button))
Esempio n. 5
0
 def _setup_session_recording_component(self):
     self._clip_creator = ClipCreator()
     self._clip_creator.name = 'ClipCreator'
     self._recorder = SessionRecordingComponent(self._clip_creator,
                                                ViewControlComponent())
     self._recorder.set_enabled(True)
     self._recorder.layer = Layer(
         automation_button=self._grid[1][2],
         record_button=self._grid[2][1],
     )
 def __init__(self, *a, **k):
     super(StepSeqComponent,
           self).__init__(clip_creator=ClipCreator(),
                          note_editor_settings=self._note_editor_setting(),
                          is_enabled=False,
                          skin=make_default_skin(),
                          *a,
                          **k)
     self._drum_group.__class__ = APCDrumGroupComponent
     self._note_editor.__class__ = APCNoteEditorComponent
     self._setup_drum_group_finder()
     self._configure_playhead()
Esempio n. 7
0
 def __init__(self, *a, **k):
     super(BaseSequencerComponent,
           self).__init__(clip_creator=ClipCreator(),
                          grid_resolution=self.control_surface.grid,
                          is_enabled=False,
                          skin=pad_skin(),
                          *a,
                          **k)
     self._setup_drum_group_finder()
     self.on_selected_track_changed()
     self.patch_note_editor()
     self.configure_playhead()
     self.update()
Esempio n. 8
0
  def __init__(self, *a, **k):
    self._double_press_context = DoublePressContext()
    APC40_MkII.__init__(self, *a, **k)
    with self.component_guard():
      self._skin = make_default_skin()
  #    self._create_session()
      self._clip_creator = ClipCreator()
      self._init_background()
      self._init_step_sequencer()
      self._init_drum_component()
      self._init_instrument()
      self._init_note_repeat()
      self._init_matrix_modes() 
      self._create_device()
#      self._create_view_control()
      self._on_selected_track_changed()
    
    self.set_pad_translations(PAD_TRANSLATIONS)
    self.set_feedback_channels(FEEDBACK_CHANNELS)
Esempio n. 9
0
    def __init__(self, *a, **k):

        #pydevd.settrace('localhost', port=55983, stdoutToServer=True, stderrToServer=True)

        super(APC40_MkII, self).__init__(*a, **k)
        self._color_skin = make_rgb_skin()
        self._default_skin = make_default_skin()
        self._stop_button_skin = make_stop_button_skin()
        self._crossfade_button_skin = make_crossfade_button_skin()
        self._double_press_context = DoublePressContext()
        self._shift_button = None

        with self.component_guard():
            self._create_controls()
            self._create_bank_toggle()
            self._create_mixer()
            self._create_transport()
            self._create_view_control()
            self._create_quantization_selection()
            self._create_recording()

            self._skin = make_custom_skin()

            self._clip_creator = ClipCreator()

            self._init_background()
            self._init_instrument()
            self._init_step_sequencer()
            self._init_drum_component()
            self._init_note_repeat()
            self._create_session()
            self._session.set_mixer(self._mixer)

            self._init_matrix_modes()
            self._create_device()

            self.set_feedback_channels(FEEDBACK_CHANNELS)

        self.set_highlighting_session_component(self._session)
        self.set_device_component(self._device)
Esempio n. 10
0
    def _setup_components(self):

        # Session

        self._session = SessionComponent(8, len(self._scene_launch_buttons))
        self._session.name = 'Session_Control'
        self._session.selected_scene().name = 'Selected_Scene'
        self._session.selected_scene().set_launch_button(
            self._scene_launch_button)
        self._session.set_stop_all_clips_button(self._scene_stop_button)

        for index in range(8):
            clip_slot = self._session.selected_scene().clip_slot(index)
            clip_slot.set_launch_button(self._clip_launch_buttons[index])
            clip_slot.name = 'Selected_Clip_Slot_' + str(index)

        self._session.set_stop_track_clip_buttons(
            tuple(self._clip_stop_buttons))

        # Undo

        self._do_undo.subject = self._clip_undo_button

        # Transport

        transport = TransportComponent()
        transport.name = 'Transport'
        transport.set_stop_button(self._stop_button)
        transport.set_play_button(self._play_button)
        transport.set_record_button(self._rec_button)
        transport.set_loop_button(self._loop_button)

        self._transport_view_modes = TransportViewModeSelector(
            transport, self._session, self._ffwd_button, self._rwd_button)
        self._transport_view_modes.name = 'Transport_View_Modes'

        session_recording = SessionRecordingComponent(
            ClipCreator(),
            ViewControlComponent(),
            name='Session_Recording',
            is_enabled=False,
            layer=Layer(record_button=self._overdub_button))

        # Device

        # device = DeviceComponent()
        # device.name = 'Device_Component'
        # self.set_device_component(device)
        # device.set_parameter_controls(self._encoders)

        # Navigation

        self._session_navigation = SessionNavigationComponent(
            name='Session_Navigation')
        self._session_navigation.set_next_track_button(self._next_track_button)
        self._session_navigation.set_prev_track_button(self._prev_track_button)

        # Playing
        # self._session.set_scene_launch_buttons(tuple(self._scene_launch_buttons))
        for index in range(len(self._scene_launch_buttons)):
            scene = self._session.scene(index)
            scene.set_launch_button(self._scene_launch_buttons[index])
 def __init__(self, *a, **k):
     super(SessionRecordingComponentEx,
           self).__init__(ClipCreator(), ViewControlComponent(), *a, **k)
Esempio n. 12
0
 def _setup_session_recording_component(self):
     self._recorder = SessionRecordingComponent(ClipCreator(),
                                                ViewControlComponent())