Forums > Max For Live

Get host application?

May 16 2011 | 2:32 pm

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.

May 16 2011 | 6:55 pm

A main difference is the availability of midi ports. So [midiinfo] will give different results.
Here is an example patch (on Mac).

-- Pasted Max Patch, click to expand. --

May 16 2011 | 7:19 pm

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.

-- Pasted Max Patch, click to expand. --

May 16 2011 | 8:29 pm

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.

May 16 2011 | 8:30 pm

Last outet of live.this_device I think…

May 16 2011 | 11:11 pm

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.

Viewing 6 posts - 1 through 6 (of 6 total)

Forums > Max For Live