oberving subpatcher behavior

Apr 15, 2011 at 6:24pm

oberving subpatcher behavior

I’m wondering if there’s a way to observe whether or not a subpatcher is open? Say, if it is open, it outputs a 1, if not, zero. I’m a little lost. Thanks.

#56358
Apr 15, 2011 at 10:25pm

The easiest way that I can think of is to use a little javascript. Throw this in a js object:

function bang()
{
outlet(0, this.patcher.wind.visible)
}

It will output a 0 if the patcher window is not visible, and a 1 if visible. If you want to “observe” it, one way is to set up a Task function to do this.

-Ben

#202163
Apr 16, 2011 at 12:30am

thanks. the deeper i go, the more i realize i need to learn some js. got any idea on how i can do this as effectively as possible w/o spending $? Thanks.

#202164
Apr 16, 2011 at 2:39am

Hey, I got the js object straightened out and it works, but i have to input the code every time i open the patch. I know nothing of js. Can you help? Thanks.

#202165
Apr 16, 2011 at 3:42am

nevermind. check out the “active” object. exactly what i wanted.

#202166

You must be logged in to reply to this topic.