Forums > MaxMSP

scale bottle-lag?

June 23, 2009 | 2:08 pm

hi,
I always used iter/scale/group to scale my lists, now with very large and fast input-lists (up to 4096, see patch) could it be a bottle-lag? Is vexpr much more faster? What’s the vexpr formula for simple linear scaling?
I know the Lobjects, but I try not to use 3rdParty objects if possible…

big thx,
johann

– Pasted Max Patch, click to expand. –

June 23, 2009 | 3:31 pm

Try:
[vexpr ($f1-$f2)*($f5-$f4)/($f3-$f2) + $f4 @scalarmode 1]
Jean-François.


June 23, 2009 | 3:42 pm

I don’t think [vexpr] can handle lists that long but I might be mistaken.

lh


June 23, 2009 | 4:35 pm

It sure can (>= 5.0.6). You can also have a look to my ej.lscale.


June 23, 2009 | 4:37 pm

big thx!
works fine even with very big ones!


June 23, 2009 | 4:41 pm

Ah, that would be the problem, I’m still using 5.0.4 where it appears the maximum is 999. Thanks for pointing that out Emmanuel.

lh


June 23, 2009 | 4:50 pm

That’s right. It has been fixed for 5.0.6. You can have access to the what’s new information by using the "Latest Support Information" item from the Help menu.


June 24, 2009 | 12:49 am

the scale formula for [vexpr] is the same as for expr,
but i always find it a bit brrrr to send [vexpr] a
list of 100 identical elements, which is why i do
the [zl len] [zl iter 1] [zl group] thing.

-110


July 11, 2009 | 5:32 am

You can measure the difference in time, and if your input has a fixed range, you can simplify the vexpr. Even if you get rid of the [zl len] you’re still more than twice as fast with vexpr…

Stefan

– Pasted Max Patch, click to expand. –

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