def serialize_device_paramater(param): if param is None: return None device_paramater_id = Interface.save_obj(param) return { "id": device_paramater_id, "name": param.name, "value": param.value, "is_quantized": param.is_quantized }
def serialize_clip(clip): if clip is None: return None clip_id = Interface.save_obj(clip) return { "id": clip_id, "color": clip.color, "is_audio_clip": clip.is_audio_clip, "is_midi_clip": clip.is_midi_clip, }
def serialize_device(device): if device is None: return None device_id = Interface.save_obj(device) return { "id": device_id, "name": device.name, "type": str(device.type), "class_name": device.class_name, }
def serialize_clip_slot(clip_slot): if clip_slot is None: return None clip_slot_id = Interface.save_obj(clip_slot) return { "id": clip_slot_id, "color": clip_slot.color, "has_clip": clip_slot.has_clip, "is_playing": clip_slot.is_playing, "is_recording": clip_slot.is_recording, "is_triggered": clip_slot.is_triggered }
def serialize_track(track): if track is None: return None track_id = Interface.save_obj(track) return {"id": track_id, "name": track.name, "color": track.color}
def duplicate_clip_to(self, ns, slot_id): return ns.duplicate_clip_to(Interface.get_obj(slot_id))
def serialize_scene(scene): if scene is None: return None scene_id = Interface.save_obj(scene) return {"id": scene_id, "name": scene.name, "color": scene.color}
def select_device(self, ns, device_id): return ns.select_device(Interface.get_obj(device_id))