How can I convert an 8-bit raw sound file into 2 bit sound? I want to test a 2-bit DAC I made with some real speech recording.
Here is what I have currently:
0x7e, 0x7e, 0x7b, 0x7b, 0x7b, 0x7b, 0x7a, 0x7a, 0x77, 0x77, 0x76, 0x76,
0x78, 0x78, 0x79, 0x79, 0x79, 0x79, 0x7b, 0x7b, 0x7d, 0x7d, 0x7e, 0x7e,
0x80, 0x80, 0x82, 0x82, 0x82, 0x82, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
0x80, 0x80, 0x7e, 0x7e, 0x7d, 0x7d, 0x7c, 0x7c, 0x7a, 0x7a, 0x7a, 0x7a, ...
This is the 8-bit data of raw format converted into a hexadecimal string. Is taking the 2 MSBs of this data okay(for 7 it is 01(binary) and for 8 it is 10(binary) Is that okay?)? or do I have to somehow normalize this? Is there any program(I couldn't find 2-bit exports anywhere I looked) that can convert a sound (in whatever format) to 2-bit raw binary?
Edit: I found a related question which approaches this problem from a different angle.