listen to control surface via

Mar 26, 2011 at 6:43pm

listen to control surface via

I’m poking around max for live api, and it seems that it should be possible to observe the values coming from a control surface, but I’m not finding this.
Using the helpfile as an example, I can use the path
path live_set tracks 0 mixer_device volume
to and request property value to get the value of the first track’s volume from the’s outlet.
I’d like to do something similar with a control surface, for example the path
path control_surfaces 0 controls 12
represents, in my case, a SliderElement. However, there is no property “value” that I could observe.
How can I do this?

Now, I realize it is possible to use the midiin object to get these same values, however, that requires the track to be armed, the Track property to be enabled for the controller in the Preferences, and assumes that the Control Surface is MIDI (a fair, but not guaranteed, assumption!).

Mar 27, 2011 at 6:28am

Hey Peter,

You should be able to get the value parameter just like you expect….it won’t show up in the list of properties, though. It’s gettable and watchable with most standard ‘controls’. If you set up an observer, it should report the value sent by the physical control that is linked to it in the Python Script. If not, something isn’t set up correctly in Python, the MIDI control is currently disabled (via Python, i.e. its not currently mapped to forward its value) or you’ve gone awry elsewhere.

What script are you trying to get values from?


Mar 27, 2011 at 3:31pm

Thanks…I’m trying in the monohmpad and the ohm64 script. What am I missing?

– Pasted Max Patch, click to expand. –
Mar 27, 2011 at 11:48pm

Nothing….that patcher works fine for me (except the range of the slider needs to be set to 127. for it to reflect the correct value). It worked out of the box for me. What version of max/live are you using? Maybe something has gotten fubarred lately (my last build was v. 5.21/5.16). Is the script behaving correctly in other regards?


Mar 28, 2011 at 3:46pm

Hm, yeah, now that I try it again, it’s working. Maybe it just needed your approval, or me to not be mixed up? I’m not sure why it didn’t work before. I did notice that I was getting different results for ID’s when I was editing in Max and trying to observe IDs in the (lifesaving!) LiveAPI explorer patch from within live, which was disconcerting.


You must be logged in to reply to this topic.