what would you call the inverse of lerp i.e. alpha = (n - low) / (high - low) ?
I'm leaning towards delerp, but I'm open to other ideas
oh wait shoot I went with "mix" instead of "lerp" for mollytime. derp. ok new question help me name the inverse of "mix" and no it is not xim
i envision the primary use of this function being you pass in a midi note number and the endpoints you care about and it gives you a scalar value you can bend other patch parameters with, and i haven't yet thought of any secondary uses
maybe "within" is good
@aeva usually called map or remap or maprange. inverse lerp is usually called unlerp. in glsl i usually see it still called unlerp even though glsl's lerp is called mix.
@aeva whatever this bat contraption was? super molecular dust separator?
@kstatz12 hm, that does achronym well
@aeva both mix and this unmix function are special cases of remap with either the output or input range as the unit range. (I don’t know if generality is actually helpful to you though, just thinking about it.) unmix doesn’t sound bad…
@aeva I think remap is good for the midi case you mention though since it lets you use more natural values
@aeva kinda wanna say normalize or norm or somethiing...
@aeva “explode” - for the sheer energy in that naming or “separate”
@aeva psst, I would've said "derp" for the inverse of "lerp" :3
@pupxel i also considered it, but i felt it had a moderate probability of producing regret later on
@aeva maybe play with superscrips! lerp⁻¹

@aeva turning a mixture into its components in chemistry is called "separation" https://en.wikipedia.org/wiki/Separation_process

and there's a bunch of separation techniques you could maybe get inspiration from?

Separation process - Wikipedia

@aeva it is famously impossible to directly unmix things, but you can distill or precipitate them.
@aeva „unlerp“ has amazing mouthfeel
@aeva I know you realized you named it mix and not lerp, but it's stuck in my head. Inverse of lerp is larp.
@aeva glerp has a 'je ne sais pas' about it.

@aeva I call it `norm()`, because it essentially computes the normalized version of the value in the [lo,hi] interval. Like GLSL, I'm using `mix()` for the actual `lerp` op, and like Houdini VEX, I'm using `fit()` to map a value from [a,b] to [c,d] intervals:

https://www.sidefx.com/docs/houdini/vex/functions/fit.html

fit

@toxi problem is I might add support for vectors some day. No immediate plans for it, but I haven't conclusively walled it off, so I'm avoiding overloading common vector op names.
@aeva Well, in that case... 🤷‍♂️ How about `invMix()` as in inverse mix, also similar to inverting a matrix?
@aeva I get confused every time any API calls this something other than inverse lerp (UE calls it GetRangePct which is awful)
@aeva i vote for map or remap for both the forward and inverse operations, as in map(x, domain_low, domain_high, codomain_low, codomain_high), with maybe shorthands for map_to_01 and map_from_01