testing for bang

halsallian's icon

is there a way to test for a bang?

and kind of related - is there a way to test for non-numeric data?

all the operators seem to work for numeric only.

thx

FP's icon

do you mean [sel bang] or [route bang] ?

halsallian's icon

I suppose it's route bang - basically I want to switch on a record~ object with non-zero but the thing that's coming down the patch cord is a bang.

So I will test for bang and if it's a bang then change to a 1 to enable the record~.

broc's icon

In this case you could simply send the bang to a [1] message box or a [t 1] object.

dtr's icon

you can also bang a toggle to switch it on and off

halsallian's icon

Broc again - I can't understand what the [t 1] object means???

But I was using a toggle but the toggle retains it's state so only every 2nd click of the start button starts the record~ object.

What I then did was to bang the toggle again after recording has finished to reset it but this seems more complex than it should be.

Mark Durham's icon

[t 1] is short for the [trigger] object, you can write it [trigger 1] or just [t 1]. It's super useful - check out the help file. [t 1] will output a 1 with any input.

halsallian's icon

cool thx

halsallian's icon

Can't do that when I don't have access to live or max.

halsallian's icon

I am at work - sorry - didn't mean to sound rude!

halsallian's icon

I know - I tried looking up [t 1] and [t]
in the online docs - but that cannot be found of course.

If I had been at home I would have typed it into a patch and then it would have been clearer - anyway - I am pretty new to max as you can see.

Hopefully won't be bothering you all too much after all your kind help.

halsallian's icon

Works great. Thanks all.