Comparing two numbers?
I am trying to make a patch that will determine whether two frequencies are equal or not. My current patch is below, but what I'm trying to do at the moment is get a green light if they ARE equal, and a red light if they're not.. but currently I'm getting a red light when they are equal, and the green light's doing nothing. It's quite likely my if object which at the moment is "if $i1==$i2 then bang else out2 bang" but I've tried a few various methods, and looked through the help files and nothing seems too obvious!
Very grateful for any help!
I can't test your patch because I don't have max 5 but it's pretty simple to do.
Here are two simple ways.
You need to remove "out1" from your [if] object. If you open the Max window, you will see that you are getting an error message with your current configuration.
BTW, here's a way to do it without using an [if] object AND so that it evaluates even if only one number changes.
Thank you, that was all really helpful!
I had started off without the out1, but when it didn't work I added it - no error though, but it clearly wasn't working!
I've now managed to get everything working the way it should though, thank you for your help