def _create_encoder_modes(self): knob_modes = ModesComponent(name='Knob Modes', is_enabled=False) parameter_knobs_matrix = self.wrap_matrix(self._parameter_knobs) knob_modes.add_mode( 'volume', AddLayerMode(self._mixer, Layer(volume_controls=parameter_knobs_matrix))) knob_modes.add_mode( 'pan', AddLayerMode(self._mixer, Layer(pan_controls=parameter_knobs_matrix))) knob_modes.add_mode('send', [ AddLayerMode(self._mixer, Layer(send_controls=parameter_knobs_matrix)), DelayMode(LayerMode( SendToggleComponent( self._mixer, name='Toggle Send', is_enabled=False), Layer(priority=MODE_PRIORITY, toggle_button=self._send_button)), delay=TIMER_DELAY) ]) knob_modes.add_mode( 'device', AddLayerMode(self._device, Layer(parameter_controls=parameter_knobs_matrix))) knob_modes.selected_mode = 'volume' knob_modes.layer = Layer(volume_button=self._volume_button, pan_button=self._pan_button, send_button=self._send_button, device_button=self._device_button) knob_modes.layer.priority = MODE_PRIORITY
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_delete_component(self): self._delete_component = ModesComponent(name='DeleteClipComponent') self._delete_component.add_mode('disabled', None) self._delete_component.add_mode( 'enabled', [DelayMode(tuple([self._delete_on, self._delete_off]), delay=1.5)]) self._delete_component.layer = Layer( toggle_button=self._selected_scene_launch_button) self._delete_component.selected_mode = 'disabled'