Coll table Index

Rob Chafer's icon

I have set up a small patch working with 30 coll tables. The information is in two data sets, an integer and symbol. I need to put index numbers at the beginning of each line so I can access lines on demand but unfortunately, if I use the renumbering message, it actually replaces the integer values, rather than prepend them (so to speak). is there a way around this? Second question, similar topic - another set of similar coll tables were collated with index numbers per line, but some lines needed to be removed, thus leaving missing numbers out of the sequence. Is there any way to reset this so that all number are consecutive?

Thanks, Rob

Floating Point's icon

not exactly sure what you require, but this patch shows you how to enter data into a coll with an index:

Max Patch
Copy patch and select New From Clipboard in Max.

re second question, i think you just need to use the renumber message

Rob Chafer's icon

Hi Floating Point,

Thanks for your reply and a really tidy little patch there! Nice.

There problem I have is that I already have the data sets in tables.

If I renumber, it wipes out the first line of data and replaces with index.

There are thousands of lines so a lot of time wasted if I need to correct manually :(.

Onve more, thank you very much though. Cheers Rob

Rick's icon

Try this with your data

Max Patch
Copy patch and select New From Clipboard in Max.

Rob Chafer's icon

Thats great Rick, all lines indexed! One slight issue, strangely it reversed all the data so what was originally th first line, became the bottom line and visa versa (the information in each line though was unaffected) - many thanks though! big help.

Rick's icon

Add a (sort -1 1) message

Max Patch
Copy patch and select New From Clipboard in Max.

Rob Chafer's icon

Hi Rick, once more thanks a million!! Its oddly not quite there as its renumbering now in order, but deleting or missing the top line off?? That said, its put me in a position I can easily put that in myself and address that. I'm second year degree student in the uk and Really appreciate both yours and Floating Points help -

Rob Chafer's icon

Just to let you know Rick, the fault was in the clock time, some how it was reading them in the wrong order at time. Easy to sort manually though :)

Rob Chafer's icon

Minor update: the ordering issue was the [sort -1 1] . Its was getting confused with the clock setting. I changed it to [sort -1 0] so it arranged the first set of data in order and worked at treat! Thanks again, all the best - Rob