APU2 amplitude changes

Discuss NSF files, FamiTracker, MML tools, or anything else related to NES music.

Moderator: Moderators

Post Reply
User avatar
Posts: 193
Joined: Fri Jan 24, 2014 9:05 am
Location: Hungary

APU2 amplitude changes

Post by za909 » Mon Apr 06, 2015 2:06 pm

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: Select all

 DAC=00 DAC=7E
   7  ->  F
   6  ->  E
   5  ->  D
   4  ->  A
   3  ->  8
   2  ->  5
   1  ->  3
   0  ->  0

Posts: 8780
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: APU2 amplitude changes

Post by lidnariq » Mon Apr 06, 2015 2:32 pm


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

Post Reply