Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/s/e/Selected_Track_Control-HEAD/SessionControl.py   Selected_Track_Control(Download)
			("select_track", self.select_track),
 
			("prev_scene", lambda value, mode, status: self.scroll_scenes(-1, MIDI.RELATIVE_TWO_COMPLIMENT, MIDI.CC_STATUS)),
			("next_scene", lambda value, mode, status: self.scroll_scenes(1, MIDI.RELATIVE_TWO_COMPLIMENT, MIDI.CC_STATUS)),
			("prev_track", lambda value, mode, status: self.scroll_tracks(-1, MIDI.RELATIVE_TWO_COMPLIMENT, MIDI.CC_STATUS)),
			("next_track", lambda value, mode, status: self.scroll_tracks(1, MIDI.RELATIVE_TWO_COMPLIMENT, MIDI.CC_STATUS)),
 
			("create_scene_at", self.create_scene_at), # creates scene at value of MIDI message
			("create_scene_before", lambda value, mode, status: self.create_scene_at(0, MIDI.RELATIVE_TWO_COMPLIMENT, MIDI.CC_STATUS)),
			("create_scene_after", lambda value, mode, status: self.create_scene_at(1, MIDI.RELATIVE_TWO_COMPLIMENT, MIDI.CC_STATUS)),
 

src/s/e/Selected_Track_Control-HEAD/DeviceControl.py   Selected_Track_Control(Download)
			("prev_device_bank", self.prev_device_bank),
			("next_device_bank", self.next_device_bank),
			("reset_device_bank", lambda value, mode, status: self.select_device_bank(0, MIDI.ABSOLUTE, MIDI.CC_STATUS)),
 
 
	def prev_device_bank(self, value, mode, status):
		if status == MIDI.CC_STATUS and not value:
			return
		self.select_device_bank(-1, MIDI.RELATIVE_TWO_COMPLIMENT, MIDI.CC_STATUS)
 
	def next_device_bank(self, value, mode, status):
		if status == MIDI.CC_STATUS and not value:
			return
		self.select_device_bank(1, MIDI.RELATIVE_TWO_COMPLIMENT, MIDI.CC_STATUS)

src/s/e/Selected_Track_Control-HEAD/GlobalControl.py   Selected_Track_Control(Download)
	def toggle_track_collapsed(self, value, mode, status):
		# ignore CC toggles (like on LPD8)
		if status == MIDI.CC_STATUS and not value:
			return
 
	def stop_playing(self, value, mode, status):
		if status == MIDI.CC_STATUS and not value: # ignore 0 values from CC-pads
			return
		self.song.stop_playing()
	def start_playing(self, value, mode, status):
		if status == MIDI.CC_STATUS and not value: # ignore 0 values from CC-pads
			return
		self.song.start_playing()
	def continue_playing(self, value, mode, status):
		if status == MIDI.CC_STATUS and not value: # ignore 0 values from CC-pads
	def play_stop(self, value, mode, status):
		if status == MIDI.CC_STATUS and not value: # ignore 0 values from CC-pads
			return
		if self.song.is_playing:
			self.song.stop_playing()

src/s/e/Selected_Track_Control-HEAD/MixerControl.py   Selected_Track_Control(Download)
	def toggle_auto_arm(self, value, mode, status):
		if status == MIDI.CC_STATUS and not value:
			return
		settings.auto_arm = not settings.auto_arm
 
	def toggle_arm(self, value, mode, status):
		if status == MIDI.CC_STATUS and not value:
			return
		# toggle exclusive depending on settings
		self.toggle_arm_track(self.song.view.selected_track, self.song.exclusive_arm)
	def toggle_arm_exclusive(self, value, mode, status):
		if status == MIDI.CC_STATUS and not value:
	def arm_kill(self, value, mode, status):
		if status == MIDI.CC_STATUS and not value:
			return
		for t in self.song.tracks:
			if t.can_be_armed:
				t.arm = False
 
	def arm_flip(self, value, mode, status):
		if status == MIDI.CC_STATUS and not value:

src/s/e/Selected_Track_Control-HEAD/SelectedTrackControl.py   Selected_Track_Control(Download)
		callbacks = self.midi_callbacks.get(channel,{}).get(status,{}).get(key,[])
		mode = MIDI.ABSOLUTE
		if status == MIDI.CC_STATUS:
			# get mode and calculate signed int for MIDI value
			mode = self.suggest_map_mode(key)

src/s/e/Selected_Track_Control-HEAD/QuantizationControl.py   Selected_Track_Control(Download)
	def clip_trigger_quantization(self, value, mode, status):
		if status == MIDI.CC_STATUS and not value: # ignore 0 values from CC-pads
			return
 
		self.song.clip_trigger_quantization = self._get_quantization(value, mode, status, self.song.clip_trigger_quantization, settings.clip_trigger_quantization_steps)
 
 
	def midi_recording_quantization(self, value, mode, status):
		if status == MIDI.CC_STATUS and not value: # ignore 0 values from CC-pads
	def _get_quantization(self, value, mode, status, current_quantization, quantizations):
		nr_of_quantizations = len(quantizations)
 
		if status == MIDI.CC_STATUS and mode == MIDI.ABSOLUTE:
			return quantizations[nr_of_quantizations*value/128]

src/s/e/Selected_Track_Control-HEAD/ParamSetter.py   Selected_Track_Control(Download)
def general_device(song, device, param, value, mode, status):
	param_range = param.max - param.min
	#log("set %s (%s): %s - %s" % (param.name, param.value, param.min, param.max))
	if param.is_quantized:
		if status == MIDI.CC_STATUS and mode == MIDI.ABSOLUTE:

src/s/e/Selected_Track_Control-HEAD/ViewControl.py   Selected_Track_Control(Download)
	def toggle_view(self, value, mode, status, view):
		if status == MIDI.CC_STATUS and not value: # ignore 0 values from CC-pads
			return
 
		if status == MIDI.CC_STATUS and mode == MIDI.ABSOLUTE:
	def toggle_detail(self, value, mode, status, view):
		if status == MIDI.CC_STATUS and not value: # ignore 0 values from CC-pads
			return
 
		if status == MIDI.CC_STATUS and mode == MIDI.ABSOLUTE: