rectangular window s fm

Rectangular window, with variable center and width. S-rate mod inputs
Author: Sputnki
License: BSD
Github: sptnk/math/rectangular window s fm.axo

Inlets

frac32buffer in

frac32buffer cmod

frac32buffer wmod

Outlets

frac32buffer.positive output

frac32buffer.positive inverted output

Parameters

frac32.s.map center

frac32.u.map width

Declaration
int32_t center;
int32_t width;
int32_t c;
int32_t w;
bool o;
Control Rate
c = param_center;
w = param_width;
Audio Rate
center = c + inlet_cmod;
width = w + inlet_wmod;

if (inlet_in > center - width && inlet_in < center + width)
  o = 1;
else
  o = 0;

outlet_out = o << 27;
outlet_inv = !o << 27;

Privacy

© 2024 Zrna Research