Strange behaviour from toggle? Or bang?

oivindi's icon

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).

Max Patch
Copy patch and select New From Clipboard in Max.

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.

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

This should explain it

brendan mccloskey's icon

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:

Max Patch
Copy patch and select New From Clipboard in Max.

Brendan