MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
Scalar.hpp File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  MayaFlux
 Main namespace for the Maya Flux audio engine.
 
namespace  MayaFlux::Kinesis
 

Functions

template<typename T >
T MayaFlux::Kinesis::damp (T current, T target, T smoothing, T dt) noexcept
 Exponential smoothing: move current toward target at rate smoothing over time step dt.
 
void MayaFlux::Kinesis::damp_asymmetric (std::span< double > current, std::span< const double > target, std::span< const double > rise, std::span< const double > fall, double dt) noexcept
 damp_asymmetric over arrays, in place.
 
template<typename T >
T MayaFlux::Kinesis::damp_asymmetric (T current, T target, T rise, T fall, T dt) noexcept
 damp with separate time constants for rising and falling.
 
template<typename T >
constexpr T MayaFlux::Kinesis::deadzone (T x, T threshold) noexcept
 Zero values within [-threshold, threshold] and rescale the remainder to fill [0, 1] (or [-1, 1] for negative inputs).
 
template<typename T >
constexpr T MayaFlux::Kinesis::denormalize (T t, T lo, T hi) noexcept
 Denormalize t from [0, 1] to [lo, hi].
 
template<typename T >
constexpr T MayaFlux::Kinesis::ease_in (T t) noexcept
 Cubic ease-in: slow start, fast end.
 
template<typename T >
constexpr T MayaFlux::Kinesis::ease_in_out (T t) noexcept
 Cubic ease-in-out: slow start, fast middle, slow end.
 
template<typename T >
constexpr T MayaFlux::Kinesis::ease_out (T t) noexcept
 Cubic ease-out: fast start, slow end.
 
template<typename T >
constexpr T MayaFlux::Kinesis::map (T x, T in_lo, T in_hi, T out_lo, T out_hi) noexcept
 Map x from [in_lo, in_hi] to [out_lo, out_hi], unclamped.
 
template<typename T >
constexpr T MayaFlux::Kinesis::map_clamped (T x, T in_lo, T in_hi, T out_lo, T out_hi) noexcept
 Map x from [in_lo, in_hi] to [out_lo, out_hi], clamped to [out_lo, out_hi].
 
template<typename T >
constexpr T MayaFlux::Kinesis::normalize (T x, T lo, T hi) noexcept
 Normalize x in [lo, hi] to [0, 1], unclamped.
 
template<typename T >
T MayaFlux::Kinesis::ping_pong (T x, T lo, T hi) noexcept
 Ping-pong (triangle wave): fold x back and forth in [lo, hi].
 
double MayaFlux::Kinesis::sample_table (std::span< const double > table, double t) noexcept
 Read an evenly spaced table at a position in [0, 1], interpolating linearly.
 
template<typename T >
constexpr T MayaFlux::Kinesis::sign_nonzero (T x) noexcept
 Sign of x, returning -1 or +1, never 0.
 
template<typename T >
constexpr T MayaFlux::Kinesis::smootherstep (T lo, T hi, T x) noexcept
 Ken Perlin's quintic smootherstep: C2-continuous in [lo, hi].
 
template<typename T >
constexpr T MayaFlux::Kinesis::smoothstep (T lo, T hi, T x) noexcept
 GLSL smoothstep: Hermite interpolation in [lo, hi].
 
template<typename T >
T MayaFlux::Kinesis::snap (T x, T lo, T hi, T step) noexcept
 Snap x to the nearest multiple of step within [lo, hi].
 
template<typename T >
T MayaFlux::Kinesis::snap (T x, T step) noexcept
 Round x to the nearest multiple of step.
 
template<typename T >
T MayaFlux::Kinesis::soft_clip (T x, T limit=T { 1 }) noexcept
 Smooth bound to (-limit, limit): limit * tanh(x / limit).
 
template<typename T >
T MayaFlux::Kinesis::wrap (T x, T lo, T hi) noexcept
 Wrap x into [lo, hi) with modulo semantics.