RAMP -> various (list) interpolation modes : max-external

timh's icon

I'm wondering if someone knows about an available alternative for siteswapjugglers "ramp" external that is running on Apple Silicon M*?

Would be awesome! unfortunately i am not familiar with Xcode recompiling, homebrew, ruby, … Maybe there is someone who could help me — that would be fantastic!

Thanks in advance!

Tim

TFL's icon

Check out the Ease package, available in the package manager. It's 30 easing functions available in various flavours: [ease] combined with a [line] seems very similar to [ramp], but you also have [list.ease], [ease~], [ease.xfade] (my favorite), and some other.

TFL's icon

As for [smoov] there is a [p smoov] in this timeless thread with that patch comparing various ways to smooth streams of data (my favorites being [p smoov] and [slide])

timh's icon

Wow — many thanks for your really quick reply and help!!

After taking a closer look at the object, here's my brief comment:

[ease] seems to be a very powerful solution for interpolating between two known numbers. Unfortunately that's not working for interpolations between a current (random chosen) value to a new one; especially because [ramp] just did so. [ease] always needs an update of input_range and output_range. That means, It's not impossible to implement a routine that could make that working, But not as flexible as [ramp] is/was doing. Furthermore the functionality of [list.ease] is a bit limited, or makes easy [ramp]-list-processes very complex, especially if different input/output values occur within a list - which is certainly the case in most applications.

Precisely because [ease] was developed by cycling, I would have expected more functionality / flexibility. But there is one very good thing: The implemented interpolation modes are extensive and very good - but of course only if you want to interpolate in between two known values. (e.g. 0. 1.)

Perhaps I have overlooked or misunderstood something - in which case I look forward to hearing from you! for now i don't see any another solution but running max in rosetta mode, knowing that it doesn't work as efficiently in this operating mode. but most former objects are still working…

…maybe someone will find a way to compile [ramp] for the silicon processors (:

Many thanks !!

T

TFL's icon

Unfortunately that's not working for interpolations between a current (random chosen) value to a new one

Yeah, I came across this problem too and found a few ways to tackle it. Actually, this is specifically what ease.xfade is made for. Problem is, I don't know why they made it to work specifically with lists. So if you want to ease only one value, you need to pack a dumb number to it and throw it away after.

Anyway, here is a workaround with ease (the key is to automatically update the output range with the last output value and the new target), taken from here and slightly modified, and my approach with ease.xfade:

EDIT: I remember I actually had an abstraction that was pretty close from ramp. I took it and slightly modified it so its inlets matches with [ramp]. And it can takes single values or lists as inputs.

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

timh's icon

awesome – you just solved my problem – thanks so much! in the end, i had to admit to myself that i completely misunderstood how [ease] works: it doesn't make the interpolation itself. [ease] has to be "driven" by [line 0.] > msg: (0., 1. $1) to interpolate between different values in various modes… argh…

+ swapping the order in the msg (output_range $2 $1) in conjunction with the output values of [ease] just fixed my issue. great!

ease_help.maxpat
Max Patch

bests!

tiago morais morgado's icon

you can set a node.script multidimensional array buffer or vector, towards creating an interpolation curve, for the overall thing and it will work