26inline float sinc(
float x) {
30 return std::sin(x) / x;
35 T zeromask = (x == 0.f);
73 return x * x * x * x * x;
86 return (simd::pow(b, x) - simd::pow(b, -x)) / (b - 1.f / b);
91template <
size_t CHANNELS,
typename T =
float>
float sinc(float x)
The normalized sinc function See https://en.wikipedia.org/wiki/Sinc_function.
Definition common.hpp:26
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:227
float_4 sqrt(float_4 x)
Definition functions.hpp:102
float_4 log10(float_4 x)
Definition functions.hpp:114
float_4 sgn(float_4 x)
Definition functions.hpp:269
float ifelse(bool cond, float a, float b)
Definition functions.hpp:49
float_4 sin(float_4 x)
Definition functions.hpp:132
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:92
T samples[CHANNELS]
Definition common.hpp:93