Getting real-time parameter feedback from M4L devices


    Mar 15 2020 | 2:54 pm
    Howdie all.
    So I've been refactoring a bunch of my bits of code as M4L for general purpose reuse (and for sharing), which for my own purposes I would always use inside Max itself.
    This is working great so far BUT one thing that I haven't figured out how to do yet is to get instant parameter feedback when tweaking things in the device. This is mainly for use with mapping and UI stuff, where I want to be able to control the params within the device from within Max, but I also want to know the status of the parameters inside the device to update controllers and UI elsewhere for when I manually alter things in the device with my mouse/keyboard.
    I know it's possible to ‘getvalue {paramname}’ to poll them, but unless I'm not understanding something, I'd have to constantly spam the device, and all its parameters if I want to see if something has changed.
    Is there not a way to have some kind of parameter "listening" happening where when a param is changed, it dumps out the new value?

    • Mar 16 2020 | 10:46 am
      How about using [live.observer]?
    • Mar 16 2020 | 10:54 am
      Unless I'm not understanding the helpfile, it only works inside a M4L device, where I'd already be able to parse or get that information.
      The main thing I'd like to be able to do is know when a param has changed while using a M4L device inside Max.
    • Mar 16 2020 | 10:56 am
      Basically to avoid having to do stuff like this for each parameter, and each device.
    • Mar 16 2020 | 12:14 pm
      I've found that M4L devices inside Max can communicate via send/receive. So adding send messages within the M4l devices seems a possible solution.
    • Mar 16 2020 | 12:24 pm
      Hmm. I guess that's an option, though it would be tricky to keep track of that for an arbitrary amount of devices and parameters.