Hi all,
I'm implementing a volume fader on the PSG (gearing up to writing software envelopes) but with only 16 possible attenuation values there's noticeable "stepping" when ramping it up over 1 second or so. Is there any way to avoid this? Any tricks?
Cheers
Ramping up the volume on the PSG causes artifacts
Moderator: BigEvilCorporation
-
- Very interested
- Posts: 209
- Joined: Sat Sep 08, 2012 10:41 am
- Contact:
Ramping up the volume on the PSG causes artifacts
A blog of my Megadrive programming adventures: http://www.bigevilcorporation.co.uk
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
It is logarithmic so you're lucky that you can change volumes in uniform manner by just using adds and subs, with linear you need more elaborate setup.
Only problem with the PSG is that the volume step is 2db and it is quite a noticable change in volume. On AY you get 3db so that's even bigger.
To keep good FM, PCM and PSG balance you'd rarely want go fo above 4 steps to max.
Only problem with the PSG is that the volume step is 2db and it is quite a noticable change in volume. On AY you get 3db so that's even bigger.
To keep good FM, PCM and PSG balance you'd rarely want go fo above 4 steps to max.
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 209
- Joined: Sat Sep 08, 2012 10:41 am
- Contact:
Yeah, there's that too. Is this a lost cause? I'd like to be able to create "softer" notes but so far this chip doesn't really allow for it.TmEE co.(TM) wrote:It is logarithmic
A blog of my Megadrive programming adventures: http://www.bigevilcorporation.co.uk
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Just don't go too high volume. In my MD sound engine the PSG volume is rarely above -8db, otherwise it drowns out FM and PCM.
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 209
- Joined: Sat Sep 08, 2012 10:41 am
- Contact:
Cheers, I'll have a play about and see if this helps
A blog of my Megadrive programming adventures: http://www.bigevilcorporation.co.uk
-
- Very interested
- Posts: 209
- Joined: Sat Sep 08, 2012 10:41 am
- Contact:
Yes, this works a treat! I've limited the ramp-up range to between 0xC and 0x5, and it sounds very soft.
I take it any PSG values get applied immediately, instead of waiting for the next polarity flip? Would it be possible to time a change so that it coincides with a flip, or could we not achieve timing that accurate on the Z80?
I've also had a dithering solution recommended, I might look into that too.
I take it any PSG values get applied immediately, instead of waiting for the next polarity flip? Would it be possible to time a change so that it coincides with a flip, or could we not achieve timing that accurate on the Z80?
I've also had a dithering solution recommended, I might look into that too.
A blog of my Megadrive programming adventures: http://www.bigevilcorporation.co.uk