31template <
typename T,
int order>
41 void Init(
float sample_rate)
43 sample_rate_ = sample_rate;
47 for(
int i = 0; i < order; ++i)
49 generator_[i].Init(sample_rate_);
58 float frequency = frequency_;
60 for(
int i = 0; i < order; ++i)
62 generator_[i].SetFreq(frequency);
63 sum += generator_[i].Process() * gain;
74 void SetFreq(
float freq) { frequency_ =
fclamp(freq, 0.f, sample_rate_); }
Fractal Noise, stacks octaves of a noise source.
Definition fractal_noise.h:33
float Process()
Definition fractal_noise.h:54
void SetFreq(float freq)
Definition fractal_noise.h:74
void SetColor(float color)
Definition fractal_noise.h:79
void Init(float sample_rate)
Definition fractal_noise.h:41
FIR Filter implementation, generic and ARM CMSIS DSP based.
Definition adenv.h:16
float fclamp(float in, float min, float max)
Definition dsp.h:64