Forums > MaxMSP

zlmaxsize inconsistency ?

April 29, 2008 | 5:31 pm

hi there, unless i am doing something wrong, i am getting strange behaviours with the zlmaxsize feature .

when sending a long list to a zl group ( previously set to accept lists > 256 items ) and retrieving the lists length via [zl len] leaves to inconsistent results .

sending smaller lists seems to work fine , on bigger list the object seems to get stuck on a previously set zlmaxsize.
results are very inconsistent so i can’t figure out any pattern making sense .
patch attached

osx10.4.11
max5.0.1


April 29, 2008 | 5:51 pm

Two problems in your patch:

1. zlmaxsize needs to be sent to zl len as well

2. The output of your [t i i] should be reversed (i.e. Set the zlmaxsize *first* then set the group size. Remember Max’s right to left ordering convention)

To be honest, I would recommend that unless you are using *thousands* of zl objects (yes you know who you are), that you just set the maximum list size arg to something high (e.g. 4096), and leave it rather than dynamically changing the max list size. It will save you a lot of max programming.

For example a zl group command with a mazimum list size of 4096 and a default grouping size of 512 would be set as follows:

zl 4096 group 512

for zl len, it would be:

zl 4096 len

Hope this helps.

-Joshua


April 29, 2008 | 8:43 pm

Quote: jkc wrote on Tue, 29 April 2008 19:51
—————————————————-
>
> Two problems in your patch:
>
> 1. zlmaxsize needs to be sent to zl len as well

yes i thought so
>
> 2. The output of your [t i i] should be reversed (i.e. Set the zlmaxsize *first* then set the group size. Remember Max’s right to left ordering convention)

of course , blame/shame combo on me :)

>
> To be honest, I would recommend that unless you are using *thousands* of zl objects (yes you know who you are), that you just set the maximum list size arg to something high (e.g. 4096), and leave it rather than dynamically changing the max list size. It will save you a lot of max programming.
>
> For example a zl group command with a mazimum list size of 4096 and a default grouping size of 512 would be set as follows:
>
> zl 4096 group 512
>
> for zl len, it would be:
>
> zl 4096 len
>
> Hope this helps.

thanks this definetly helps
thanks again for your great work guys,
i am having a good time discovering all these nice/well thought little features

>
> -Joshua
>
>
>
—————————————————-


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