18 #ifndef _dsp_filter_h_
19 #define _dsp_filter_h_
36 namespace ARDOUR {
namespace DSP {
61 assert (
sizeof(
float) ==
sizeof (int32_t));
62 assert (
sizeof(
float) ==
sizeof (
int));
75 if (s ==
_size) {
return; }
119 std::atomic_thread_fence (std::memory_order_release);
136 std::atomic_thread_fence (std::memory_order_acquire);
146 void memset (
float *data,
const float val,
const uint32_t n_samples);
154 void mmult (
float *data,
float *mult,
const uint32_t n_samples);
162 void peaks (
const float *data,
float &min,
float &max, uint32_t n_samples);
197 void proc (
float *data,
const uint32_t n_samples);
206 void ctrl (
float *data,
const float val,
const uint32_t n_samples);
251 void run (
float *data,
const uint32_t n_samples);
262 void configure (
double a1,
double a2,
double b0,
double b1,
double b2);
276 void coefficients (
double& a1,
double& a2,
double& b0,
double& b1,
double& b2)
const;
279 void calc_vicanek (
const double W0,
double& A0,
double& A1,
double& A2,
double& phi0,
double& phi1,
double& phi2);
299 void set_data_hann (
float const *
const data,
const uint32_t n_samples,
const uint32_t offset = 0);
312 return bin * _fft_freq_per_bin;
319 void init (uint32_t window_size,
double rate);
343 void run (
float *data,
const uint32_t n_samples);
348 float randf () {
return (randi () / 1073741824.f) - 1.f; }
354 float _b0, _b1, _b2, _b3, _b4, _b5, _b6;
void set_vicanek_poles(const double W0, const double Q, const double A=1.0)
void calc_vicanek(const double W0, double &A0, double &A1, double &A2, double &phi0, double &phi1, double &phi2)
Biquad(double samplerate)
void compute(Type t, double freq, double Q, double gain)
void run(float *data, const uint32_t n_samples)
void coefficients(double &a1, double &a2, double &b0, double &b1, double &b2) const
Biquad(const Biquad &other)
void configure(Biquad const &)
void configure(double a1, double a2, double b0, double b1, double b2)
float dB_at_freq(float freq) const
int32_t atomic_get_int(size_t off)
void atomic_set_int(size_t off, int32_t val)
float * to_float(size_t off)
int32_t * to_int(size_t off)
float power_at_bin(const uint32_t bin, const float norm=1.f) const
void set_data_hann(float const *const data, const uint32_t n_samples, const uint32_t offset=0)
uint32_t _fft_window_size
FFTSpectrum(uint32_t window_size, double rate)
void init(uint32_t window_size, double rate)
static Glib::Threads::Mutex fft_planner_lock
float freq_at_bin(const uint32_t bin) const
void run(float *data, const uint32_t n_samples)
void set_cutoff(float freq)
LowPass(double samplerate, float freq)
void ctrl(float *data, const float val, const uint32_t n_samples)
void proc(float *data, const uint32_t n_samples)
int cache_aligned_malloc(void **memptr, size_t size)
void cache_aligned_free(void *memptr)
float log_meter_coeff(float coeff)
void mmult(float *data, float *mult, const uint32_t n_samples)
float log_meter(float power)
void process_map(BufferSet *bufs, const ChanCount &n_out, const ChanMapping &in_map, const ChanMapping &out_map, pframes_t nframes, samplecnt_t offset)
void peaks(const float *data, float &min, float &max, uint32_t n_samples)
void memset(float *data, const float val, const uint32_t n_samples)
PBD::PropertyDescriptor< gain_t > gain
Temporal::samplecnt_t samplecnt_t