Home | ER-101 | ER-102 | ER-301 | Wiki | Contact

Float to Int?

hello friends,
i’m experimenting with mathematics inside the 301 and i want to be able to round off float division results to integer numbers.
right now i have a custom unit with two controls:
Dividend (controlling an offset, the number to be divided by )
Divisor (controlling Div value on a Rational VCA, the number the dividend is divided by)
then i added a third gain control to monitor the results (being modulated by the output of the Rational VCA module).
if i do it like this i get results with float (decimal) numbers. to round them to integers i put a grid quantizer after them with just 1 level.
i thought it would be enough to round to integers but instead it rounds to half integers.
example: it goes from 1 to 1.5 before jumping to 2.
it advances by 0.5 increments.
is there a way to have it perfectly truncating to real integers? maybe @Joe you have some suggestions?
thanks!

2 Likes

Maybe try a scale quantizer set to just octaves?

3 Likes

interesting idea! there isn’t any octave preset built in but i’ll do a scala preset tomorrow.
question: why do you think it’ll work? i think i don’t get the mathematics you are thinking.
anyway, thanks!

another question:
anyone knows if the Counter unit can count with very small steps? i mean, can we try to build a phase accumulator with it to build oscillators for a didactical reason?
i already built counters and accumulators with s&h and offsets, and even tried to get a sine osc from it but there is something not working.
one of the reasons can be that we have no access to the sample rate clock (i think max f for oscillators is around 28 khz)

With 1V/octave, quantizing to octaves is the same as rounding down to the nearest whole number volt (depending on quantizer algo).

I think it’s not quite right to call that an “integer” (since who knows how the number is being stored) but for practical applications within a patch it should work.

1 Like

Isn’t 1V represented as 0.1 in the ER-301 though?

1 Like