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.