zl.group question.
Hi!
Im thinking theres a really simple fix for this, but Im new to the zl.objects, so just looking for some advise.
Im looking for a way to break up the output from a zl.group object. In my patch ive got an input with 64 digits, Im wanting to separate this into 8 separate lists of 8 digits, this is what I get when I print the output to the max console, but when the output from the zl.group goes to a message box I just get the 8th list .
How can I get zl.group to output the separate lists outside of the max console? Hope that makes sense!
Thanks!
It doesn't entirely make sense to me, but I'll try. If you mean that you want to break up the jit.spill object's output into 8 separate lists, this is certainly one way to do it. As to doing it "outside of the Max console," I'm a little confused - the print object is what's sending the results of unpacking the big list to the console, so just put something else in place of the print object (say, a zl reg object or a message box, or just send the lists of 8 things to whatever it is you're patching that works with lists of 8 things). Is that what you're asking?
You only see the 8th list of numbers in the message box is because each time a message goes to its right inlet it overwrites the content of the message, and that happens extremely fast (~instantaneously). So the message box does get all the lists from the zl.group object sent to it, but it only displays whichever list of numbers came last.
Are you trying to display all 64 numbers at once within your patch?
Distributing 64 digits to 8 message boxes?
See two methods in the patch below.
Thanks Max!
Sorry I think I confused things by mentioning the max console, I only bring it up because once the lists are printed to the console it appears the way I had in mind, where as when the output of the zl.group is sent to a message box I only see the last list.
Thanks Tyler, I did think that was what was happening, just couldnt think how to unpack the 8 lists. The zl.slice has worked a treat though.
Thanks friends.
Thanks Peter.
Thats the ticket, thank you so much.
Since your original question started in jitter world, you could also do the slicing and routing in jitter world, depending what you do with the data later...
funny, and a way with spray in list mode
bzzz
Reviving this thread with another zl.group question.
zl.group n seem to split a message in n parts and send them out as separate messages.
How do I recombine these messages back to one large message?
I think it should be very simple, but I can't find the solution here.
zl.group m, m being the initial list's size ?
Oh my.... thanks a lot for this! I never thought of that.
group n will only output the first subset. to iterate the whole list, user iter n.
When investigating Marc's idea, I was myself a bit surprised to see that zl.group and zl.iter give similar results :

Not in all cases ? I don't know.
I think the basic idea behind [zl.group N] is to work with lists smaller than N (to group them as lists of size N), while [zl.iter M] is to iterate through lists bigger than M (to successively slice them in smaller lists of M items). But they've been programmed in a way that make them accept lists bigger than N for group and smaller than M for iter, for convenience I guess?
They work the same, but give different results when both working with lists smaller than their argument:
group´s main feature is to collect successive messages until N is reached, so it is basically the opposite of iter.
it can accept lists in addition, and then it iterates the list elements before (re)grouping them.
for the above use case group only works one time like iter, and only when the length of the input list can be divided by N without rest.

"only when the length of the input list can be divided by N without rest."
yes of course ... and [zl.iter 2]'s last output's length is 1 and not 2 in your example.
Still, [zl.group n] seems to start with a [zl.iter n]-like step before further processing its input.
Of course, depending on your context it can be useful or not. Another good tip to know, anyway !