rectangular window k

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

Inlets

frac32 in

Outlets

bool32 out

bool32 inverted output

Parameters

frac32.u.map width

frac32.s.map center

Declaration
int32_t center;
int32_t width;
bool o;
Control Rate
center = param_center;
width = param_width;

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

outlet_out = o;
outlet_inv = !o;

Privacy

© 2024 Zrna Research