Forums > MaxMSP

zl size question

July 18, 2010 | 4:50 am

Does the order of zl arguments matter? For instance, I need to specify a zl lookup with a size of 1024, is this the correct format: "zl 1024 lookup"??? I keep have this very odd error which seems to be related to the size of a zl where upon restore a zl only process the 256th zl value.


July 18, 2010 | 4:59 am

the order of arguments to patches and objects do always matter.


July 18, 2010 | 5:08 am

[zl 1024 lookup] should be right. That sets the list length at 1024 (the default is 256). You still need to tell it which item to lookup in the list with an integer message into the left inlet.


July 18, 2010 | 4:24 pm

Everything works fine as long as I do a lookup for anything < = 256, it is when I attempt to do a lookup on a value that exceeds the 256th element that it ends up defaulting to 256 which leads me to believe it is an issue with a zl. But they all appear to have the length specified correctly.


July 18, 2010 | 5:30 pm

Try this, it works for me (Mac OS 10.4.11, Max 5.1.4).

– Pasted Max Patch, click to expand. –

July 18, 2010 | 5:38 pm

thanks, that looks like it matches my implementation … i am starting to think this is another m4l glitch.


July 18, 2010 | 7:31 pm

Nevermind, I answered my own question.


July 18, 2010 | 9:37 pm

i found the source of my problem … i am saving the number via pattr as a int which in max for live cannot exceed 255. Funnily enough, normal operation, it works fine, only upon restore of a live set does the value get clipped at 255!


July 19, 2010 | 6:34 am

I’m not sure I completely understand what your problem is, but the parameter type int is indeed limited to the range 0-255. You have to use float for larger ranges. I’m don’t really see what this as to do with zl though ;-)


July 19, 2010 | 8:53 pm

@Emmanuel

Well, you are right, that is why I posted a response that absolved zl … i had list of parameters for a max device that exceeds 700+, I was storing the selected parameter (index>255) in a pattr object of type int. upon restore of the patch, I am reloading the list of parameters and then attempting to lookup the parameter via index in zl from the pattr but the number I stored get’s clipped at 255, so my lookup was failing in the zl. I initially thought my problem was with zl because earlier in the week I found that zl defaulted to 256, but I couldn’t find any misconfigured zl, which is why I posted initially. In the end it was the int max value (which I always assumed was greater then 255).


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