rg2sc: ReplayGain to iTunes SoundCheck

I wrote a perl script to convert mp3 ReplayGain APEv2 tags written by mp3gain to iTunes SoundCheck ID3v2 COMM iTunNORM tags. This will enable me to listen to my mp3 collection on my iPod with the volume between the tracks normalized.
It should work with ID3v2 ReplayGain tags as well, but let me know if it doesn't.

I wrote this script because all my mp3s are tagged using mp3gain which creates APEv2 tags. Unfortunately iTunes does not support this and creates a custom ID3v2 COMM (comment) iTunNORM tag when the SoundCheck option is enabled. The ReplayGain algorithm is far superior to the SoundCheck one, so I really wanted to use the values already present in the APEv2 tags.

I found a commercial program called iVolume that does the same thing, except it needs the iTunNORM tag already present, and it doesn't run on Linux.

Note that my script does not calculate or add any ReplayGain values by itself. You will have to use mp3gain for that first.

The script is called rg2sc.