def loadScenesStartUp(self): sceneNumber = 0 ascnm = " " nm = " " all_scenes = LiveUtils.getScenes() for scene in all_scenes: nm = "" if scene.name != None: nm = touchAbleUtils.cut_string2(scene.name) if scene.color == 0: self.oscServer.sendOSC("/scene", (sceneNumber, touchAbleUtils.repr2(nm), 0)) else: self.oscServer.sendOSC("/scene", (sceneNumber, touchAbleUtils.repr2(nm), scene.color)) scene_color = scene.color if sceneNumber == 0: self.oscServer.sendOSC("/color_pallet_start", 1) for x in range(0, 60): try: scene.color_index = x scene1_color = scene.color self.oscServer.sendOSC("/color_pallet", (scene1_color, x - 1)) scene.color = scene_color except: self.oscServer.sendOSC("/color_pallet_done", 1) pass self.oscServer.sendOSC("/color_pallet_done", 1) sceneNumber = sceneNumber + 1
def sendTrackClips(self, trackNumber, track): clipNumber = 0 all_clip_slots = track.clip_slots for clipSlot in all_clip_slots: if clipSlot.clip != None: play = 0 clip = clipSlot.clip if clip.is_playing == 1: play = 1 elif clip.is_triggered == 1: play = 2 elif clip.is_recording == 1: play = 3 if clip.name != None: nm = touchAbleUtils.cut_string2(clip.name) #ascnm = nm.encode('ascii', 'replace') else: nm = " " is_audio_clip = int(clip.is_audio_clip) self.oscServer.sendOSC("/clip", (trackNumber, clipNumber, touchAbleUtils.repr2(nm), clip.color, play,is_audio_clip)) isLooping = int(clip.looping) is_audio_clip = int(clip.is_audio_clip) warp = 0 if is_audio_clip == 1: warp = int(clip.warping) else: pass loop_start = clip.loop_start loop_end = clip.loop_end start = clip.loop_start end = clip.loop_end self.oscServer.sendOSC('/clip/loopstats', (trackNumber, clipNumber, isLooping, start, end, loop_start, loop_end, is_audio_clip, int(warp))) else: play = 0 if clipSlot.has_stop_button == 1: self.oscServer.sendOSC("/clip", (trackNumber, clipNumber,"stop", 2500134, play,int(0))) self.oscServer.sendOSC("/clipslot/stop", (trackNumber, clipNumber)) else: self.oscServer.sendOSC("/clipslot/empty", (trackNumber, clipNumber)) clipNumber = clipNumber + 1
def loadReturnsStartUp(self,selected_track): returnNumber = 0 returnsTotal = len(LiveUtils.getSong().return_tracks) self.oscServer.sendOSC("/returns", (int(returnsTotal), 1)) all_return_tracks = LiveUtils.getSong().return_tracks for retTrack in all_return_tracks: name = retTrack.name color = 0 try: color = retTrack.color except: pass self.oscServer.sendOSC("/return", (int(returnNumber), touchAbleUtils.repr2(name), int(color))) self.oscServer.sendOSC("/return/pan", (returnNumber, float(retTrack.mixer_device.panning.value))) self.oscServer.sendOSC("/return/mute", (returnNumber, int(retTrack.mute))) self.oscServer.sendOSC("/return/crossfade_assign", (returnNumber, int(retTrack.mixer_device.crossfade_assign))) self.oscServer.sendOSC("/return/solo", (returnNumber, int(retTrack.solo))) self.oscServer.sendOSC("/return/volume", (returnNumber, float(retTrack.mixer_device.volume.value))) try: self.sendTrackIO(returnNumber, retTrack, "", 2) except: self.error_log("touchAbleCallbacks: loadReturnsStartUp : sendTrackIO for returns failed") try: self.load_devices_for_track(retTrack, int(returnNumber), int(2)) except: self.error_log("touchAbleCallbacks: loadReturnsStartUp : load_devices_for_track for returns failed") return_tracks_length = len(LiveUtils.getSong().return_tracks) for i in range(return_tracks_length): self.oscServer.sendOSC("/return/send", (returnNumber,i, float(retTrack.mixer_device.sends[i].value))) if retTrack == selected_track: selected_index = returnNumber self.oscServer.sendOSC("/set/selected_track", (2, (selected_index))) returnNumber = returnNumber + 1
def getBrowserItems(self): self.oscServer.sendOSC("/browser/getting_browser", 1) browser = Live.Application.get_application().browser self.oscServer.sendOSC("/browser/got_browser", 1) dir(browser) root_items = [] root_items.append(browser.sounds) root_items.append(browser.drums) root_items.append(browser.instruments) root_items.append(browser.audio_effects) root_items.append(browser.midi_effects) root_items.append(browser.max_for_live) root_items.append(browser.plugins) root_items.append(browser.clips) root_items.append(browser.samples) root_items.append(browser.packs) root_items.append(browser.user_library) self.oscServer.sendOSC("/browser/got_root_items", 1) steps = 1 i = 0 self.oscServer.sendOSC("/browser/start", 1) for item in root_items: is_folder = 1 count = len(item.children) indis = [touchAbleUtils.repr2(item.name), int(steps), int(item.is_loadable), int(count)] indis.append(int(i)) self.oscServer.sendOSC("/browser/item", tuple(indis)) i = i+1 obj = list(browser.user_folders) count = len(obj) indis = ["User folder", int(steps), int(0), int(count)] indis.append(int(i)) self.oscServer.sendOSC("/browser/item", tuple(indis)) i = i+1 a_version = Live.Application.get_application().get_major_version() if a_version >= 10: obj = list(browser.colors) count = len(obj) indis = ["Collections", int(steps), int(0), int(count)] indis.append(int(i)) self.oscServer.sendOSC("/browser/item", tuple(indis)) self.ta_logger("touchAbleCallbacks: getBrowserItems succeeded",5)
def sendTrackIO(self, trackNumber, track, type = "", track_type = 0): #for current_type in ("available_input_routing_channels", "available_input_routing_types", "available_output_routing_channels", "available_output_routing_types", "input_routing_channel", "input_routing_type", "output_routing_channel", "output_routing_type"): input_routing_type_number = 0 input_routing_channel_number = 0 output_routing_type_number = 0 output_routing_channel_number = 0 name = touchAbleUtils.repr2(track.name) if type == "": io_data = [track_type, trackNumber, name, type] if type == "input_routing_type" or type == "": if type != "": io_data = [track_type, trackNumber, name, type] track_input_route_type = track.input_routing_type track_input_route_type_name = track_input_route_type.display_name io_data.append(touchAbleUtils.repr2(track_input_route_type_name)) found_port = 0 types = track.available_input_routing_types length = len(types) input_type = track.input_routing_type for i in range(length): rout_type = types[i] if rout_type == input_type: input_routing_type_number = i io_data.append(input_routing_type_number) found_port = 1 break if found_port == 0: io_data.append(0) if type != "": self.oscServer.sendOSC("/track/io", io_data) if type == "input_routing_channel" or type == "": if type != "": io_data = [track_type, trackNumber, name, type] track_input_routing_channel = track.input_routing_channel track_input_routing_channel_name = track_input_routing_channel.display_name io_data.append(touchAbleUtils.repr2(track_input_routing_channel_name)) found_port = 0 channels = track.available_input_routing_channels length = len(channels) input_channel = track.input_routing_channel for i in range(length): rout_type = channels[i] if rout_type == input_channel: input_routing_channel_number = i io_data.append(input_routing_channel_number) found_port = 1 break if found_port == 0: io_data.append(0) if type != "": self.oscServer.sendOSC("/track/io", io_data) if type == "output_routing_type" or type == "": if type != "": io_data = [track_type, trackNumber, name, type] track_output_route_type = track.output_routing_type track_output_route_type_name = track_output_route_type.display_name io_data.append(touchAbleUtils.repr2(track_output_route_type_name)) found_port = 0 types = track.available_output_routing_types length = len(types) output_type = track.output_routing_type for i in range(length): rout_type = types[i] if rout_type == output_type: output_routing_type_number = i io_data.append(output_routing_type_number) found_port = 1 break if found_port == 0: io_data.append(0) if type != "": self.oscServer.sendOSC("/track/io", io_data) if type == "output_routing_channel" or type == "": if type != "": io_data = [track_type, trackNumber, name, type] track_output_routing_channel = track.output_routing_channel track_output_routing_channel_name = track_output_routing_channel.display_name io_data.append(touchAbleUtils.repr2(track_output_routing_channel_name)) found_port = 0 channels = track.available_output_routing_channels length = len(channels) output_channel = track.output_routing_channel for i in range(length): rout_type = channels[i] if rout_type == output_channel: output_routing_channel_number = i io_data.append(output_routing_channel_number) found_port = 1 break if found_port == 0: io_data.append(0) if type != "": self.oscServer.sendOSC("/track/io", io_data) if type == "available_input_routing_channels" or type == "": if type != "": io_data = [track_type, trackNumber, name, type] channels = track.available_input_routing_channels length = len(channels) io_data.append(length) for i in range(length): rout_type = channels[i] route_name = rout_type.display_name io_data.append(touchAbleUtils.repr2(route_name)) if type != "": self.oscServer.sendOSC("/track/io", io_data) if type == "available_input_routing_types" or type == "": if type != "": io_data = [track_type, trackNumber, name, type] types = track.available_input_routing_types length = len(types) io_data.append(length) for i in range(length): rout_type = types[i] route_name = rout_type.display_name io_data.append(touchAbleUtils.repr2(route_name)) if type != "": self.oscServer.sendOSC("/track/io", io_data) if type == "available_output_routing_channels" or type == "": if type != "": io_data = [track_type, trackNumber, name, type] channels = track.available_output_routing_channels length = len(channels) io_data.append(length) for i in range(length): rout_type = channels[i] route_name = rout_type.display_name io_data.append(touchAbleUtils.repr2(route_name)) if type != "": self.oscServer.sendOSC("/track/io", io_data) if type == "available_output_routing_types" or type == "": if type != "": io_data = [track_type, trackNumber, name, type] types = track.available_output_routing_types length = len(types) io_data.append(length) for i in range(length): rout_type = types[i] route_name = rout_type.display_name io_data.append(touchAbleUtils.repr2(route_name)) if type != "": self.oscServer.sendOSC("/track/io", io_data) if type == "": self.oscServer.sendOSC("/track/io", io_data)
def loadTracksStartUp(self, msg): self.getVersion(1) try: self.loadSetStartup() except: self.error_log("touchAbleCallbacks: loadSetStartup failed") self.oscServer.sendOSC("/bundle/start", 1) self.oscServer.sendOSC("/song/loop", (int(LiveUtils.getSong().loop))) trackTotal = len(LiveUtils.getTracks()) sceneTotal = len(LiveUtils.getScenes()) returnsTotal = len(LiveUtils.getSong().return_tracks) self.oscServer.sendOSC("/set/size", (int(trackTotal), int(sceneTotal), int(returnsTotal))) selected_track = LiveUtils.getSong().view.selected_track selected_index = 0 selected_scene = LiveUtils.getSong().view.selected_scene scene_index = 0 selected_scene_index = 0 all_scenes = LiveUtils.getSong().scenes for sce in all_scenes: if sce == selected_scene: selected_scene_index = scene_index scene_index = scene_index + 1 self.oscServer.sendOSC("/set/selected_scene", int(selected_scene_index+1)) trackNumber = 0 ascnm = " " nm = " " grouptrack = 0 is_midi_track = 0 all_tracks = LiveUtils.getTracks() for track in all_tracks: clipNumber = 0 if track.name != None: nm = touchAbleUtils.cut_string2(track.name) col = 0 try: col = track.color except: pass if track.is_foldable == 1: grouptrack = 1 else: grouptrack = 0 is_midi_track = track.has_midi_input #self.touchAble._log( "track nr" + str(trackNumber), True) live_pointer = "" self.oscServer.sendOSC("/track", (trackNumber, touchAbleUtils.repr2(nm), col, grouptrack, int(is_midi_track),live_pointer)) self.oscServer.sendOSC("/track/volume", (trackNumber, float(LiveUtils.trackVolume(trackNumber)))) self.oscServer.sendOSC("/pan", (trackNumber, float(LiveUtils.trackPan(trackNumber)))) self.oscServer.sendOSC("/track/mute", (trackNumber, int(track.mute))) self.oscServer.sendOSC("/track/solo", (trackNumber, int(track.solo))) self.oscServer.sendOSC("/track/crossfade_assign", (trackNumber, int(track.mixer_device.crossfade_assign))) self.oscServer.sendOSC("/track/is_grouped", (trackNumber, int(track.is_grouped))) self.oscServer.sendOSC("/track/is_visible", (trackNumber, int(track.is_visible))) try: self.sendTrackIO(trackNumber, track, "", 0) except: self.error_log("touchAbleCallbacks: sendTrackIO for track " + str(trackNumber) + "failed") try: self.sendTrackClips(trackNumber,track) except: self.error_log("touchAbleCallbacks: sendTrackClips for track " + str(trackNumber) + "failed") if track.can_be_armed == 1: self.oscServer.sendOSC("/track/arm", (trackNumber, int(track.arm))) self.oscServer.sendOSC("/track/current_monitoring_state", (trackNumber, track.current_monitoring_state)) else: self.oscServer.sendOSC("/track/arm", (trackNumber, 0)) self.oscServer.sendOSC("/track/current_monitoring_state", (trackNumber, 3)) try: self.load_devices_for_track(track, trackNumber, 0) except: self.error_log("touchAbleCallbacks: load_devices_for_track for track " + str(trackNumber) + " failed") return_tracks_length = len(LiveUtils.getSong().return_tracks) for i in range(return_tracks_length): self.oscServer.sendOSC("/track/send", (trackNumber,i, float(LiveUtils.trackSend(trackNumber, i)))) if track == selected_track: selected_index = trackNumber self.oscServer.sendOSC("/set/selected_track", (0, (selected_index))) trackNumber = trackNumber + 1 #sleep(0.02) try: self.load_devices_for_track(LiveUtils.getSong().master_track, int(1), int(1)) except: self.error_log("touchAbleCallbacks: load_devices_for_track for master_track failed") if LiveUtils.getSong().master_track == selected_track: self.oscServer.sendOSC("/set/selected_track", (1)) try: self.loadReturnsStartUp(selected_track) except: self.error_log("touchAbleCallbacks: loadReturnsStartUp failed") self.oscServer.sendOSC("/done", (1)) self.oscServer.sendOSC("/finish_loading", (1)) self.oscServer.sendOSC("/bundle/end", (1)) try: #self.oscServer.sendOSC("/NSLOG_REPLACE", ("setid 0")) setid = LiveUtils.getSong().get_data("setid", "") #self.oscServer.sendOSC("/NSLOG_REPLACE", ("setid 1")) if setid == "": #setid = self.my_random_string() setid = "no setid" LiveUtils.getSong().set_data("setid", setid) #self.oscServer.sendOSC("/NSLOG_REPLACE", ("setid 2")) else: pass #self.oscServer.sendOSC("/NSLOG_REPLACE", (str(setid))) self.oscServer.sendOSC("/setid", (str(setid))) #self.oscServer.sendOSC("/NSLOG_REPLACE", ("setid 3")) except: #self.oscServer.sendOSC("/NSLOG_REPLACE", ("setid -2")) setid = touchAbleUtils.my_random_string() #self.oscServer.sendOSC("/NSLOG_REPLACE", ("setid -3")) LiveUtils.getSong().set_data("setid", setid) #self.oscServer.sendOSC("/NSLOG_REPLACE", ("setid -4")) self.oscServer.sendOSC("/setid", (str(setid))) self.loading = 0 if self.should_check_if_load == 1: trackTotal2 = len(LiveUtils.getTracks()) sceneTotal2 = len(LiveUtils.getScenes()) returnsTotal2 = len(LiveUtils.getSong().return_tracks) if (trackTotal != trackTotal2 or sceneTotal != sceneTotal2 or returnsTotal != returnsTotal2): self.touchAble.error_log("load is needed") self.should_check_if_load = 0 self.tracksCB(msg)
def expand_multi_sampler(self, device): try: device_parameters = device.parameters for parameter in device_parameters: if parameter.name == 'Osc On': try: old_value = parameter.value parameter.value = 1 parameter.value = old_value except: self.error_log("touchAbleCommon: expand device " + touchAbleUtils.repr2(device.name) + " failed to set Osc On") elif parameter.name == 'Pe On': try: old_value = parameter.value parameter.value = 1 parameter.value = old_value except: self.error_log("touchAbleCommon: expand device " + touchAbleUtils.repr2(device.name) + " failed to set Pe On") elif parameter.name == 'Shaper On': try: old_value = parameter.value parameter.value = 1 parameter.value = old_value except: self.error_log("touchAbleCommon: expand device " + touchAbleUtils.repr2(device.name) + " failed to set Shaper On") elif parameter.name == 'L 1 On': try: old_value = parameter.value parameter.value = 1 parameter.value = old_value except: self.error_log("touchAbleCommon: expand device " + touchAbleUtils.repr2(device.name) + " failed to set L 1 On") elif parameter.name == 'L 2 On': try: old_value = parameter.value parameter.value = 1 parameter.value = old_value except: self.error_log("touchAbleCommon: expand device " + touchAbleUtils.repr2(device.name) + " failed to set L 2 On") elif parameter.name == 'L 3 On': try: old_value = parameter.value parameter.value = 1 parameter.value = old_value except: self.error_log("touchAbleCommon: expand device " + touchAbleUtils.repr2(device.name) + " failed to set L 3 On") elif parameter.name == 'Ae On': try: old_value = parameter.value parameter.value = 1 parameter.value = old_value except: self.error_log("touchAbleCommon: expand device " + touchAbleUtils.repr2(device.name) + " failed to set Ae On") elif parameter.name == 'F On': try: old_value = parameter.value parameter.value = 1 parameter.value = old_value except: self.error_log("touchAbleCommon: expand device " + touchAbleUtils.repr2(device.name) + " failed to set F On") elif parameter.name == 'Fe On': try: old_value = parameter.value parameter.value = 1 parameter.value = old_value except: self.error_log("touchAbleCommon: expand device " + touchAbleUtils.repr2(device.name) + " failed to set Fe On") else: pass except: self.error_log( "touchAbleCommon: expand device expand_multi_sampler " + touchAbleUtils.repr2(device.name) + " failed to set F On On")
def expand_simpler(self, device): expand_failed = 0 try: device_parameters = device.parameters for parameter in device_parameters: if parameter.name == 'Pe On': try: old_value = parameter.value if old_value == 0: parameter.value = 1 parameter.value = old_value except: self.error_log("touchAbleCommon: expand device " + touchAbleUtils.repr2(device.name) + " failed to set Pe On") expand_failed = 1 elif parameter.name == 'L On': try: old_value = parameter.value if old_value == 0: parameter.value = 1 parameter.value = old_value except: self.error_log("touchAbleCommon: expand device " + touchAbleUtils.repr2(device.name) + " failed to set L On") expand_failed = 1 elif parameter.name == 'Fe On': try: old_value = parameter.value if old_value == 0: parameter.value = 1 parameter.value = old_value except: self.error_log("touchAbleCommon: expand device " + touchAbleUtils.repr2(device.name) + " failed to set Fe On") expand_failed = 1 elif parameter.name == 'F On': try: old_value = parameter.value if old_value == 0: parameter.value = 1 parameter.value = old_value except: self.error_log("touchAbleCommon: expand device " + touchAbleUtils.repr2(device.name) + " failed to set F On On") expand_failed = 1 else: pass except: self.error_log("touchAbleCommon: expand device expand_simpler " + touchAbleUtils.repr2(device.name) + " failed to expand device parameter assignment") if expand_failed == 1: self.error_log("touchAbleCommon: expand device expand_simpler " + touchAbleUtils.repr2(device.name) + " failed failed at any step") elif expand_failed == 0: message = 'a message from hell' self.ta_logger( "touchAbleCommon: expand device expand_simpler " + touchAbleUtils.repr2(device.name) + " succedded at every step", 4)
def send_update_for_device(self, device, track, tid, did, type, num, number_of_steps, indices, i): message = "send_update_for_device for track: " + str( tid) + " and device: " + str(device.name) self.ta_logger(message, 4) """ try: self.expand_device(device) #message = "expand_device here failed for track: " + str(tid) + " and device: " + str(device.name) #self.ta_logger(message, 4) except: self.error_log("tochAbleCommon failed expanding:" + touchAbleUtils.repr2(device.name)) pass """ if i != -1: indices.append(int(i)) number_of_steps = number_of_steps + 1 elif i == -1 and number_of_steps == 0: indic = [] indices = list(indic) nm = touchAbleUtils.repr2(device.name) params = device.parameters onoff = params[0].value numParams = len(params) cnam = touchAbleUtils.repr2(device.class_name) tr = tid dev = did name = track.name devicename = device.name is_selected = 0 if device == LiveUtils.getSong().appointed_device: is_selected = 1 po = [type] po.append(int(tr)) po.append(int(dev)) po2 = [type] po2.append(int(tr)) po2.append(int(dev)) po2.append(touchAbleUtils.repr2(name)) po2.append(touchAbleUtils.repr2(devicename)) po2.append(int(is_selected)) po.append(int(number_of_steps)) po2.append(int(number_of_steps)) po4 = [type] po4.append(int(tr)) po4.append(int(dev)) po4.append(int(number_of_steps)) po5 = [type] po5.append(int(tr)) po5.append(int(dev)) po5.append(int(number_of_steps)) for index in range(number_of_steps * 2): po.append(int(indices[index])) po2.append(int(indices[index])) po4.append(int(indices[index])) po5.append(int(indices[index])) for j in range(len(params)): po.append(params[j].min) po.append(params[j].max) po.append(params[j].is_quantized + 1) po2.append(float(params[j].value)) po2.append(touchAbleUtils.repr2(params[j].name)) po2.append(touchAbleUtils.repr2(params[j].__str__())) po4.append(int(params[j].is_enabled)) automation_state = 0 if params[j].automation_state: automation_state = params[j].automation_state po4.append(int(automation_state)) reset_value = -13337.0 if params[j].is_quantized == 0: reset_value = float(params[j].default_value) po5.append(float(reset_value)) try: can_have_chains = device.can_have_chains except: can_have_chains = 0 try: can_have_drumpads = device.can_have_drum_pads and device.has_drum_pads and device.class_name == 'MultiSampler' or device.class_name == "DrumGroupDevice" except: can_have_drumpads = 0 live_pointer = str(device._live_ptr) if type == 0: po3 = [ type, tid, did, nm, onoff, int(num), numParams, int(can_have_drumpads), cnam, int(can_have_chains), number_of_steps ] for index in range(number_of_steps * 2): po3.append(int(indices[index])) if can_have_drumpads or can_have_chains: po3.append(int(device.has_macro_mappings)) po3.append(str(live_pointer)) self.oscServer.sendOSC('/track/device', (tuple(po3))) self.oscServer.sendOSC("/device/range", tuple(po)) self.oscServer.sendOSC("/track/device/parameters", tuple(po2)) self.oscServer.sendOSC("/track/device/parameters/enabled", tuple(po4)) self.oscServer.sendOSC("/track/device/parameters/default_value", tuple(po5)) if can_have_drumpads: drum_pads_tuple = [type, tid, did, number_of_steps] for index in range(number_of_steps * 2): drum_pads_tuple.append(int(indices[index])) drum_pads_tuple.append(int(len(device.drum_pads))) for drum_pad in device.drum_pads: drum_pads_tuple.append(int(drum_pad.note)) drum_pads_tuple.append(touchAbleUtils.repr2(drum_pad.name)) drum_pads_tuple.append(int(drum_pad.mute)) drum_pads_tuple.append(int(drum_pad.solo)) #self.oscServer.sendOSC("/NSLOG_REPLACE", (str("SENDING DRUMPAD"), touchAbleUtils.repr2(drum_pad.name))) self.oscServer.sendOSC("/track/device/drumpads", tuple(drum_pads_tuple)) elif type == 2: po3 = [ type, tid, did, nm, onoff, int(num), numParams, int(can_have_drumpads), cnam, int(can_have_chains), number_of_steps ] for index in range(number_of_steps * 2): po3.append(int(indices[index])) po3.append(live_pointer) self.oscServer.sendOSC('/return/device', (tuple(po3))) self.oscServer.sendOSC("/device/range", tuple(po)) self.oscServer.sendOSC("/return/device/parameters", tuple(po2)) self.oscServer.sendOSC("/return/device/parameters/enabled", tuple(po4)) elif type == 1: po3 = [ type, 0, did, nm, onoff, int(num), numParams, int(can_have_drumpads), cnam, int(can_have_chains), number_of_steps ] for index in range(number_of_steps * 2): po3.append(int(indices[index])) po3.append(live_pointer) self.oscServer.sendOSC('/master/device', (tuple(po3))) self.oscServer.sendOSC("/device/range", tuple(po)) self.oscServer.sendOSC("/master/device/parameters", tuple(po2)) self.oscServer.sendOSC("/master/device/parameters/enabled", tuple(po4)) if device.class_name == 'OriginalSimpler': try: self.touchAble.tAListener.simplerListener.update_simpler_parameters( device, track, tid, did, type, number_of_steps, indices) except: self.error_log( "tochAbleCommon: update_simpler_parameters failed") a_version = Live.Application.get_application().get_major_version() if a_version >= 10: try: self.touchAble.tAListener.compressorListener.update_compressor_parameters( device, track, tid, did, type, number_of_steps, indices) except: self.error_log( "tochAbleCommon: update_compressor_parameters failed") try: self.touchAble.tAListener.wavetableListener.update_wavetable_parameters( device, track, tid, did, type, number_of_steps, indices) except: self.error_log( "tochAbleCommon: update_wavetable_parameters failed") try: self.touchAble.tAListener.pluginListener.update_plugin_parameters( device, track, tid, did, type, number_of_steps, indices) except: self.error_log( "tochAbleCommon: update_plugin_parameters failed") if can_have_chains == 1: for chain_id in range(len(device.chains)): chain = device.chains[chain_id] indis = list(indices) indis.append(int(chain_id)) po3 = [ type, tid, did, touchAbleUtils.repr2(chain.name), number_of_steps ] for index in range(number_of_steps * 2 + 1): po3.append(int(indis[index])) self.oscServer.sendOSC('/device_chain', (tuple(po3))) for device_id in range(len(chain.devices)): dev = chain.devices[device_id] lis = list(indis) self.send_update_for_device(dev, track, tid, did, type, len(chain.devices), number_of_steps, lis, device_id)