Hi, I'm trying to implement a volume fader on the PSG (gearing up to making software ADSR envelopes), but with only 16 possible attenuation values (0xF to 0x0) there are noticeable "steps" when ramping it up over 1 second. Is there anything I can do to minimise the artifacts? Any tricks? Cheers
A possible solution would be to calculate the volumes at a higher resolution ( 6-bit is fine for 1 second fades ) and use a dithering look-up table to offset the actual 4-bit volume while playing. This does change the timbre of the sound a little, but it give you significantly smoother fades.
I managed to reduce the effect by only ramping up between 0xC and 0x5, which makes for a much softer note (since the volume values step up logarithmically, anything after 0x5 is very large steps). It'll do for now. I do like the sound of a dithering solution, I'll look into it.