ap1

Allpass filter w. 1st order lowpass filter. NB. This version of an allpass filter has NO delay, just a straight up allpass filter.
Author: Jaffasplaffa
License: BSD
Github: jaffa/filt/ap1.axo

Inlets

frac32buffer input

frac32 cutoff frequency

Outlets

frac32buffer output

Parameters

frac32.u.map freq

Declaration
int32_t val;

int32_t FILTER;
int32_t FILTERINV;
int32_t CLEANPLUSINVERTEDFILTER;
int32_t CLEANPLUSINVERTEDFILTERINV;
int32_t STEP2;
Init
// 6db lo pass //
val = 0;
Control Rate
// 6db lo pass //
int32_t f;
MTOF(param_freq + inlet_freq, f);
Audio Rate
// 6db lo pass //
val = ___SMMLA((inlet_in - val) << 1, f, val);
FILTER = val;

FILTERINV = -FILTER;
CLEANPLUSINVERTEDFILTER = inlet_in + FILTERINV;
CLEANPLUSINVERTEDFILTERINV = -CLEANPLUSINVERTEDFILTER;
STEP2 = FILTER + CLEANPLUSINVERTEDFILTERINV;

outlet_out = STEP2;

Privacy

© 2024 Zrna Research