Having trouble with Collection and Trigger

Jan 25, 2012 at 5:56pm

Having trouble with Collection and Trigger

Hi, I am a student and we were told to make a patch that generates 50 random numbers out of 500 numbers, store the 50 unsorted data into a collection, sort it, and then output the sorted number into the max window all using a single click. I got most of it done but I am having trouble when it comes to sorting the numbers out. For some reason, the first number of the collection is never sorted so it will be like 0, 146 and everything else is sorted and renumbered. Is there a fix to this? I am pretty new to max and we are barely being to learn the basics. I am uploading the patch if anyone could help

Attachments:
  1. Random50.maxpat
#61455
Jan 25, 2012 at 6:45pm

The problem is in the order of the insert, sort and renumber phases. There’s no reason to do the sort/renumber with each new random number. You can do that at the end, driven from Uzi’s done banging bang.

#221722
Jan 25, 2012 at 6:57pm

My professor told me something similar in an email but I am still having some trouble with it. I am going to try to play around with it a bit more. By the way thank you so much for replying! I am pretty new to Max and as a student its nice to know the community is here to help.

#221723
Jan 25, 2012 at 7:29pm

Finally got it, thank you so much! Now to figure out how to use dump to print the sorted data to the max window

#221724
Jan 25, 2012 at 8:02pm

Nice to see you here Katherz – your professor reads the forum. Glad you are making progress.

#221725
Jan 25, 2012 at 8:03pm

Hehe thank you Jesse :)

#221726

You must be logged in to reply to this topic.