Funneling multiple int values to find which one currently is the maximum

maksutovic's icon

Hi Everyone,

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.

2249.Clarinetsigmundpatch3.maxpat
Max Patch
MIB's icon
Max Patch
Copy patch and select New From Clipboard in Max.

haven't looked at your patch, but if you simply need the highest number of a list the following should do the trick

maksutovic's icon

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's icon
maksutovic's icon

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

Roman Thilenius's icon

i would collect them in a list, and then you can simply use [maximum]

MIB's icon

Yes, [maximum] is the way to go. For some reason I can never remember that maximum also handles lists!!! Thanks Roman!