frac32.positive In
frac32.positive ModHeadroom
frac32.positive Master1
frac32.positive Master2
frac32.bipolar ModIn
frac32.positive output
int32_t oud_in;
int32_t oud_parameter;
int32_t output;
oud_in = 0;
oud_parameter = 0;
output = 0;
// modulate ModIn
int32_t accum = __SSAT(inlet_ModIn + inlet_In, 28);
// modulate ModHeadroom
accum = ___SMMLA((0x07FFFFFF - accum) << 3, inlet_ModHeadroom << 2, accum);
// apply master 1 control
accum = ___SMMUL(accum, inlet_Master1);
accum = __SSAT((accum << 5), 28);
// apply master 2 control
accum = ___SMMUL(accum, inlet_Master2);
accum = __SSAT((accum << 5), 28);
// schrijf naar output
outlet_Out = accum;