A way to check if a Max for Live device is in edit mode or not?

Noah Neumark's icon

Is there a way to get the edit mode status of a max for live device? My device uses the "---" wildcard (patch ID) for some logic, and therefore doesn't work in edit mode because Max in edit mode doesn't convert it to a unique ID as it does in Live. If I have a way for Max to check for edit mode, I can substitute the "---" for a static number while I'm editing the device.

11OLSEN's icon

The answer is already in your question. Use "---" in a message box and check if it is a number or just ---

Max Patch
Copy patch and select New From Clipboard in Max.

Noah Neumark's icon

Great thank you. Alternatively, you can use [regexp].

Max Patch
Copy patch and select New From Clipboard in Max.

11OLSEN's icon

Yes, nice. We can reduce it to 2 objects:

Roman Thilenius's icon

oh no, all the cpu cycles wasted here almost make my cry.

[sel int] [route int] should do the same. :)

Noah Neumark's icon

Lol! Didn’t know you could do that!

11OLSEN's icon

@ roman the thing is that the number is a string e.g. "023". So [sel int] would need another [fromsymbol] before it.

Roman Thilenius's icon

okay, so that happens when you live in the past and don´t use [loadmess]. :/

using the famous [110.load] from 1897 or a regular [loadbang]->[i ---] construction would leaves numbers untouched.

(and of course it only works with [route] and not with [select] - seems i did not have enough coffee yesterday)

Roman Thilenius's icon

to be honest, this is 7 objects. but i think it looks funny.


parlez vou =_---__==--- ?

Source Audio's icon

this will work more universally as it does not depend on any --- stuff

;
max getruntime xxx

r xxx will receive load status
0 = loaded as device
1 = opened in max editor