Given a sequence of real numbers that represent a sound signal i.e [1.8, 2.2, 2.2, 1.9, -1.5, -0.7], we must quantize this sequence by dividing the range [-4, 4] to 32 equal parts.
If we had to do this with the traditional way we would need to write 32 different ranges
[-4 , -3.75]
. . .
and check in which one the real value is in.
Is there an another way to achieve this? Maybe with a normalization function or what?