Funneling multiple int values to find which one currently is the maximum
I have searched the forums and google, and was unable to find an appropriate solution. If there is one, I apologize in advance!
I am using ~sigmund for pitch tracking, and have attached the output of the notes to 6 little counting subpatches, each one is looking for specific pitch sets. I then output the carry flag from the counter object and would like a way to have some sort of object compare the 6 carry flag numbers to find which one is currently the highest. With that, I’d like to trigger a series of events based off that particular pitch class. I’ve looked at objects like maximum, peak, coll, and they all don’t seem to do exactly what I’m trying to do. I thank you all for you’re time!
I have attached my patch in progress for illustration.
haven’t looked at your patch, but if you simply need the highest number of a list the following should do the trick
-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 414.3ocyU10aBBCEF9Z3WwI8Z0PKHer61uiEyREpZWfhgVybZ7+9nkRT2TGw OXdAsomygSe6Cu.accPSKWyjH3E3MvwYqqiiIjNficsCpftNMmJMkgJXRIcN CMnImhsVYhSgoPJjALXFLuM6rRgRx2vzUf8F4YCurhIYBEUwKEuWwRUMBvOH otD.iw5IO6.LwdWhUEbQNSYzAYevxUp1n31MfpRWvEyOUyM8MoYQ3AsmmYNG kS+XHFe3APPKLG.zqUbZdallcU80RVS+QHXhNyNWW8vfaDmgP3H8UTb8fGtd fPtNpRF683nJIvu6T06emp+kw71fANxb9IdQ5IK1OCLh6MVHXeVug+BEaxAg ZAfuchPt.QhCLPHhnmrdk3SSjvqgHCt2NDLPfPHA78erVEKXZduY73KYU7eB rJxxJELreLKAwFyRxkLK36hYwzYTNW7yeAZTmN9wvRVtpJsscs+n.1KvLlTw ElO.eXQGUyBdVFyjtkZE7rkkbgxpgy7jqyRx6oSRgcPQ0eODv8Gj5fhB6UF4 +fepUuXm62PhQKzG -----------end_max5_patcher-----------
Thank you so much for the response! I am sorry, I’m new to the forums, what do I have to do to the string of characters into a patch?
MIB you have been so kind! The zl object is exactly what I was looking for! Pardon my ignorance, however, I’d like a way to get the output zl to be a list so i can use the spray object, so I can see which pitchCounter is currently the highest. That way it would be clearer for me to determine what events need to be triggered for the specific pitch class. Any ideas? I’ve been trying variables as messages, dosen’t like to respond to spray. Or perhaps I have the wrong approach with funnel and spray? Thank you again, you’re going to make this possible to perform tomorrow evening!!! (My bad for procrastination!)
i would collect them in a list, and then you can simply use [maximum]
Yes, [maximum] is the way to go. For some reason I can never remember that maximum also handles lists!!! Thanks Roman!
Forums > MaxMSP