listen to control surface via

    Mar 26 2011 | 6:43 pm
    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 pathpath 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 pathpath 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 | 6:28 am
      Hey Peter,
      You should be able to get the value parameter just like you 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 | 3:31 pm
      Thanks...I'm trying in the monohmpad and the ohm64 script. What am I missing?
    • Mar 27 2011 | 11:48 pm
      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 | 3:46 pm
      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.