Questions about closebang in M4L

to_the_sun's icon
Max Patch
Copy patch and select New From Clipboard in Max.

I'm wondering if closebang goes off if it's in a device when you load a new Live set. From what i've seen it seems to for some things, but maybe can't be expected to do anything too complicated in that time-frame? That doesn't really seem right so maybe there's just something up with my code. In my example here i'm trying to get the contents of the coll to save with the set. It works if you hit the button before you load a different set, but otherwise it doesn't. The closebang seems to print but not do the rest. Anyone see something i missed?

to_the_sun's icon

I'm thinking now it's because by the time the closebang goes off the device has already “closed” and the pattr is no longer checking for changes in its bound object? Can anyone with more knowledge than i confirm this statement to be true? Working on this assumption, i tried instituting a metro which would periodically save things; so far it's not going so well, for other very confusing reasons: https://cycling74.com/forums/whats-wrong-with-this-text/

I have to believe that i'm not even close to the first person to try to save the contents of a coll with the set, so how has it been accomplished before?

chapelier fou's icon

Reviving this topic, if you don't mind.

It seems that [closebang] will not work "properly" in M4L devices.

For instance, I'm sending sysex messages to change the names on my Faderfox EC4 controller. When I close the live set, I'd like to clear the names, but it won't work, as if Max "doesn't have the time" to do it.

Any thoughts ?

to_the_sun's icon

Maybe it's actually freebang that you want, rather than closebang? I don't remember what my issue was back then or if I ever solved it.

Roman Thilenius's icon

closebang often does not do what one thinks it does, also in max runtime. unlike loadbang it has to reside in the main patcher and the main patcher has to be technically open. and even if you take this into account it can become difficult sometimes.