lp x2

Oversampled 2-pole resonant low-pass filter (biquad)
Author: Johannes Taelman, Jan Hofmann
License: BSD
Github: jho/filter/lp x2.axo

Inlets

frac32buffer filter input, 1st part

frac32buffer filter input, 2nd part

Outlets

frac32buffer filter output, 1st part

frac32buffer filter output, 2nd part

Parameters

bool32.tgl Fx2

frac32.u.map.filterq reso

frac32.s.map.pitch pitch

Declaration
biquad_state bs;
biquad_coefficients bc;
Init
biquad_clearstate(&bs);
Control Rate
int32_t freq = param_pitch;
if (!param_Fx2)
  freq -= 12 << 21;
MTOF(freq, freq);
biquad_lp_coefs(&bc, freq, INT_MAX - (__USAT(param_reso, 27) << 4));
jho_biquad_dsp(&bs, &bc, inlet_in__1st, outlet_out__1st);
jho_biquad_dsp(&bs, &bc, inlet_in__2nd, outlet_out__2nd);

Privacy

© 2024 Zrna Research