Forums > MaxMSP

Strange behaviour from toggle? Or bang?

May 15, 2010 | 10:59 am

Check out the simple patch below. What is happening to the bang object below the toggle object? Nothing (I thought) is happening to the toggle object until the ">= 0.95" is true, when it becomes "1", yet the bang object seems to be triggered all the time while toggle is set to "0" (check float objects to the left).

It seems I have misunderstood how either toggle or bang behaves, but, again, I thought nothing was being output from toggle until the state change from "0" to "1", and back again.

– Pasted Max Patch, click to expand. –

May 15, 2010 | 11:24 am

This should explain it

– Pasted Max Patch, click to expand. –

May 15, 2010 | 1:41 pm

This used to confuse me for a while too; until i read the [>=] object’s helpfile: it is continually assessing the input and returning a zero or one. What you do with the result is up to you, merely connecting a [toggle] or [bang] will result in continuous activity, misleading us into thinking that the expression is always true – it’s not, it’s always either true or false. I simply added a [select 1] to your patch:

– Pasted Max Patch, click to expand. –

Brendan


Viewing 3 posts - 1 through 3 (of 3 total)