QUOTE(davelasker @ Aug 1 2004, 03:39 PM)
I'm an experienced Windows programmer, but a digital audio newbie and also a new iPod owner. I'm trying to normalize playback volume through my iPod.
I tried Apple's Sound Check and didn't like the results. Just turning Sound Check on in the iPod makes its output sound terrible, even before any normalization was done in iTunes.
I'm looking for something like iVolume (Mac-only AFAIK) for Windows that manipulates the volume for each track. I'd like to take a crack at building a fb2k plug-in to do this.
I looked at foo_pod, but it seems they are going the Sound Check route. I'm suffering from the delusion that manipulating volume will give better results than Sound Check. Any truth to this?
There are two ways to manipulate the volume of songs on the iPod. The first is the way done by
EUPod and foo_pod's "Volume Adjustment" preference item. This boosts the volume only, since as of iPod firmware version 2.2 (at least), there is no way to lower the volume. This is really only useful for compensating for volume limited iPods, such as those sold in Europe.
Edit: My mistake - you actually can lower the volume. I could have sworn it didn't work at one point, just I just did a quick test, and in fact, it does work on the iPod (3G, version 2.2). The range is -255 to 255, so since this is an unsigned 32 bit value, the lowest volume (i.e. silence) is 4,294,967,041.
The second way is through the SoundCheck entry in the iTunesDB. I'm not sure what you mean by "manipulating volume will give better results than Sound Check", but the SoundCheck field in the iPod database is just a means of having fine control over the output volume. foo_pod uses ReplayGain to calculate this value, but you can set this value however you wish. The only downside (and this can be an upside as well), is that SoundCheck needs to be enabled on the iPod for the volume adjustment to be active.
Actually, I think I do understand. What the author of iVolume means by it being better than SoundCheck is that he feels that ReplayGain (which iVolume uses) is a better algorithm than the SoundCheck algorithm used in iTunes. Which is basically correct, since ReplayGain can calculate the volume of an entire album, whereas SoundCheck in iTunes just does per-track gain.
Note that "SoundCheck" in the iTunesDB is just an unsigned integer value representing the volume gain adjustment in milliWatts, while "SoundCheck" in iTunes is Apple's ReplayGain equivalent.
QUOTE
Info I'm looking for includes:
a) Where & how is the Volume stored in an Apple .mp4 file? Or is it in the iTunes DB? Any pointers to docs on this would be apprecated.
I don't know about the MP4 container and if it has any volume field, but iTunes uses a field in the iTunesDB. Download
iPodDB and look at iPod_mhit::soundcheck.
QUOTE
b) Or would it be easier to use the QuickTime API to set the volume?
I can't imagine it would be easier than setting the SoundCheck value in the iTunesDB, and it would modify your song.
QUOTE
c) In either case, how are the replaygain db levels mapped to Apple volume levels???
The C code for converting ReplayGain to SoundCheck is: soundcheck = 1000 * pow(10.0, (-0.1 * gain))
Feel free to contact me if you have any other questions, but from what I understand, foo_pod already done exactly what you are looking for.