endBand

stereo dual filter for end-applications (eg. before output) HP-frequency for removing low frequencies/DC-offset, lowshelf for volume of removed frequencies by highpass filter LP-frequency for limiting high frequencies, highshelf for volume of removed frequencies by lowpass filter
Author: Remco van der Most
License: BSD
Github: sss/filter/endBand.axo

Inlets

frac32buffer input

frac32buffer inR

Outlets

frac32buffer output

frac32buffer outR

Parameters

frac32.u.map highshelf

frac32.u.map lowshelf

frac32.s.map.pitch LP

frac32.s.map.pitch HP

Declaration
int32_t val1;
int32_t val2;
int32_t val3;
int32_t val4;
int32_t pLP;
int32_t pHP;
Init
val1 = 0;
val2 = 0;
val3 = 0;
val4 = 0;
Control Rate
int32_t f;
MTOF(param_HP, f);
int32_t g;
MTOF(param_LP, g);

if (param_LP < param_HP) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_HP], param_LP,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_LP], param_HP,
                     0xFFFD);
}
Audio Rate
val3 = ___SMMLA((inlet_inL - val3) << 1, g, val3);
val4 = ___SMMLA((inlet_inR - val4) << 1, g, val4);
int32_t temp = ___SMMUL(inlet_inL - val3 << 3, param_highshelf << 2) + val3;
val1 = ___SMMLA((temp - val1) << 1, f, val1);
int32_t tamp;
tamp = ___SMMUL(inlet_inR - val4 << 3, param_highshelf << 2) + val4;
val2 = ___SMMLA((tamp - val2) << 1, f, val2);
outlet_outL = temp - val1 + ___SMMUL(val1 << 3, param_lowshelf << 2);
outlet_outR = tamp - val2 + ___SMMUL(val2 << 3, param_lowshelf << 2);

Privacy

© 2024 Zrna Research