Get host application?

May 16, 2011 at 2:32pm

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.

May 16, 2011 at 6:55pm

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 at 7:19pm

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 at 8:29pm

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 at 8:30pm

Last outet of live.this_device I think…

May 16, 2011 at 11:11pm

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.


You must be logged in to reply to this topic.