folderBip

bipolar wavefolder Has independent wavefold strength for positive and negative parts of the signal.
Author: Remco van der Most
License: BSD
Github: sss/dist/folderBip.axo

Inlets

frac32buffer in

frac32 above

frac32 under

frac32 offset

Outlets

frac32buffer out

Parameters

frac32.u.map clip

frac32.s.map above

frac32.s.map under

frac32.s.map offset

frac32.s.map mod

frac32.s.map.lfopitch rate

Declaration
int32_t phs;
int32_t v30 = 1 << 30;
int32_t WRP(int32_t IN, int32_t lvl) {
  IN = ___SMMUL(IN << 2, lvl << 3) << 5;
  IN = (IN << 4) >> 4;
  return IN = __SSAT(IN, 27) * 2 - IN;
}
int32_t lp;
Control Rate
int32_t rate;
MTOFEXTENDED(param_rate, rate)
rate = rate >> 8;
int32_t ABO = param_above + inlet_above;
int32_t UND = param_under + inlet_under;
int32_t offset = param_offset + inlet_offset << 2;
Audio Rate
phs += rate;
int32_t r;

r = ___SMMUL((phs > 0 ? phs : -phs) - v30 << 1, param_mod) << 1;

int32_t in = inlet_in + offset + r;
bool over = (in > 0 ? in : -in) > param_clip ? 1 : 0;
int32_t under = 0;
int32_t above = 0;
outlet_out = (over > 0 ? WRP(in >> 1, ABO) << 1 : WRP(in, UND)) + inlet_in >> 1;

Privacy

© 2024 Zrna Research