How to add data you don't know what type is to a list

Jonas Magnussen's icon

Hey guys!

So I tried to search for a solution to this problem, but no luck so far.

As the title says, I need to add a piece of data to a list, and it could be anything from a bang, to a list, float, int or symbol. I attached a little patch to show you what I would like to be possible. In fact, I would like the solution to work exactly like a pack object. I tried solutions with "append" and a message box with "set $1" above it, which works for most things, but is bad for lists. Anyone got a universal solution here?
I would really appreciate a solution ASAP, since I'm kinda on a deadline here!

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

If anyone is curious, I'm using this for a patch that does automation of parameters in max, together with the Transport object.

Nikolas K's icon

Look into the "zl join" object.

to_the_sun's icon
Max Patch
Copy patch and select New From Clipboard in Max.

[join] is generally more flexible than [pack].

The only downside is you can't list default values for the elements.

Jonas Magnussen's icon

That definitely did the trick!

The downside you are talking about is a good thing for my patch to_the_sun, [join] is perfect here! Thanks a lot guys.

metamax's icon

Example of routing different data-types:

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