sat ur hate

A saturator distortion based on dist/soft and filter/lp1 - hp1 by Johannes Taelman. A soft saturator is cascaded with a filter (lowpass or highpass). You can feed the output of the filter back into the input with the feed knob and change the filter cutoff with the filter knob. postfilter allows you to pick up the sound after filtering; highpass changes the filter from lowpass to highpass.
Author: Sptnk
License: BSD
Github: sptnk/effect/sat ur hate.axo

Inlets

frac32buffer in

Outlets

frac32buffer out

Parameters

frac32.s.map.pitch filter

bool32.tgl postfilter

bool32.tgl highpass

frac32.u.map feed

Declaration
int32_t f;

int32_t feed;
int32_t satout = 0;
int32_t filterout = 0;

bool postfilter = 0;
bool highpass = 0;
Control Rate
MTOF(param_filter, f);

postfilter = param_postfilter;
highpass = param_highpass;
Audio Rate
int32_t ts = __SSAT(___SMMLA(filterout, param_feed << 4, inlet_in) << 1, 27);
int32_t tsq31 = ts << 3;
int32_t tsq31p3 = ___SMMUL(tsq31, ___SMMUL(tsq31, tsq31));
satout = ts + (ts >> 1) - (tsq31p3);

filterout = ___SMMLA(__SSAT((satout - filterout) << 1, 30), f, filterout);
if (highpass)
  filterout = satout - filterout;

if (postfilter)
  outlet_out = filterout;
else
  outlet_out = satout;

Privacy

© 2024 Zrna Research