Forums > MaxMSP

zl group to create very long list

November 12, 2011 | 12:40 pm

Hi Everyone,

Does zl group have a maximum number of elements it can combine into a single list?

Is that number 75?

I’m trying to create very long lists which I will be able to copy and paste into another programme.

Is there anything out there that might be able to help me?

Thanks

Jack


November 12, 2011 | 1:42 pm

The default length is 256, you can extend this up to about 32768 list items by specifying it as an argument before the [zl] mode: [zl 2048 group 1234] for example.


November 12, 2011 | 1:57 pm

Thanks Luke,

thats great!

Jack


November 12, 2011 | 3:51 pm

in max 6, you can also write [zl.group 1234 @zlmaxsize 2048].


November 12, 2011 | 5:49 pm

Another tip that may or may not be useful, you can specify the zl group size as -1, which will cause the the inputed elements to be continuously added to the list and outputted when a bang is sent or when the maximum list length is reached. This is quite useful for joining an unspecified number of lists, for example, when dumping data from a coll.

– Pasted Max Patch, click to expand. –

November 12, 2011 | 11:35 pm

The -1 feature does not seem to be documented anywhere. Wish I’d known about it earlier.


November 13, 2011 | 12:00 am

I’m not sure if it’s so much a feature, more giving the object an argument which it logically can never reach, therefore preventing the automatic output from functioning.


November 13, 2011 | 1:51 pm

-1 argument is very useful, dumping information from a coll is exactly what I’m trying to do. Now I’m having problems with message and comment boxes, I think its because I’ve got too many elements in the list. Is the an argument I need to add somewhere?

Jack


November 13, 2011 | 4:10 pm

we dont know if it is not eventually possible to reach -1 when you only count upwards long enough.

i think one day you an reach -1, i am just not sure if it will be int or float.


November 13, 2011 | 4:51 pm

If the limit of zl list lengths is 32768 then you will never reach -1 as the list will be outputted and the buffer length reset to 0 when you hit this value.


November 13, 2011 | 6:17 pm

actually there’s nothing specific about the -1, the argument defines the number of items to group. -1 is obviously not a lot ;-) David’s example works the same without it.


November 13, 2011 | 6:40 pm

Since the OP mentioned the desire to copy the collected items and paste them into another application, maybe the capture object is appropriate.

– Pasted Max Patch, click to expand. –

November 14, 2011 | 9:00 pm

I thought the capture object was going to be perfect for what I wanted to do but unfortunately when I format the text with a comma after each element and then try to view the text Max crashes. Does this happen to anyone else?

– Pasted Max Patch, click to expand. –

November 15, 2011 | 4:24 am

Yes, I can confirm that it crashes Max 6 for me, too.

The comma is a special reserved character in Max messages, serving to divide a message into separate messages. For example, the message "foo, baz, boogers" in a message box will send out three separate messages, one word each. (You may already have known that, but strangely, mention of that important fact seems to no longer exist anywhere in the Max docs.) So apparently your commas are confusing the heck out of capture.

It shouldn’t crash, though. I suggest submitting a bug report.


November 15, 2011 | 11:17 am

I will do, its a bit of a frustration through as I’m in the middle of a project and didn’t expect writing a long list of numbers to be an overly complicated task…


November 15, 2011 | 2:12 pm

Confirmed crash here on XP, Max 5.1.8, with only two values in [capture]

Not good…

I made an example with [text] that pretty much works, though interestingly if you put the commas in, the [cr] function won’t show up in the output. Can’t quite figure out why…

If you’re pasting into Excel or similar, you could use tabs instead, and import that way.

– Pasted Max Patch, click to expand. –

November 16, 2011 | 11:31 am

Thanks, the text example you made object works well. Much appreciated


November 19, 2011 | 6:02 pm

use Lbuild of Lobjects library.. much easier


November 21, 2011 | 12:08 pm

@jack‘s problem has been fixed for the next incremental. Thanks for finding it.


September 7, 2013 | 4:30 pm

Can we ever expect the maximum size limit on zl objects to be greater than 32768? Yes I know there are plenty of work-around, I have to use them often.


Viewing 20 posts - 1 through 20 (of 20 total)