APU2 amplitude changes

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
APU2 amplitude changes
by on (#144666)
So I thought I could post a question in case someone has a better way of doing this.
I use 17-byte $00 and $FF DPCM ramp samples to give a "1-bit volume control" to the triangle channel. This of course affects the noise volume as well, and I thought I should add a certain value to the noise volume when it's non-zero and the DAC level is at max (or $7E anyway) to make up for the difference. Then I figured using a conversion table could work a lot better. Apparently using volumes higher than 7 means there is no corresponding volume for the low APU2 volume. Using Famitracker I found some values for conversion but if there's a better way based on real data dealing with how the DAC level affects the amplitude, I'd love to hear it.
Code:
 DAC=00 DAC=7E
   7  ->  F
   6  ->  E
   5  ->  D
   4  ->  A
   3  ->  8
   2  ->  5
   1  ->  3
   0  ->  0
Re: APU2 amplitude changes
by on (#144667)
http://wiki.nesdev.com/w/index.php/APU_Mixer

AIUI, you can mostly assume triangle=7.5 for this purpose, although in reality you get some intermodulation.