zl group to create very long list

Nov 12, 2011 at 12:40pm

zl group to create very long list

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

#59971
Nov 12, 2011 at 1:42pm

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.

#215915
Nov 12, 2011 at 1:57pm

Thanks Luke,

thats great!

Jack

#215916
Nov 12, 2011 at 3:51pm

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

#215917
Nov 12, 2011 at 5:49pm

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. –
#215918
Nov 12, 2011 at 11:35pm

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

#215919
Nov 13, 2011 at 12:00am

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.

#215920
Nov 13, 2011 at 1:51pm

-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

#215921
Nov 13, 2011 at 4:10pm

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.

#215922
Nov 13, 2011 at 4:51pm

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.

#215923
Nov 13, 2011 at 6:17pm

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.

#215924
Nov 13, 2011 at 6:40pm

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. –
#215925
Nov 14, 2011 at 9:00pm

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. –
#215926
Nov 15, 2011 at 4:24am

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.

#215927
Nov 15, 2011 at 11:17am

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…

#215928
Nov 15, 2011 at 2:12pm

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. –
#215929
Nov 16, 2011 at 11:31am

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

#215930
Nov 19, 2011 at 6:02pm

use Lbuild of Lobjects library.. much easier

#215931
Nov 21, 2011 at 12:08pm

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

#215932
Sep 7, 2013 at 4:30pm

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.

#264623

You must be logged in to reply to this topic.