26inline float sinc(
float x) {
30 return std::sin(x) / x;
35 T zeromask = (x == 0.f);
73 return x * x * x * x * x;
98 + T(0.5) * t * (y2 - y0)
99 + t2 * (y0 - T(2.5) * y1 + T(2) * y2 - T(0.5) * y3)
100 + t3 * (T(-0.5) * y0 + T(1.5) * y1 - T(1.5) * y2 + T(0.5) * y3);
105template <
size_t CHANNELS,
typename T =
float>
Digital signal processing routines and classes.
Definition approx.hpp:6
float sinc(float x)
The normalized sinc function See https://en.wikipedia.org/wiki/Sinc_function.
Definition common.hpp:26
T catmullRomInterpolate(T y0, T y1, T y2, T y3, T t)
Catmull-Rom cubic interpolation t is the fractional position between y1 and y2.
Definition common.hpp:94
static const float FREQ_A4
Definition common.hpp:18
T amplitudeToDb(T amp)
Definition common.hpp:44
static const float FREQ_SEMITONE
Definition common.hpp:19
T quadraticBipolar(T x)
Definition common.hpp:56
T dbToAmplitude(T db)
Definition common.hpp:49
T sqrtBipolar(T x)
Definition common.hpp:77
T cubic(T x)
Definition common.hpp:61
T quintic(T x)
Definition common.hpp:71
T quarticBipolar(T x)
Definition common.hpp:66
static const float FREQ_C4
Definition common.hpp:17
T exponentialBipolar(T b, T x)
This is pretty much a scaled sinh.
Definition common.hpp:85
float_4 pow(float_4 a, float_4 b)
Definition functions.hpp:229
float_4 sqrt(float_4 x)
Definition functions.hpp:104
float_4 log10(float_4 x)
Definition functions.hpp:116
float_4 sgn(float_4 x)
Definition functions.hpp:271
float ifelse(bool cond, float a, float b)
Definition functions.hpp:49
float_4 sin(float_4 x)
Definition functions.hpp:134
Root namespace for the Rack API.
Definition AudioDisplay.hpp:9
Useful for storing arrays of samples in ring buffers and casting them to float* to be used by interle...
Definition common.hpp:106
T samples[CHANNELS]
Definition common.hpp:107