Example #1
0
	def _on_selected_scene_changed(self):
		ControlSurface._on_selected_scene_changed(self)
		#self.log_message('scene offset: ' + str(self._session._scene_offset))
		for index in range(6):
			if self._session._scene_offset == self._scene_indexes[self._scene_bank][index][0]:  ## and self._session._scene_offset < self._scene_indexes[index + 1]:
				self._menu[index].turn_on()
			else:
				self._menu[index].turn_off()
Example #2
0
 def _on_selected_scene_changed(self):
     ControlSurface._on_selected_scene_changed(self)
     #self.log_message('scene offset: ' + str(self._session._scene_offset))
     for index in range(6):
         if self._session._scene_offset == self._scene_indexes[
                 self._scene_bank][index][
                     0]:  ## and self._session._scene_offset < self._scene_indexes[index + 1]:
             self._menu[index].turn_on()
         else:
             self._menu[index].turn_off()
Example #3
0
 def _on_selected_scene_changed(self):
     """This is an override, to add special functionality (we want to move the session to the selected scene, when it changes)"""
     """When making changes to this function on the fly, it is sometimes necessary to reload Live (not just the script)..."""
     ControlSurface._on_selected_scene_changed(
         self
     )  # This will run component.on_selected_scene_changed() for all components
     """Here we set the mixer and session to the selected track, when the selected track changes"""
     selected_scene = self.song(
     ).view.selected_scene  #this is how we get the currently selected scene, using the Live API
     all_scenes = self.song().scenes  #then get all of the scenes
     index = list(all_scenes).index(
         selected_scene
     )  #then identify where the selected scene sits in relation to the full list
     self.session.set_offsets(
         self.session._track_offset, index
     )  #(track_offset, scene_offset) Set the session's scene offset to match the selected track (but make no change to the track offset)
Example #4
0
 def _on_selected_scene_changed(self):
     ControlSurface._on_selected_scene_changed(self)