PGA2311 incremental volume control

Hi there, this is my first post on the forum as i'm new to Arduino and programming! I have tried to teach myself everything so far but I have now come up stuck towards the end of a project.

I am looking for a way to slowly attenuate the level of audio passing through a PGA2311.

I would like to attenuate the audio level over say ten seconds, in increments of a given value.

Basically creating slow incremental level attenuation, kind of like a VERY slow attack time on a compressor!

Hope this makes sense!

Are you able to control the volume at all? ...Are you asking how the serial interface works, or how to change the volume slowly?

Yes I am able to control the volume, but I would now like to control the volume slowly over a given amount of time.

The volume range goes from 0 - 255 with unity gain at 192.

For this project I am not interested in anything above unity gain as it is only attenuation I am looking to achieve.

I would like to attenuate the volume by a given value over a specified time.

For example every 500ms, drop the level by -1 for 10 seconds, basically creating a fade in volume level.

I presume this could be done by some sort of for loop?

I'm using the PGA2311 in my project and should be able to help.

Can you post your current sketch, so we can see what you have so far ?