Elementary Max question/ Iter or not to Iter...?

Mari Kimura's icon

Hi, I have a moment of insane inability to think in Max....

Max Patch
Copy patch and select New From Clipboard in Max.

I need to add a value to individual items in the list. I could do that passing through iter but then the output is no longer a list... I'm sure someone here can help "before the first cup of Earl Grey in pajamas" (Skyfall) :) I appreciate!!!

Peter McCulloch's icon

If you need to add it to all items, use vexpr $f1+$f2 @scalarmode 1

The @scalarmode 1 attribute lets individual items be treated as if they were a list so inputs of 1 2 3 4 5 and 7 look like 1 2 3 4 5 and 7 7 7 7 7.

Max Patch
Copy patch and select New From Clipboard in Max.

For things that are more complicated (or might add/remove elements) I like this construction, since you don't have to know the length of the list that you want to generate.

Mari Kimura's icon

Beautiful!!! Thank you thank you thank you, exactly what I needed :)
You're the best and you know it...

pdelges's icon

Maybe Peter is just faster to answer than others. I was 1 minute too late to deserve such a nice compliment :-)
But I know I'm not the best anyway.

Mari Kimura's icon

Patrick thanks so much for responding!!! You guys are awesome!!!