bool32.rising trigger
frac32.bipolar input
bool32 positive value gate
bool32 negative value gate
frac32.bipolar output
int ntrig;
int tmp;
ntrig = 0;
tmp = 0;
if ((inlet_trig > 0) && !ntrig) {
ntrig = 1;
tmp = inlet_in;
} else if (!(inlet_trig > 0))
ntrig = 0;
if (tmp > 0)
outlet_pos = 1;
else
outlet_pos = 0;
if (tmp < 0)
outlet_neg = 1;
else
outlet_neg = 0;
outlet_out = tmp;