home/ atoms/ abletonosc-song-track-data-implementation

The track_data handler uses a dot-namespace format to query track, clip, clip_slot, or device properties in a single call

The song_get_track_data function in song.py accepts properties in a dot-namespace format: track.name, clip.name, clip.length, clip_slot.has_clip, device.name. It splits each property on ’.’ to dispatch to the correct Live object. For clip properties it iterates all clip slots in order, appending None for empty slots. For track.num_devices it uses len(track.devices) rather than a direct attribute. This function is the bridge between a single flat OSC response and Live’s nested object tree — the caller receives a flat list and must parse it knowing the track range and property order.

Examples

song.py: track_index_min, track_index_max, *properties = params; for track_index in range(…): for prop in properties: obj, property_name = prop.split(’.’); …

Assessment

What value does track_data return for a clip_slot.has_clip on an empty slot? If you request track.num_devices and clip.name together for 4 tracks, describe the structure of the returned flat list.

“Retrieve one more properties of a block of tracks and their clips. Properties must be of the format track.property_name or clip.property_name.”
corpus · abletonosc-osc-control-interface-for-ableton-live-live-objec · chunk 33