Generic encoder for data stored using four bits.
This returns an unsigned integer array containing encoded sample values that range from 0 to 15. Floating point sample values are converted to unsigned int by first scaling them by
FOUR_BIT_1_SIGMA = 2.95, then adding 8.5 (the 0.5 to ensure proper rounding when typecasting to uint8). Some sample output levels are:
value*scale < -7.5
-7.5 < value*scale < -6.5
-0.5 < value*scale < +0.5
6.5 < value*scale
This does not pack the samples into bytes.