Now that ^^ is a much neater way of doing it! Like in Ben's example, you just need to remove ! from the if statement. ! means logical "not", so using ! in the if object is like using a NAND gate, and you remove it if you just want an AND.....which is what && means.
Thanks to your help, I can prevent the system from stopping or from cpu overload.
Listening to my patch made me want to do one more thing with the logic circuit.
Here is the situation:
I have connected the following circuit to five vst instrument to prevent them to stop
Listening to the patch made me want to add one more circuit. I would like to build a second one which in case of only one instrument is playing will give a bang. So "if only one of five is on->bang.
I want to send the bang to a random object with argument 5 attached to a gate of five attached to the five vst's.
Now the catch is that it can happen to send the band to the one which is on and would turn it off. That is the worst case, but how can I tell gate, or any other object which of the five is on and in that case to send the bang to one which is off?
It needs something that updates the state of the five vst's.....
I've had a go so hopefully I understood what you need. It's not the best way of doing it either, I know that; but someone else will chip in with a better solution which I look forward to! I've not got enough time to patch about for a while till it works.
I could live without a random object too. As long as a second instrument will be switched on avoiding to switch off the remaining, it will be fine.
What interests me a lot about this patch is the fact that it seems to 'be conscious' about it's own state and I would like to explore that a little bit more. Maybe building a sort of 'consciousness object'......