Continuous spectral-tilt noise source built from NoiseSourceT's canonical seeded white stream and a fixed cascade of canonical BiquadT shelves. More...
#include <noise_tilt.hpp>
Public Member Functions | |
| bool | prepare (double sample_rate) |
| bool | set_tilt_db_per_octave (double tilt) |
| bool | set_level (SampleType level) noexcept |
| void | set_seed (std::uint32_t seed) noexcept |
| void | reset () noexcept |
| SampleType | process () noexcept |
| void | process (SampleType *output, std::size_t frames) noexcept |
| double | sample_rate () const noexcept |
| double | tilt_db_per_octave () const noexcept |
| SampleType | level () const noexcept |
| std::uint32_t | seed () const noexcept |
| std::uint64_t | fault_count () const noexcept |
Static Public Member Functions | |
| static constexpr int | latency_samples () noexcept |
| static constexpr int | tail_samples () noexcept |
Static Public Attributes | |
| static constexpr double | kMinSampleRate = 8000.0 |
| static constexpr double | kMaxSampleRate = 384000.0 |
| static constexpr double | kMinTiltDbPerOctave = -6.0 |
| static constexpr double | kMaxTiltDbPerOctave = 6.0 |
| static constexpr double | kReferenceHz = 1000.0 |
| static constexpr double | kBandLowHz = 31.25 |
| static constexpr double | kBandHighHz = 16000.0 |
| static constexpr std::size_t | kShelfCount = 9 |
| static constexpr std::uint32_t | kDefaultSeed = NoiseSourceT<SampleType>::default_seed |
Continuous spectral-tilt noise source built from NoiseSourceT's canonical seeded white stream and a fixed cascade of canonical BiquadT shelves.
tilt_db_per_octave is a power-spectral-density slope in dB/octave over the audio design band (31.25 Hz to min(16 kHz, 0.4 * sample_rate)). Its legal range is [-6, +6] dB/octave; zero is bit-identical to NoiseSourceT::white(). Gain is normalized to unity at the 1 kHz reference, and level is a dimensionless multiplier on [0, 1]. The filtered distribution remains zero-mean but is no longer uniform except at zero tilt.
prepare() and set_tilt_db_per_octave() are bounded control-side calls that design coefficients and clear filter history. process(), reset(), seed access, and the block overload are allocation-free and lock-free. BiquadT snaps recursive denormals; a non-finite output clears all filter state and emits zero while incrementing fault_count().
The public seed selects the complete initial random condition. Resetting rewinds both that stream and all filters, so output is invariant to block partition. Latency and tail are zero samples.
|
inlinenoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inlinestaticconstexprnoexcept |
|
inlinenoexcept |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |