Hello friends!
I am looking to capture a list of OSC messages that obtain the device names (effects or instruments) of a selected track on Ableton Live. For this purpose, I am using the following objects from Ableton Live (obtained through the LOM / Live API).
song.view.selected_track.devices [0] .class_display_name
song.view.selected_track.devices [1] .class_display_name
song.view.selected_track.devices [2] .class_display_name
song.view.selected_track.devices [3] .class_display_name
This information shows the name of the effects or instruments in a text widget for a control interface that I am developing on my iPad.
If the selected track contains 4 effects or instruments, I can get the message on the iPad screen with the name of the effect or instrument correctly in the text widgets, as shown in the image below.
However, for example: if the selected track contains only 3 devices, instead of the message that should be corresponding to the missing device, I do not receive a message like “null” or even an “empty” message (which would serve my purpose). When the track has only 3 devices, what is displayed in the message regarding the missing device is exactly the same syntax as the Ableton Live API, that is, as you can see below: song.view.selected_track.devices [3].class_display_name.
I believe it is an inconsistency of the Live API itself. The absence of this object should be automatically detected. But, as we can see, this is not the case.
I wonder if through O-S-C I can solve this problem. Is it possible to assign a script that replaces OSC messages that have characters like “.”, “_” Or “[]” for a specific message like “Missing device”?