rectangular window k m

Rectangular window, with variable center and width. Mod inputs
Author: Sputnki
License: BSD
Github: sptnk/math/rectangular window k m.axo

Inlets

frac32 in

frac32 cmod

frac32 wmod

Outlets

bool32 out

bool32 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;

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

outlet_out = o;
outlet_inv = !o;

Privacy

© 2024 Zrna Research