zl size question
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.
the order of arguments to patches and objects do always matter.
[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.
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.
Try this, it works for me (Mac OS 10.4.11, Max 5.1.4).
-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 620.3oc0VtsiZCCDF95vSwnbc1U1NGHT0Vop9Jz6pVUYRLf6lXiRbZorZe2q OP3zFJA1P21av3wNI+ym87a+zHO+oxUrZe3cvWAOumF44YCYB3soumeIcUVA s1NM+RVcMcNyOvMlhsRYiShSZiwysQjS+9c3z1fyjBkfVxrC8oJNsncDYipf oT+ZIyoCee3gMCsjpxVvEy+VEKS4FkDkdOJ.HnIllPx8wA.VGZ6yX9P0701W FlnmjKrnojKzeGaVP1Ez80sQwlfOOZj4mfdhiLYYISndAN9xBlH.pYEZgC+f Vzvpg2+APSIfJxgOZ928sOUAWvxjMB09ZaeJlbdJ1EpvHCiviirM3XKwhtPV g6jUnAjUetfm8HTxfY7pZEnjPVEipX.EJ35.ypjk.FtCvHRT+gV3UAsPjCZt 8W3vn2XnIX+TmMufYqKrz.lWIaV1UgG9ZJ7BNSwWXzj8J9RCccFjhOxUvlS4 EEiPcgDzf6EMI4eIunSgCbm3X3clQg+OPiXDtCZjL7mS4JUlXRTH1Yp71Qio MJkTzQhGcxzaJUL+O6FrIqhHs9.G4FzCKQ7vYI1rla8D6HIIWwpqM8C10xMm zzCZL1VEDmLfdigC+4FER4icevws3bCRpayQr8JHoo2nyMruN6ECN5JsVIYh eHvpkMUYsIQ60UgcpJmUq3Bphqqb1aRGLmE77blc3VQWxyWJ06V1nAR7XiSH Iz4GjNYaO3gNWW6qX0apAx4z5EJ1P8IZF4gvVO73zs8dkh8HgbZxh6uXesRB M7K1gn3ayh8sXiIlbazZeVpS9qtTG0CEQtL5cfhzcddzuogc7UB -----------end_max5_patcher-----------
thanks, that looks like it matches my implementation … i am starting to think this is another m4l glitch.
Nevermind, I answered my own question.
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!
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 ;-)
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).
Forums > MaxMSP