What does Pack do?

GV1's icon

I'm on tutorial 2, and I'm a little lost.

What exactly does pack do? I see: pack 0 100. Is this like a timer increments/decrements the value in a slope over the duration of 100 milliseconds?

I'm a little confused on the documentation at this stage in my learning.

Thanks

Chris Muir's icon

One of the basic data types in Max is a list, Pack (as well as several other objects) combine individual things into a list.

GV1's icon

Is a list similar to an array/multi dimensional array in C type programming languages? I'm very familiar with C and Objective-C. I'm guessing list is just a data type.

I think it's best I learn Max before MSP.

xh9o's icon

not that much, arrays are accessible via index by nature while you have to use [zl] methods for treating a list like an array (e.g. via [zl lookup]). a list simply is a list.

for short lists with up to 9 elements you can access it array-like with a message, where $1, $2,...,$9 request the values.

the [coll] object are like 3-dimensional (slot, index, value) arrays for most kind of values.

[table] is like an array but only for integers.