I am finishing up a sound generator design and am now faced with the task of mixing 4 or more 8 bit "voice" registers into one single 8 bit "dac" output register.
Currently I use...
- Code: Select all
mixer <= (voice1[15:8] + voice2[15:8] + voice3[15:8] + voice4[15:8]) /4;
dac <= mixer;
"mixer" is a 16 bit register.
which works, but does drop the output significantly as compared to assigning dac to a single voice.
I am looking for suggestions on a better way to mix together 8 bit voices into a single 8 bit output. I cannot change the number of bits in the dac or voices, but can certainly change the number of bits in any of the mixing math.
Cheers!
Brad