def update(self):
		if self.is_enabled():
			if self._clip_up_button != None:
				self._clip_up_button.set_on_off_values(GREEN_FULL,LED_OFF)
				if(True):
					self._clip_up_button.turn_off()
				else:
					self._clip_up_button.turn_on()
			
			if self._clip_down_button != None:
				self._clip_down_button.set_on_off_values(GREEN_FULL,LED_OFF)
				if(True):
					self._clip_down_button.turn_off()
				else:
					self._clip_down_button.turn_on()
			
			if self._overdub_button != None:
				self._overdub_button.set_on_off_values(RED_FULL,RED_THIRD)
				if(self.song().overdub):
					self._overdub_button.turn_off()
				else:
					self._overdub_button.turn_on()
			
			if self._play_button != None:
				self._play_button.set_on_off_values(RED_FULL,RED_THIRD)
				if(False):
					self._play_button.turn_off()
				else:
					self._play_button.turn_on()
				
			if self._stop_button != None:
				self._stop_button.set_on_off_values(RED_FULL,RED_THIRD)
				if(False):
					self._stop_button.turn_off()
				else:
					self._stop_button.turn_on()
					
			if self._mute_button != None:
				self._mute_button.set_on_off_values(AMBER_FULL,AMBER_THIRD)
				if(self._selected_track.arm):
					self._mute_button.turn_off()
				else:
					self._mute_button.turn_on()

			if self._solo_button != None:
				self._solo_button.set_on_off_values(RED_FULL,RED_THIRD)
				if(self._selected_track.solo):
					self._solo_button.turn_on()
				else:
					self._solo_button.turn_off()

			if self._arm_button != None:
				self._arm_button.set_on_off_values(RED_FULL,RED_THIRD)
				if(self._selected_track.mute):
					self._arm_button.turn_on()
				else:
					self._arm_button.turn_off()

		MixerComponent.update(self)
Beispiel #2
0
    def update(self):
        if self.is_enabled():
            self.update_track_buttons()
            self.update_scene_buttons()

            if self._session_record_button != None:
                if self._implicit_arm:
                    self._session_record_button.set_on_off_values(
                        "TrackController.ImplicitRecording")
                else:
                    self._session_record_button.set_on_off_values(
                        "TrackController.Recording")
                if (self.song().session_record):
                    self._session_record_button.turn_on()
                else:
                    self._session_record_button.turn_off()

            if self._play_button != None:
                self._play_button.set_light("TrackController.Play.Off")

            if self._stop_button != None:
                self._stop_button.set_light("TrackController.Stop.Off")

            if self._mute_button != None:
                self._mute_button.set_on_off_values("TrackController.Mute")
                if (self.selected_track.mute):
                    self._mute_button.turn_off()
                else:
                    self._mute_button.turn_on()

            if self._undo_button != None:
                self._undo_button.set_on_off_values("TrackController.Undo")
                if self.song().can_undo:
                    self._undo_button.turn_on()
                else:
                    self._undo_button.turn_off()

            if self._solo_button != None:
                self._solo_button.set_on_off_values("TrackController.Solo")
                if self.selected_track.solo:
                    self._solo_button.turn_on()
                else:
                    self._solo_button.turn_off()

            if self._arm_button != None:
                if self._implicit_arm:
                    self._arm_button.set_on_off_values(
                        "TrackController.ImplicitRecording")
                else:
                    self._arm_button.set_on_off_values(
                        "TrackController.Recording")

                if (self.selected_track.can_be_armed
                        and self.selected_track.arm):
                    self._arm_button.turn_on()
                else:
                    self._arm_button.turn_off()

        MixerComponent.update(self)
    def update(self):
        if self.is_enabled():
            self.update_track_buttons()
            self.update_scene_buttons()

            if self._session_record_button != None:
                if self._implicit_arm:
                    self._session_record_button.set_on_off_values(
                        RED_FULL, RED_THIRD)
                else:
                    self._session_record_button.set_on_off_values(
                        AMBER_FULL, AMBER_THIRD)
                if (self.song().session_record):
                    self._session_record_button.turn_on()
                else:
                    self._session_record_button.turn_off()

            if self._play_button != None:
                self._play_button.set_on_off_values(RED_FULL, RED_THIRD)
                self._play_button.turn_off()

            if self._stop_button != None:
                self._stop_button.set_on_off_values(RED_FULL, RED_THIRD)
                self._stop_button.turn_off()

            if self._mute_button != None:
                self._mute_button.set_on_off_values(AMBER_FULL, AMBER_THIRD)
                if (self._selected_track.mute):
                    self._mute_button.turn_off()
                else:
                    self._mute_button.turn_on()

            if self._undo_button != None:
                self._undo_button.set_on_off_values(AMBER_FULL, AMBER_THIRD)
                if (self.song().can_undo):
                    self._undo_button.turn_on()
                else:
                    self._undo_button.turn_off()

            if self._solo_button != None:
                self._solo_button.set_on_off_values(AMBER_FULL, AMBER_THIRD)
                if (self._selected_track.solo):
                    self._solo_button.turn_on()
                else:
                    self._solo_button.turn_off()

            if self._arm_button != None:
                if self._implicit_arm:
                    self._arm_button.set_on_off_values(GREEN_FULL, GREEN_THIRD)
                else:
                    self._arm_button.set_on_off_values(RED_FULL, RED_THIRD)

                if (self._selected_track.can_be_armed
                        and self._selected_track.arm):
                    self._arm_button.turn_on()
                else:
                    self._arm_button.turn_off()

        MixerComponent.update(self)
    def update(self):
        if self.is_enabled():
            if self._clip_up_button != None:
                self._clip_up_button.set_on_off_values(GREEN_FULL, LED_OFF)
                if (True):
                    self._clip_up_button.turn_off()
                else:
                    self._clip_up_button.turn_on()

            if self._clip_down_button != None:
                self._clip_down_button.set_on_off_values(GREEN_FULL, LED_OFF)
                if (True):
                    self._clip_down_button.turn_off()
                else:
                    self._clip_down_button.turn_on()

            if self._overdub_button != None:
                self._overdub_button.set_on_off_values(RED_FULL, RED_THIRD)
                if (self.song().overdub):
                    self._overdub_button.turn_off()
                else:
                    self._overdub_button.turn_on()

            if self._play_button != None:
                self._play_button.set_on_off_values(RED_FULL, RED_THIRD)
                if (False):
                    self._play_button.turn_off()
                else:
                    self._play_button.turn_on()

            if self._stop_button != None:
                self._stop_button.set_on_off_values(RED_FULL, RED_THIRD)
                if (False):
                    self._stop_button.turn_off()
                else:
                    self._stop_button.turn_on()

            if self._mute_button != None:
                self._mute_button.set_on_off_values(AMBER_FULL, AMBER_THIRD)
                if (self._selected_track.arm):
                    self._mute_button.turn_off()
                else:
                    self._mute_button.turn_on()

            if self._solo_button != None:
                self._solo_button.set_on_off_values(RED_FULL, RED_THIRD)
                if (self._selected_track.solo):
                    self._solo_button.turn_on()
                else:
                    self._solo_button.turn_off()

            if self._arm_button != None:
                self._arm_button.set_on_off_values(RED_FULL, RED_THIRD)
                if (self._selected_track.mute):
                    self._arm_button.turn_on()
                else:
                    self._arm_button.turn_off()

        MixerComponent.update(self)
	def update(self):
		if self.is_enabled():
			self.update_track_buttons()
			self.update_scene_buttons()
			
			if self._session_record_button != None:
				if self._auto_arm:
					self._session_record_button.set_on_off_values(RED_FULL,RED_THIRD)
				else:
					self._session_record_button.set_on_off_values(AMBER_FULL,AMBER_THIRD)
				if(self.song().session_record):
					self._session_record_button.turn_on()
				else:
					self._session_record_button.turn_off()
			
			if self._play_button != None:
				self._play_button.set_on_off_values(RED_FULL,RED_THIRD)
				self._play_button.turn_off()
				
			if self._stop_button != None:
				self._stop_button.set_on_off_values(RED_FULL,RED_THIRD)
				self._stop_button.turn_off()
					
			if self._mute_button != None:
				self._mute_button.set_on_off_values(AMBER_FULL,AMBER_THIRD)
				if(self._selected_track.mute):
					self._mute_button.turn_off()
				else:
					self._mute_button.turn_on()

			if self._undo_button != None:
				self._undo_button.set_on_off_values(AMBER_FULL,AMBER_THIRD)
				if(self.song().can_undo):
					self._undo_button.turn_on()
				else:
					self._undo_button.turn_off()

			if self._solo_button != None:
				self._solo_button.set_on_off_values(AMBER_FULL,AMBER_THIRD)
				if(self._selected_track.solo):
					self._solo_button.turn_on()
				else:
					self._solo_button.turn_off()

			if self._arm_button != None:
				if self._auto_arm:
					self._arm_button.set_on_off_values(GREEN_FULL,GREEN_THIRD)
				else:
					self._arm_button.set_on_off_values(RED_FULL,RED_THIRD)
					
				if(self._selected_track.can_be_armed and self._selected_track.arm):
					self._arm_button.turn_on()
				else:
					self._arm_button.turn_off()

		MixerComponent.update(self)
	def update(self):
		if self.is_enabled():
			self.update_track_buttons()
			self.update_scene_buttons()

			if self._session_record_button != None:
				if self._implicit_arm:
					self._session_record_button.set_on_off_values("TrackController.ImplicitRecording")
				else:
					self._session_record_button.set_on_off_values("TrackController.Recording")
				if(self.song().session_record):
					self._session_record_button.turn_on()
				else:
					self._session_record_button.turn_off()

			if self._play_button != None:
				self._play_button.set_light("TrackController.Play.Off")
				
			if self._stop_button != None:
				self._stop_button.set_light("TrackController.Stop.Off")
		
			if self._mute_button != None:
				self._mute_button.set_on_off_values("TrackController.Mute")
				if(self.selected_track.mute):
					self._mute_button.turn_off()
				else:
					self._mute_button.turn_on()

			if self._undo_button != None:
				self._undo_button.set_on_off_values("TrackController.Undo")
				if self.song().can_undo:
					self._undo_button.turn_on()
				else:
					self._undo_button.turn_off()

			if self._solo_button != None:
				self._solo_button.set_on_off_values("TrackController.Solo")
				if self.selected_track.solo:
					self._solo_button.turn_on()
				else:
					self._solo_button.turn_off()

			if self._arm_button != None:
				if self._implicit_arm:
					self._arm_button.set_on_off_values("TrackController.ImplicitRecording")
				else:
					self._arm_button.set_on_off_values("TrackController.Recording")

				if(self.selected_track.can_be_armed and self.selected_track.arm):
					self._arm_button.turn_on()
				else:
					self._arm_button.turn_off()

		MixerComponent.update(self)
Beispiel #7
0
class Alias8(ControlSurface):
  num_tracks = 8
  knobs_top = [1, 2, 3, 4, 5, 6, 7, 8]
  knobs_bottom = [9, 10, 11, 12, 13, 14, 15, 16]
  faders = [17, 18, 19, 20, 21, 22, 23, 24]
  master_fader = 25
  encoder = 42
  buttons_top = [0, 1, 2, 3, 4, 5, 6, 7]
  buttons_bottom = [8, 9, 10, 11, 12, 13, 14, 15]
  
  def __init__(self, instance):
    super(Alias8, self).__init__(instance, False)
    with self.component_guard():
      self._set_suppress_rebuild_requests(True)
      self.init_session()
      self.init_mixer() 
      
      # Connect mixer to session.
      self.session.set_mixer(self.mixer)
      self.session.update()
      # New in Live 9: must explicitly activate session component.
      self.set_highlighting_session_component(self.session)
      self._set_suppress_rebuild_requests(False)

  def init_session(self):
    self.session = SessionComponent(self.num_tracks, 1)
    self.session.name = 'Alias 8 Session'
    self.session.update()

    # Connect the encoder to track scroller.
    def scroll_cb(value):
      if value == 1:
        self.session._horizontal_banking.scroll_down()
      elif value == 127:
        self.session._horizontal_banking.scroll_up()
    self.track_encoder = EncoderElement(MIDI_CC_TYPE, 0, self.encoder,
        Live.MidiMap.MapMode.absolute)
    self.track_encoder.add_value_listener(scroll_cb)

  def init_mixer(self):
    self.mixer = MixerComponent(self.num_tracks, 0)
    self.mixer.id = 'Mixer' 
    self.song().view.selected_track = self.mixer.channel_strip(0)._track
    for i in range(self.num_tracks):
      self.mixer.channel_strip(i).set_volume_control(
          fader(self.faders[i]))
      self.mixer.channel_strip(i).set_solo_button(
          button(self.buttons_top[i], color=CYAN))
      self.mixer.channel_strip(i).set_arm_button(
          button(self.buttons_bottom[i], color=RED))
      self.mixer.channel_strip(i).set_pan_control(
          knob(self.knobs_bottom[i]))
    self.mixer.master_strip().set_volume_control(fader(self.master_fader))
    self.mixer.update()
Beispiel #8
0
 def update(self):
     MixerComponent.update(self)
     if self._update_callback != None:
         self._update_callback()
Beispiel #9
0
class Codex(Codec):
    def __init__(self, c_instance, *a, **k):
        self._shifted = False
        super(Codex, self).__init__(c_instance, *a, **k)
        with self.component_guard():
            self._setup_alt_mixer()
            self._setup_alt_device_selector()
            self._setup_alt_send_reset()
            self._setup_alt_device_control()
        self.log_message(
            '<<<<<<<<<<<<<<<<<<<<<<<<< Codex subclass log opened >>>>>>>>>>>>>>>>>>>>>>>>>'
        )
        self.schedule_message(1, self._mode_update)

    def _setup_alt_device_selector(self):
        self._alt_device_selector = NewDeviceSelectorComponent(self)
        self._alt_device_selector.name = 'Alt_Device_Selector'

    def _setup_alt_send_reset(self):
        self._alt_send_reset = ResetSendsComponent(self)
        self._alt_send_reset.name = 'Alt_Reset_Sends'

    """these two secondary DeviceComponents are only set up if the MONOHM_LINK flag in Map is turned on"""

    def _setup_alt_device_control(self):
        self._device1 = NewDeviceComponent()
        self._device1.name = 'Device_Component1'
        self._device2 = NewDeviceComponent()
        self._device2.name = 'Device_Component2'

    def _setup_alt_mixer(self):
        is_momentary = True
        self._num_tracks = (8)  #A mixer is one-dimensional
        self._mixer2 = MixerComponent(8, 4, False, False)
        self._mixer2.name = 'Mixer'
        #self._mixer2.set_track_offset(4) #Sets start point for mixer strip (offset from left)
        for index in range(8):
            self._mixer2.channel_strip(
                index).name = 'Mixer_ChannelStrip_' + str(index)
            self._mixer2.channel_strip(index)._invert_mute_feedback = True

    """Mode Functions"""

    def _enable_alt(self):
        if self._main_mode._mode_index == 0:
            for encoder, _ in self._encoder_matrix.submatrix[:,
                                                             0:2].iterbuttons(
                                                             ):
                encoder.set_enabled(False)
                encoder.reset()
            self._alt_enabled = True
            self._mode_update()
        super(Codex, self)._enable_alt()

    def _disable_alt(self):
        if self._main_mode._mode_index == 0:
            self._button_matrix.submatrix[:, 0:2].reset()
            for encoder, _ in self._encoder_matrix.submatrix[:,
                                                             0:2].iterbuttons(
                                                             ):
                encoder.set_enabled(True)
        super(Codex, self)._disable_alt()

    def _deassign_all(self):
        self._alt_send_reset.set_buttons(tuple([None for index in range(4)]))
        self._alt_send_reset.set_enabled(False)
        self._alt_device_selector.set_buttons(None)
        self._alt_device_selector.set_enabled(False)
        self._mixer2.selected_strip().set_send_controls(None)
        for index in range(8):
            self._mixer2.channel_strip(index).set_volume_control(None)
            self._mixer2.channel_strip(index).set_select_button(None)
            self._mixer2.channel_strip(index).set_mute_button(None)
            self._dial[index][2].release_parameter()
        for index in range(3):
            self._mixer2.return_strip(index).set_volume_control(None)
        self._device1.set_enabled(False)
        self._device1._parameter_controls = None
        self._device2.set_enabled(False)
        self._device2._parameter_controls = None
        self._mixer2.return_strip(0).set_send_controls(None)
        self._mixer2.return_strip(1).set_send_controls(None)
        self._mixer2.return_strip(2).set_send_controls(None)
        super(Codex, self)._deassign_all()

    def _assign_volume(self):
        if self._alt_enabled:
            inputs = self.find_inputs()
            if not inputs is None:
                for index in range(4):
                    self._dial[index][2].connect_to(inputs.parameters[index +
                                                                      1])
                self._dial[6][2].connect_to(inputs.parameters[5])
            xfade = self.find_perc_crossfader()
            if not xfade is None:
                self._dial[7][3].connect_to(xfade)
            self._alt_device_selector.set_matrix(
                self._button_matrix.submatrix[:, 0:2])
            self._alt_device_selector.set_enabled(True)
            self._mixer2.return_strip(0).set_send_controls(
                [None, self._dial[4][2]])
            self._mixer2.return_strip(1).set_send_controls(
                [self._dial[5][2], None])
        else:
            self._alt_send_reset.set_buttons(
                tuple([
                    self._button[4][2], self._button[5][2], self._button[6][2],
                    self._button[7][2]
                ]))
            self._alt_send_reset.set_enabled(True)
            self._mixer2.selected_strip().set_send_controls([
                self._dial[0][2], self._dial[1][2], self._dial[2][2],
                self._dial[3][2]
            ])
            for index in range(3):
                self._mixer2.return_strip(index).set_volume_control(
                    self._dial[index + 4][2])
            self._mixer2.set_crossfader_control(self._dial[7][2])
            self._device1.set_parameter_controls(
                tuple([
                    self._dial[index % 4][int(index / 4)] for index in range(8)
                ]))
            self._device2.set_parameter_controls(
                tuple([
                    self._dial[(index % 4) + 4][int(index / 4)]
                    for index in range(8)
                ]))
            self._device1.set_enabled(True)
            self._device2.set_enabled(True)
            self._find_devices()
            self._device1.update()
            self._device2.update()
            for index in range(8):
                self._mixer2.channel_strip(index).set_select_button(
                    self._column_button[index])
        for index in range(8):
            self._mixer2.channel_strip(index).set_volume_control(
                self._dial[index][3])
            self._mixer2.channel_strip(index).set_mute_button(
                self._button[index][3])
        self._mixer2.update()
        self.request_rebuild_midi_map()
        #self._mixer2.set_track_offset(TROLL_OFFSET)

    def find_inputs(self):
        found_device = None
        tracks = self.song().tracks
        for track in tracks:
            if track.name == 'Inputs':
                for device in track.devices:
                    if bool(device.can_have_chains
                            ) and device.name == 'Inputs':
                        found_device = device
        return found_device

    def find_perc_crossfader(self):
        found_parameter = None
        tracks = self.song().tracks
        for track in tracks:
            if track.name == 'Perc':
                for device in track.devices:
                    if bool(device.can_have_chains) and device.name == 'Perc':
                        for parameter in device.parameters:
                            if parameter.name == 'XFade':
                                found_parameter = parameter
        return found_parameter

    """this method is used to find the devices the alt controls will latch to"""

    def _find_devices(self):
        if self._device1:
            if len(self.song().return_tracks) > 0:
                if len(self.song().return_tracks[0].devices) > 0:
                    if self._device1._locked_to_device:
                        self._device1.set_lock_to_device(
                            False, self._device1._device)
                    self._device1.set_lock_to_device(
                        True,
                        self.song().return_tracks[0].devices[0])
        if self._device2:
            if len(self.song().return_tracks) > 1:
                if len(self.song().return_tracks[1].devices) > 0:
                    if self._device2._locked_to_device:
                        self._device2.set_lock_to_device(
                            False, self._device2._device)
                    self._device2.set_lock_to_device(
                        True,
                        self.song().return_tracks[1].devices[0])
	def update(self):
		MixerComponent.update(self)
		if self._is_enabled:
			self._update_OSD()
 def update(self):
     MixerComponent.update(self)
     if self._update_callback != None:
         self._update_callback()
	def update(self):
		MixerComponent.update(self)
		if self._is_enabled:
			self._update_OSD()
Beispiel #13
0
class Codex(Codec):


	def __init__(self, c_instance, *a, **k):
		self._shifted = False
		super(Codex, self).__init__(c_instance, *a, **k)
		with self.component_guard():
			self._setup_alt_mixer()
			self._setup_alt_device_selector()
			self._setup_alt_send_reset()
			self._setup_alt_device_control()
		self.log_message('<<<<<<<<<<<<<<<<<<<<<<<<< Codex subclass log opened >>>>>>>>>>>>>>>>>>>>>>>>>')
		self.schedule_message(1, self._mode_update)
	

	def _setup_alt_device_selector(self):
		self._alt_device_selector = NewDeviceSelectorComponent(self)
		self._alt_device_selector.name = 'Alt_Device_Selector'
	

	def _setup_alt_send_reset(self):
		self._alt_send_reset = ResetSendsComponent(self)
		self._alt_send_reset.name = 'Alt_Reset_Sends'
	

	"""these two secondary DeviceComponents are only set up if the MONOHM_LINK flag in Map is turned on"""
	def _setup_alt_device_control(self):
		self._device1 = NewDeviceComponent()
		self._device1.name = 'Device_Component1'
		self._device2 = NewDeviceComponent()
		self._device2.name = 'Device_Component2'
	

	def _setup_alt_mixer(self):
		is_momentary = True
		self._num_tracks = (8) #A mixer is one-dimensional
		self._mixer2 = MixerComponent(8, 4, False, False)
		self._mixer2.name = 'Mixer'
		#self._mixer2.set_track_offset(4) #Sets start point for mixer strip (offset from left)
		for index in range(8):
			self._mixer2.channel_strip(index).name = 'Mixer_ChannelStrip_' + str(index)
			self._mixer2.channel_strip(index)._invert_mute_feedback = True
	

	"""Mode Functions"""


	def _enable_alt(self):
		if self._main_mode._mode_index == 0:
			for encoder, _ in self._encoder_matrix.submatrix[:, 0:2].iterbuttons():
				encoder.set_enabled(False)
				encoder.reset()
			self._alt_enabled = True
			self._mode_update()
		super(Codex, self)._enable_alt()
	

	def _disable_alt(self):
		if self._main_mode._mode_index == 0:
			self._button_matrix.submatrix[:, 0:2].reset()
			for encoder, _ in self._encoder_matrix.submatrix[:, 0:2].iterbuttons():
				encoder.set_enabled(True)
		super(Codex, self)._disable_alt()
	

	def _deassign_all(self):
		self._alt_send_reset.set_buttons(None)
		self._alt_send_reset.set_enabled(False)
		self._alt_device_selector.set_buttons(None)
		self._alt_device_selector.set_enabled(False)
		self._mixer2.selected_strip().set_send_controls(None)
		for index in range(8):
			self._mixer2.channel_strip(index).set_volume_control(None)
			self._mixer2.channel_strip(index).set_select_button(None)
			self._mixer2.channel_strip(index).set_mute_button(None)
			self._dial[index][2].release_parameter()
		for index in range(3):
			self._mixer2.return_strip(index).set_volume_control(None)
		self._device1.set_enabled(False)
		self._device1._parameter_controls = None
		self._device2.set_enabled(False)
		self._device2._parameter_controls = None
		self._mixer2.return_strip(0).set_send_controls(None)
		self._mixer2.return_strip(1).set_send_controls(None)
		self._mixer2.return_strip(2).set_send_controls(None)
		super(Codex, self)._deassign_all()
	

	def _assign_volume(self):
		if self._alt_enabled:
			inputs = self.find_inputs()
			if not inputs is None:
				for index in range(4):
					self._dial[index][2].connect_to(inputs.parameters[index+1])
				self._dial[6][2].connect_to(inputs.parameters[5])
			xfade = self.find_perc_crossfader()
			if not xfade is None:
				self._dial[7][3].connect_to(xfade)
			self._alt_device_selector.set_matrix(self._button_matrix.submatrix[:, 0:2])
			self._alt_device_selector.set_enabled(True)
			self._mixer2.return_strip(0).set_send_controls([None, self._dial[4][2]])
			self._mixer2.return_strip(1).set_send_controls([self._dial[5][2], None])
		else:
			self._alt_send_reset.set_buttons(self._button_matrix.submatrix[4:, 2])
			self._alt_send_reset.set_enabled(True)
			self._mixer2.selected_strip().set_send_controls([self._dial[0][2], self._dial[1][2], self._dial[2][2], self._dial[3][2]])
			for index in range(3):
				self._mixer2.return_strip(index).set_volume_control(self._dial[index+4][2])
			self._mixer2.set_crossfader_control(self._dial[7][2])
			self._device1.set_parameter_controls(tuple([self._dial[index%4][int(index/4)] for index in range(8)]))
			self._device2.set_parameter_controls(tuple([self._dial[(index%4)+4][int(index/4)] for index in range(8)]))
			self._device1.set_enabled(True)
			self._device2.set_enabled(True)
			self._find_devices()
			self._device1.update()
			self._device2.update()
			for index in range(8):
				self._mixer2.channel_strip(index).set_select_button(self._column_button[index])
		for index in range(8):
			self._mixer2.channel_strip(index).set_volume_control(self._dial[index][3])
			self._mixer2.channel_strip(index).set_mute_button(self._button[index][3])
		self._mixer2.update()
		self.request_rebuild_midi_map()
		#self._mixer2.set_track_offset(TROLL_OFFSET)
	

	def find_inputs(self):
		found_device = None
		tracks = self.song().tracks
		for track in tracks:
			if track.name == 'Inputs':
				for device in track.devices:
					if bool(device.can_have_chains) and device.name.endswith('Inputs'):
						found_device = device
		return found_device
	

	def find_perc_crossfader(self):
		found_parameter = None
		tracks = self.song().tracks
		for track in tracks:
			if track.name == 'Perc':
				for device in track.devices:
					if bool(device.can_have_chains) and device.name == 'Perc':
						for parameter in device.parameters:
							if parameter.name == 'XFade':
								found_parameter = parameter
		return found_parameter
	

	"""this method is used to find the devices the alt controls will latch to"""
	def _find_devices(self):
		if self._device1:
			if len(self.song().return_tracks) > 0:
				if len(self.song().return_tracks[0].devices) > 0:
					if self._device1._locked_to_device:
						self._device1.set_lock_to_device(False, self._device1._device)
					self._device1.set_lock_to_device(True, self.song().return_tracks[0].devices[0])
		if self._device2:
			if len(self.song().return_tracks) > 1:
				if len(self.song().return_tracks[1].devices) > 0:
					if self._device2._locked_to_device:
						self._device2.set_lock_to_device(False, self._device2._device)
					self._device2.set_lock_to_device(True, self.song().return_tracks[1].devices[0])
	


#
#