def _init_device(self): make_button = partial(make_launch_control_button, channel=10) make_encoder = partial(make_launch_control_encoder, channel=10) bottom_encoders, top_encoders = make_all_encoders( 'Device', make_encoder) parameter_controls = top_encoders[:4] + bottom_encoders[:4] bank_buttons = [ make_button(identifier, 'Device_Bank_Button_' + str(i), is_pad=True) for i, identifier in enumerate(pad_identifiers) ] for button in bank_buttons: button.set_on_off_values(Colors.LED_ON, Colors.LED_OFF) self._device_bank_registry = DeviceBankRegistry() self._device = DeviceComponent( device_bank_registry=self._device_bank_registry, name='Device') self._device.set_enabled(False) self._device.layer = Layer( parameter_controls=ButtonMatrixElement(rows=[parameter_controls]), bank_buttons=ButtonMatrixElement(rows=[bank_buttons])) self.set_device_component(self._device) self._device_navigation = DeviceNavigationComponent() self._device_navigation.set_enabled(False) self._device_navigation.name = 'Device_Navigation' self._device_navigation.layer = Layer( next_device_button=make_button(115, 'Next_Device_Button'), previous_device_button=make_button(114, 'Prev_Device_Button')) self._view_control = ViewControlComponent() self._view_control.set_enabled(False) self._view_control.name = 'View_Control' self._view_control.layer = Layer( next_track_button=make_button(117, 'Device_Next_Track_Button'), prev_track_button=make_button(116, 'Device_Prev_Track_Button'))
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, parent, encoders, select_button, up_button, down_button, left_button, right_button, mixer, session, device, mixer_modes, device_nav): ModeSelectorComponent.__init__(self) self._parent = parent ### self._session_navigation = SessionNavigationComponent(parent, name='Session_Navigation') self._encoders = encoders self._select_button = select_button self._up_button = up_button self._down_button = down_button self._left_button = left_button self._right_button = right_button self._mixer = mixer self._session = session self._device = device self._mixer_modes = mixer_modes self._device_nav = device_nav ### Added by Naenyn 2013-11-05 self._clip_creator = ClipCreator() self._view_control = ViewControlComponent(name='View_Control') self._session_recording = SessionRecordingComponent(self._clip_creator, self._view_control, name='Session_Recording')
def _setup_session_recording_component(self): self._recorder = SessionRecordingComponent(ClipCreator(), ViewControlComponent())