detecting max for live

    Nov 08 2010 | 8:41 pm
    I have a patch I'd like to use in M4L or in Max. I'd like to know if it is used in m4l or in max, as there are different demands from each scenario on the patch. My solution is pasted below, but, for whatever weird scheduling quirks, it doesn't work, since the last "b" out out of the "t b b 1" actually arrives *before the 0 that is triggered from live.path. It only seems to do this in the context of being used in Live - I can test it while editing the device, and the gate closes in time. So are there other ways to detect if you are in M4L or not?? something like the ";max getruntime" message?

    • Nov 08 2010 | 11:08 pm
      I think you could just bang a [live.path live_set] object. If it delivers some output you are in M4L, otherwise not.
    • Nov 08 2010 | 11:55 pm
      yeah, that's what I'm basically doing in the above patch, but the problem is, the timing is screwy. I just found I can get it to work if I deferlow the last bang (imagine that, "deferlow fixes it" !!). I'm pretty sure it's ok for this project, but if I had other stuff that I needed from that bang that I didn't want to deferlow, I'd be outta luck.
    • Nov 09 2010 | 4:20 pm
      I think this is the easiest way to achieve this; simply check the id of the current device. If it has any its a m4l device and otherwise its max. This should also make sure you don't need to defer signals or such: