scale i

Experimental::scales an input between 0 and 'inrange' to a value between 0 and 'outrange'.NOT accurate sometimes.CAN 'overflow'
Author: robert schirmer
License: BSD
Github: rbrt/math/scale i.axo

Inlets

int32 in

Outlets

int32 out

Parameters

int32 inrange

int32 outrange

Declaration
int64_t va;
int32_t result;
Control Rate
va = param_outrange;
result = (float)((va << 15) / param_inrange);
outlet_out = ((result * inlet_in) >> 15);

Privacy

© 2024 Zrna Research