Noise
Source:
noise.h
FadeTable¶
src/core/noise.h:79The quintic fade 6t⁵ − 15t⁴ + 10t³ as a table over t = i/256, i = 0..256, in 0.16 fixed (0..65536).
The 16-bit tier interpolates between entries on its low byte; the 8-bit tier indexes it directly. A table because the polynomial needs a 40-bit intermediate per sample.
Public Attributes¶
uint32_t v
Public Methods¶
constexpr inline constexpr FadeTable()
Tier16¶
src/core/noise.h:109Public Static Attributes¶
constexpr int kFrac = 16
Public Static Methods¶
constexpr static inline constexpr uint32_t fade(int32_t f)
constexpr static inline constexpr int32_t blend(int32_t a, int32_t b, uint32_t w)
: Operands reach 2^18 against a 2^16 weight: a widening multiply (two on a 32-bit core).
Tier8¶
src/core/noise.h:101The two tiers as policies for the one core below: the fraction width, the fade of a fraction, and the blend a→b by a 0.16 weight sized to the tier's operand range.
Public Static Attributes¶
constexpr int kFrac = 8
Public Static Methods¶
constexpr static inline constexpr uint32_t fade(int32_t f)
constexpr static inline constexpr int32_t blend(int32_t a, int32_t b, uint32_t w)
: Operands stay within ±2^11 (three offsets of a 256 cell), so the product fits 32 bits.