Scalar math helpers for real-time audio DSP. More...
#include <pulp/signal/denormal.hpp>#include <algorithm>#include <bit>#include <cstddef>#include <cstdint>#include <cstring>#include <type_traits>#include <cmath>Go to the source code of this file.
Classes | |
| struct | pulp::signal::FastMath |
| Math helpers optimized for audio DSP. More... | |
Namespaces | |
| namespace | pulp |
| namespace | pulp::signal |
| namespace | pulp::signal::detail |
| Round-2 effect-wave vocabulary. | |
Macros | |
| #define | PULP_FAST_MATH_HAS_IEEE_MINMAX 0 |
Enumerations | |
| enum class | pulp::signal::FastTrigProfile : std::uint8_t { pulp::signal::reference , pulp::signal::realtime_efficient , pulp::signal::realtime_precise } |
| Semantic accuracy choices for bounded-cycle real-time trigonometry. More... | |
| enum class | pulp::signal::LadderSaturation { pulp::signal::exact , pulp::signal::accurate , pulp::signal::realtime_efficient } |
| Saturator choices for the Moog ladder's per-stage non-linearity. More... | |
Functions | |
| template<auto Saturation> requires std::is_same_v<decltype(Saturation), LadderSaturation> | |
| float | pulp::signal::ladder_tanh_profiled (float x) |
| The ladder's float saturator for an explicit choice. | |
| template<auto RealtimeEfficient> requires std::is_same_v<decltype(RealtimeEfficient), bool> | |
| float | pulp::signal::ladder_tanh_profiled (float x) |
| The previous boolean form: true is the Padé saturator, false is exact std::tanh, as before LadderSaturation existed. | |
| float | pulp::signal::ladder_tanh (float x) |
| The ladder's default float saturator. | |
| double | pulp::signal::lipschitz_tanh (double v) noexcept |
| A [3/2] Padé tanh that is 1-LIPSCHITZ and bounded — the saturator to reach for inside a feedback loop. | |
| template<typename T> | |
| T | pulp::signal::detail::select_bits (bool condition, T if_true, T if_false) noexcept |
| condition ?
| |
| template<typename T> | |
| T | pulp::signal::detail::snap_to_zero_bits (T x) noexcept |
| snap_to_zero() as bit operations (see select_bits()). | |
| float | pulp::signal::detail::tanh_accurate_bits (float x) noexcept |
| FastMath::tanh_accurate() with its clamps as bit operations; the same value for every input. | |
Variables | |
| constexpr LadderSaturation | pulp::signal::kDefaultLadderSaturation = LadderSaturation::accurate |
| Selecting the default ladder saturator at build time: | |
Scalar math helpers for real-time audio DSP.
| #define PULP_FAST_MATH_HAS_IEEE_MINMAX 0 |