Ramping up the volume on the PSG causes artifacts

Discussion in 'Sega Discussion' started by Headcrab, Sep 7, 2012.

  1. Headcrab

    Headcrab (BigEvilCorporation)

    Joined:
    Dec 21, 2011
    Messages:
    246
    Likes Received:
    67
    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
     
  2. Kjell

    Kjell Member

    Joined:
    Dec 8, 2010
    Messages:
    21
    Likes Received:
    0
    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.
     
    Last edited: Sep 11, 2012
  3. Headcrab

    Headcrab (BigEvilCorporation)

    Joined:
    Dec 21, 2011
    Messages:
    246
    Likes Received:
    67
    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.
     
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page