zl group to create very long list

Jack James's icon

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

Luke Hall's icon

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.

Jack James's icon

Thanks Luke,

thats great!

Jack

Emmanuel Jourdan's icon

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

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

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.

Floating Point's icon

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

David Butler's icon

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.

Jack James's icon

-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

Roman Thilenius's icon

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.

David Butler's icon

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.

Emmanuel Jourdan's icon

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.

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

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

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

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?

Christopher Dobrian's icon

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.

Jack James's icon

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...

seejayjames's icon

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...

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

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

Jack James's icon

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

Tiago Morgado's icon

use Lbuild of Lobjects library.. much easier

Emmanuel Jourdan's icon

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

Christopher Overstreet's icon

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.

lysdexic's icon

Awesome info here, wonder if this should be in the zl help file?