Get host application?
Hi, is there a way for my M4L device to find out whether it is opened in Max (for editing) or in Live?
Thanks, ALEXander.
A main difference is the availability of midi ports. So [midiinfo] will give different results.
Here is an example patch (on Mac).
I don't run M4L here so I don't know what this will do. However, you could try running this in each environment and seeing what happens - you might need regex or something to deal with th output if it works.
For some reason the 'max sendapppath' message doesn't seem to work.
It gives me the same path in each environment, namely path to Max5.
Last outet of live.this_device I think...
I've just checked that [live.thisdevice] last outlet delivers following states:
0: device in editor non-preview mode
1: device in editor preview mode (default)
1: device in performance mode
So unfortunately, it doesn't just separate editor vs. performance mode.