linear crossfade between lists
Hello, don't be mad at me if i what i am looking for is stupid or pointless, i am new to this and not quite familiar with max terminology. So, i am looking for a way to use line object to perform linear crossfade between x y z float coordinates, packed in some kind of multichannel signal, to express the transition delta from one point placed in 3d space to another point placed in 3d space. I just want to make it flexible enough to not to process each coordinate separately. I want to have a dynamically changing list of three coordinates in output. In other words, i am looking for a decent way to perform any operations with each member from a list as if i were using map() function in programming
there are various ways how to perform operations on lists of floats, but for only three values i would most likely not even do it.
the best way to find a list-processing method is always to build the process for a single value first:
if you now want to avoid making three copies of that, you could calculate the mapping from normalized to (a to b) yourself:
because, while expr is an alien to some people, once you get it to work it is often a good basis to easily transform stuff to work with lists by simply changing it to vexpr:
Somehow answering your question:
I can suggest using a combination of [ease.xfade] (requires the ease package, available in the package manager) and [line], which comes with a handful of easing fonctions to play with, if linear isn't your cup of tea.
Not answering your question but maybe interesting to consider:
Another interesting approach is using [slide] or [jit.slide], although you can just control the speed of the crossfade in rise and fall directions independantly.
Actual answer to your question: as Roman illustrated, [vexpr] is the way to "perform any operations with each member from a list as if i were using map() function in programming".
If you find [vexpr] too limiting (although it is absolutely fine for linear interpolation between 3D coordinates), you can play with the more versatile option [array.map] existing since Max 8.6 (or create your for loop manually with [iter 1], [zl.group] and any process in-between).
Just another approach: sometimes I use jitter matrices as an alternative way to process lists.
Here's an example.
vexpr would be my choice, but when adding different options,
one could also consider pattrstorage - interpolation between presets.