simple logic pt. 2
Hi
forgive me for thinking aloud, how do I say (in Max):
"if any pair of numbers contains an integer > 0 then bang when that pair is received" e.g. 0-1, 2-0, 6-0, 1-2 BANG".
This small simple patch is the context
Thanks all
Brendan
Sorry for the noise:
[zl stream 2] ===> [unpack i i] ===> [*] ===> [> 0]
Tutors Feedback Report:
Must try harder!!
Solved, but in a cumbersome inelegant way; tried [timer], [counter], every [zl] object under the Sun. This uses [if], plus a [delay 5] to reset it:
Haven't had a Max challenge like this in a while...(thinks)....must be losin' my edge....
Brendan
don't [zl] objects clear their stored stuff with a (zlclear) message or wotnot?
Also this isn't what you're looking for I don't think but hey.....
Hey thanks for this, it introduces some ideas I didn't think of, especially where the list exceeds 2 ints.
Brendan
The problem is essentially that you're trying to milk state out of a message that only has time (bang.)
Cheers Chris
I guess I was looking for an object with two cold inlets, which could assess the three possible permutations: 1-0; 0-1; 1-1. Your (stop) message to [onebang] is the closest I'll get. Thanks
Brendan
Maybe buddy would give you the behavior you seek?
Hi Christopher, and thanks for updating my own Max lexicon!
most times Max brings me joy; occasionally though, it causes major headaches - because I'm staring at a broken algorithm, fully aware that there's a simple solution - an object, a combination of objects - that will fix it.
In the case of my toggles' states, I solved it with [*] ==> [togedge]; which does exactly what [&&]andChris' version of [onebang] do too in this context.
Happy Hertz Day (according to Google)
Brendan
ps I forgot to leave a space between andand and and and Chris...........:)