dsp::LookupTableTransform with normalized input value?


#1

I thought I’d try using the new dsp::LookupTableTransform class instead of my usual hand-rolled lookup table but ran into some trouble.

dsp::LookupTableTransform<float> getFilter { [](float t)
    {
        return logspace(20.f, 20000.f, t);  // where t is in 0.0 - 1.0 range
    },
    20.0f, 20000.0f, 1000
};

My incorrect assumption was that I could use a normalized input value (0.0-1.0), but that failed as it expects input values in the table range. I’m wondering why that functionality wasn’t included. It sure would be convenient for many uses.