APU2 amplitude changes

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

Moderator: Moderators

Post Reply
User avatar
za909
Posts: 248
Joined: Fri Jan 24, 2014 9:05 am
Location: Mijn hart woont al in Nederland

APU2 amplitude changes

Post by za909 »

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
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: APU2 amplitude changes

Post by lidnariq »

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.
Post Reply