Dumping coll including index into a list?

R_Gol's icon

Assuming I have a coll object with few indexes and certain values - how can I dump them into a list. Not only the data but also the index number associate with its data.
so if my coll object have the following:
0, 55;
1, 553;
2, 33;
3 hi;

when pressing on the 'dump' message it will output the above into a list.
Thanks

Jean-Francois Charles's icon

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

Roman Thilenius's icon


or if total lenght is known, [zl group].

Source Audio's icon

what a nonesense ...
coll outputs index first , then data.
Not as stated on that screenshot ... another very helpfull information ?
All one needs to fill the list is to insert append.

because - index first, followed by data.
Patch from Jean-Francois needs just a little correction
because also index can be a symbol


Jean-Francois Charles's icon

Well spotted, the index can be a symbol, indeed!

Andy Maskell's icon

Here's another method using zl.group:

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

Source Audio's icon

@andy
Only stupid thing is that you forgot to fix the patch you posted which still shows
unneeded reversal of the list and wrong statement about output order.
Someone could download it and take it for true...

R_Gol's icon

Is there a nice way of showing the dump data from coll not inside a message object?

so every index will be in a new line
(patch is attached)
rather then option 1 in which all content is following in the same line, it will be like in option 2 in which each index and is associate data will be in a new line.

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

pdelges's icon

Maybe like this :

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

Andy Maskell's icon

I've used this method before, using chooser, to create debugging lists:

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

Andy Maskell's icon

Or use this version if your coll items have more than one value per entry:

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