live.observer vs. framework(midiRemoteScripts)

Dec 19, 2013 at 7:58am

live.observer vs. framework(midiRemoteScripts)

Hi,
I need to monitor the existence of clips in a 16 Track x 4 Clip grid. This will be used to control status LEDs on a floorboard, either by cc or note, doesn’t matter. I know how to do this w/ live.observer, or perhaps by iterating through the tracks/clips and checking for id=0. My (limited) experience is that the live.observer route is strewn w/ deferlow potholes, especially in light of the fact that this is part of a much bigger device (a looper) that has a lot going on api-wise. I suspect there might be some tricky timing issues re: scanning through the 64 clips for id=0, etc. It seems to me that the framework/midiRemoteScripts must already have this functionality since all the “grid-style” controllers seem to have bidirectional communication with the Live clip grid. I don’t know any python, but do I have to? Anyone been down this road who can advise on the wisdom of these various approaches? Needless to say, it has to be robust, since it is for live performance. Really appreciate any insight. Thanks, and Merry Christmas.

#276212
Dec 22, 2013 at 6:02am

If you are just monitoring and not calling back into the api, you shouldn’t hit any defer issues.

At startup, go through the clip slots, get the current status and then set up an observer so you know if it changes. There won’t be any timing issues with this, apart from the odd few ms here and there, which doesn’t seem to be an issue for your application…?

#276427
Dec 22, 2013 at 7:00am

Thanks for the reply. Here’s my concern: What is the resource impact of 64 simultaneous observers, vs. somehow integrating a nested loop to scan the 64 clip slots every 100ms or so? I’ve tried to look into the various decompiled python MIDI Control Scripts on the web, and with my nonexistent python knowledge, I haven’t been able to find the code whereby “the clip grid can be observed permanently” (according to Julien Bayle). What I need seems bone-simple to me: Have whatever api/framework function that is able to “observe” a defined x-by-y grid, give me a notification when the has_clip property has changed for any clip in the grid, give me the clip address, and allow me to define the MIDI command that is sent upon the status change for that clip. Ideally, without me having to code any iterations, worry about interrupts, or missing any other time critical i/o events. This “has_clip” status is not millisecond-critical. All I need it for is to tell me, while I’m looking down at a looper control footswitch board, which tracks/scenes are available for new recording.

#276431

You must be logged in to reply to this topic.