DSP utility functions.
Convert from dB to float. Precision: This uses fast_exp which under normal conditions has a peak error under -135dB over the useful range.
Mapping from frequency to MIDI notes.
Computes a normalized frequency form a frequency.
Convert from float to dB Precision: This uses fast_exp which under normal conditions has a peak error under -135dB over the useful range.
Mapping from MIDI notes to frequency.
Computes a frequency.
Fletcher and Munson equal-loudness curve Reference: Xavier Serra thesis (1989).
Gets a factor for making exponential decay curves, which are the same thing as a 6dB/oct lowpass filter.
SSE approximation of reciprocal square root.
Is this integer even?
Is this integer odd?
Linear interpolation, akin to GLSL's mix.
Map linearly x from the range [a, b] to the range [c, d]
map [0..1] to min..max logarithmically min and max must be all > 0, t in [0..1]
Computes next power of 2.
Give back a phase between -PI and PI
Quick and dirty sawtooth for testing purposes.
Quick and dirty square for testing purposes.
Quick and dirty triangle for testing purposes.
Same as GLSL smoothstep function. See: http://en.wikipedia.org/wiki/Smoothstep
Real80 is a scalar numerical type similar to real when using x86 DMD using FPU. This ensures 80-bit computation, when double isn't enough and real is a 64-bit floating-point number. This can happen in pole/zero computations for some IIR filters.