loadbang and live.thisdevice

endrek's icon

Hi!
I would like to ask, if anyone knows, if for example, I want to have a patch, that it will be used, by both, Live(max4live) and Max6 alone, whenever I need to make a loadbang, I could also put a live.thisdevice, which is the equivalent for max4live right?? So it always initialize, either at MAX or MAX4LIVE

But I think I'm having some troubles with it....can it be??
Or it should work perfectly fine??

Thanks for your help and time.

Cheerz!

Lee's icon

loadbang is called in both MAX and M4L when he patch loads and so can be used to init the patch, but you may not be able to call M4L Apis at this point as it may not have initialised. live.thisdevice lets you know when the M4L Apis are ready to be called.

endrek's icon

LOL
what a newbie...I am hehehe

much appreciate it = ) thank you!! I missunderstood the concept of it = ) = )

jayrope's icon

Lee, the way i understand you is, that it is recommended to use BOTH in an M4L device, which should still be usable outside the Live context?
Thanx for clarification already :)

Venetian's icon

you could connect a [live.thisdevice] into every loadbang you use. These call call when the patch is loaded. you will probably get error messages though if you keep the loadbang.
If you prefer no errors, you could have loadbang or live.thisdevice into a [send ---onloaded], then could choose sepending on max or M4L which you used.

musinou's icon

Used within Max, live.thisdevice functions essentially like the loadbang object. The middle and right outlets are inactive in this case.

So, if you are going to use an object in both Max and Live, just use [live.thisdevice], and do not use any [loadbang].