|
| | LookupTableT ()=default |
| | LookupTableT (int size, SampleType min_input, SampleType max_input, std::function< SampleType(SampleType)> generator) |
| | Construct with a generator function.
|
| SampleType | process (SampleType input) const |
| | Look up a value with linear interpolation.
|
| void | process (SampleType *data, int num_samples) const |
| | Process a buffer in-place.
|
| SampleType | operator[] (int index) const |
| | Direct table access (no interpolation).
|
| int | size () const |
| bool | empty () const |
template<typename SampleType = float>
class pulp::signal::LookupTableT< SampleType >
Pre-computed function lookup table with linear interpolation.
RT contract: construction allocates and runs the generator. process(), operator[], and size queries allocate no memory after construction.
Maps an input range [min, max] to pre-computed output values, using linear interpolation between table entries for smooth results.
LookupTable tanh_table(1024, -4.0f, 4.0f, [](
float x) {
return std::tanh(x); });
float out = tanh_table.process(input);
return std::sin(phase * 2.0f * 3.14159265f);
});
LookupTableT< float > LookupTable
Definition lookup_table.hpp:105
@ sine
Definition lfo_sampling.hpp:54