vexpr xy interpolation

christiancurtis's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Could anyone advise me on this? I thought that if each of the 4 values are set to 1 that no mater where you move the xy the result should be 1. It works as long as the xy is around the edges, but in the middle it drifts out...

Wetterberg's icon

I gather "distance" is your own abstraction?

christiancurtis's icon

Sorry about that. Not actually my own abstraction. The top part of the patch came from someone here on the forum years ago. Can't remember who now. Here it is.

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

distance

Wetterberg's icon

ah yes, it's one of the St.ools. It's actually been upgraded a bit since then, it seems?

christiancurtis's icon

I've downloaded this version of St.ools

I can't find anything for interpolation though...

Wetterberg's icon

the one stefan linked in the comments there is the most recent.

Anyway, I'm sorry but I can't really grok your patch too much. I can tell you that the problem probably isn't in the vexprs. (btw you can use expr here I think, it's a bit easier to do expr $f1*$f2)

Have you looked into the "nodes" object? It's a lot of fun for this type of processing.

christiancurtis's icon
Max Patch
Copy patch and select New From Clipboard in Max.

I've tidied the patch up a bit more, and gotten rid of the abstraction to make opening it easier. I've also tried nodes, but I get pretty much the exact same results. The closer to the middle of the xy the further it drifts out...

christiancurtis's icon

My problem is that I'm trying to use this to interpolate parameters within a synth, but it's sending the oscillators out of tune, and changing the delay time, when it shouldn't be. I'm assuming it must be something to do with the way I'm adding the value together, as I'm getting the same results when using the node object. Could anyone advise a better way of doing this if I'm going about it the wrong way?

Wetterberg's icon

I can't really tell you *what* you're doing wrong, because the weighting itself shouldn't mean that much - I assume you're using it to interpolate with pattrstorage? If not, do look at the interp tab of the nodes helpfile.

I don't really understand how it would send the pitch out of tune at all, and I can't really understand it from reading the patches you've posted.

christiancurtis's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Ah, I'm really sorry if I didn't explain well enough. No, I'm not using pattrstorage. I started with this synth originally a couple of years ago. I did use pattrstorage at the start, then I used ej.linterp for quite a while, but this way (if I can get it to work) will give me much more flexibility in what seems to be an ever evolving patch. I'm storing the presets in 4 versions of coll. One for each corner of the xy. There are about 250 parameters stored in each coll though. Not just 2 as in the example...

Wetterberg's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Cool. I still think recallmulti is more... practical. Much fewer calculations to do. for anyone else reading along, please check the [nodes] helpfile.