Page 1 of 1

make object inactive

Posted: 03 Jun 2014 20:20
by UniFly
Hi,

How to make object inactive(off) with special button? Maybe by using On expression script line? I guess it will be quite simple task, but can't find the way some time.

Re: make object inactive

Posted: 04 Jun 2014 11:02
by Softcore
Do you wish to switch an object off or do you want it to NOT respond to touches?

Re: make object inactive

Posted: 04 Jun 2014 18:10
by UniFly
I'm talking not about object hiding and showing like in this example:

::: On Expression :::
if(x== 0) {
show(myProgramChange,0);
} else if (x == 1) {
show(myProgramChange,1);
}

I want to switch object off/disable MIDI data.

Re: make object inactive

Posted: 04 Jun 2014 18:19
by Softcore
There are many ways to achieve this.....

Either use a custom expression that can be ignored

Or use a custom midi out with a custom expression that can be ignored

or use a scripted output - ctlout(target, cc, val, channel)

or just show-hide a canvas object ABOVE the object you want to disable

Re: make object inactive

Posted: 04 Jun 2014 18:32
by Softcore
And here are the four examples - each one has its pros and cons.....figure them out! ;)

Re: make object inactive

Posted: 05 Jun 2014 15:09
by UniFly
Thanks again n again Softcore!
;)

OnExpression script seems better, it will not send 0 value when enabling.