示例#1
0
	def _get_track_mixer_parameters(self):
		if self._troll_mode():
			if self._troll_submodes.selected_mode == 'Strip':
				mixer_params = []
				if self._tracks_provider.selected_item:
					mixer = self._tracks_provider.selected_item.mixer_device
					rets = list(self.song.return_tracks)[:4]
					returns = [ret.mixer_device.volume for ret in rets]
					mixer_params = [mixer.volume] + list(mixer.sends[:4]) + returns[:4]
				return mixer_params
			elif self._troll_submodes.selected_mode == 'FX1':
				mixer_params = []
				if self._tracks_provider.selected_item:
					if len(self.song.return_tracks) and len(self.song.return_tracks[0].devices):
						mixer_params = [None] + list(self.song.return_tracks[0].devices[0].parameters[1:9])
			elif self._troll_submodes.selected_mode == 'FX2':
				mixer_params = []
				if self._tracks_provider.selected_item:
					if len(self.song.return_tracks)>1 and len(self.song.return_tracks[0].devices):
						mixer_params = [None] + list(self.song.return_tracks[1].devices[0].parameters[1:9])
			elif self._troll_submodes.selected_mode == 'Inputs':
				mixer_params = [None]
				if self._tracks_provider.selected_item:
					inputs = self.find_inputs()
					if inputs:
						mixer_params += list(inputs.parameters[1:5])
					returns = self.song.return_tracks
					if len(returns) >= 2:
						mixer_params += [returns[0].mixer_device.sends[1], returns[1].mixer_device.sends[0]]
					mixer_params += [self.find_perc_crossfader()]
			return mixer_params
		else:
			return TrackMixerControlComponentBase._get_track_mixer_parameters(self)
示例#2
0
文件: AumPush2.py 项目: amuntner/m4m7
	def _update_scroll_offset(self):
		if self._troll_mode():
			new_number_return_tracks = self._number_sends()
			self._update_controls()
			self._update_scroll_buttons()
			self._number_return_tracks = new_number_return_tracks
		else:
			return TrackMixerControlComponentBase._update_scroll_offset(self)
示例#3
0
	def _update_scroll_offset(self):
		if self._troll_mode():
			new_number_return_tracks = self._number_sends()
			self._update_controls()
			self._update_scroll_buttons()
			self._number_return_tracks = new_number_return_tracks
		else:
			return TrackMixerControlComponentBase._update_scroll_offset(self)
示例#4
0
文件: AumPush2.py 项目: amuntner/m4m7
	def _scroll_controls(self, delta):
		if self._troll_mode():
			num_return_tracks = self._number_sends()
			self._scroll_offset = clamp(self._scroll_offset + delta, 0, 2)
			self.notify_scroll_offset()
			self._update_controls()
			self._update_scroll_buttons()
		else:
			return TrackMixerControlComponentBase._scroll_controls(self, delta)
示例#5
0
文件: AumPush2.py 项目: amuntner/m4m7
	def _update_scroll_buttons(self):
		if self.is_enabled():
			if self._troll_mode():
				num_return_tracks = self._number_sends()
				self.scroll_right_button.enabled = self._number_sends() and self._scroll_offset < 2
				self.scroll_left_button.enabled = self._scroll_offset > 0
				self._update_view_slots()
			else:
				return TrackMixerControlComponentBase._update_scroll_buttons(self)
示例#6
0
	def _scroll_controls(self, delta):
		if self._troll_mode():
			num_return_tracks = self._number_sends()
			self._scroll_offset = clamp(self._scroll_offset + delta, 0, 2)
			self.notify_scroll_offset()
			self._update_controls()
			self._update_scroll_buttons()
		else:
			return TrackMixerControlComponentBase._scroll_controls(self, delta)
示例#7
0
	def _update_scroll_buttons(self):
		if self.is_enabled():
			if self._troll_mode():
				num_return_tracks = self._number_sends()
				self.scroll_right_button.enabled = self._number_sends() and self._scroll_offset < 2
				self.scroll_left_button.enabled = self._scroll_offset > 0
				self._update_view_slots()
			else:
				return TrackMixerControlComponentBase._update_scroll_buttons(self)
示例#8
0
文件: AumPush2.py 项目: amuntner/m4m7
	def _get_track_mixer_parameters(self):
		if self._troll_mode():
			mixer_params = []
			if self._tracks_provider.selected_item:
				mixer = self._tracks_provider.selected_item.mixer_device
				rets = list(self.song.return_tracks)[:4]
				returns = [ret.mixer_device.volume for ret in rets]
				mixer_params = [mixer.volume] + list(mixer.sends[:4]) + returns[:4]
			return mixer_params
		else:
			return TrackMixerControlComponentBase._get_track_mixer_parameters(self)