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

May 14, 2011 at 4:43pm

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

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.

#57127
May 14, 2011 at 6:23pm

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. –
#204617
May 14, 2011 at 6:40pm

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?

#204618
May 14, 2011 at 6:43pm
#204619
May 14, 2011 at 7:02pm

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

#204620
May 14, 2011 at 7:20pm

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

#204621
May 15, 2011 at 6:27pm

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

#204622

You must be logged in to reply to this topic.