rectangular window s m

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

Inlets

frac32buffer in

frac32 cmod

frac32 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;
bool o;
Control Rate
center = param_center + inlet_cmod;
width = param_width + inlet_wmod;
Audio Rate
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