Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Replaygain -> SoundCheck convertor (Read 13802 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Replaygain -> SoundCheck convertor

This is something I just made for people that still use iTunes for their ipod management, but also want to use Replay Gain.

http://uclc.info/ipod/

Usage:
ipodrg.exe file.mp3 a for Album Gain
ipodrg.exe file.mp3 t for Track Gain

If it finds a Replay Gain tag AND a Sound Check tag,
it alters the Sound Check tag to match the Replay Gain value.

I ran it as follows on my complete iTunes library:
for /r %i in (*.mp3) do ipodrg "%i" a >> d:\log.txt
You can check for any error afterwards in log.txt
Took about 25 secs for 1788 files.

Thanks to Otto42, Mike Giacomelli, Aero and anyone I forgot at Hydrogenaudio for clearing out the converion formula.

I still don't know what all the values in the iTunNORM tag mean so I just replace them all with the Replay Gain value.
What I do know is that all those values seem to have an effect on the dB value given by Get Info in iTunes.

Feel free to debug, add features, ...


The rgsc program is a simple program that gives a list of all the tracks in an iTunesDB file together with their Sound Check value. I used it to quickly check the results.
Usage:
rgsc iTunesDB

Replaygain -> SoundCheck convertor

Reply #1
Oh man, you may just be my savior!  I have been running my mp3s through replaygain in foobar, manually converting the Replaygain Album Gain to a Soundcheck value, converting it to hexadecimal and then editing every single mp3 file in my library.  A program to do this for me would be a godsend! 

I have a couple questions.  First, can you explain what you mean here?

Quote
I ran it as follows on my complete iTunes library:
for /r %i in (*.mp3) do ipodrg "%i" a >> d:\log.txt[a href="index.php?act=findpost&pid=373803"][{POST_SNAPBACK}][/a]
I'm assuming the command line is somehow telling it to run recursively through subfolders, but I can't figure out what does what.  If i enter "%i" (Do I enter the quotes?) into the command line does the program just process all the mp3 files in a folder/subfolders or does it process all mp3s it finds on your computer?  How do I tell it which folder to process?

On a side note, have you run into any problems modifying all of the values in the iTunNorm field?  I started off only modifying the first value, but then noticed that if the second value produced a lower volume than my modfied value, iTunes would use the lower of the two.  The other values didn't seem to have any effect so I have been leaving them alone.  Don't have any idea what they do though.

Replaygain -> SoundCheck convertor

Reply #2
Quote
Oh man, you may just be my savior!  I have been running my mp3s through replaygain in foobar, manually converting the Replaygain Album Gain to a Soundcheck value, converting it to hexadecimal and then editing every single mp3 file in my library.  A program to do this for me would be a godsend!  
[a href="index.php?act=findpost&pid=377911"][{POST_SNAPBACK}][/a]

Wow, and how many files were that? 

Quote
I have a couple questions.  First, can you explain what you mean here?

Quote
I ran it as follows on my complete iTunes library:
for /r %i in (*.mp3) do ipodrg "%i" a >> d:\log.txt[a href="index.php?act=findpost&pid=373803"][{POST_SNAPBACK}][/a]
I'm assuming the command line is somehow telling it to run recursively through subfolders, but I can't figure out what does what.  If i enter "%i" (Do I enter the quotes?) into the command line does the program just process all the mp3 files in a folder/subfolders or does it process all mp3s it finds on your computer?  How do I tell it which folder to process?
[a href="index.php?act=findpost&pid=377911"][{POST_SNAPBACK}][/a]

Help for, gives you all the info, but shortly:

Without /r is just takes all the mp3's in the current directory and with /r it takes also all mp3's in subdirectories under the current directory.
The quotes are needed for filenames with spaces in them.
The >> d:\log.txt is needed to easily check the results afterwards, but it's not necessary.

Quote
On a side note, have you run into any problems modifying all of the values in the iTunNorm field?  I started off only modifying the first value, but then noticed that if the second value produced a lower volume than my modfied value, iTunes would use the lower of the two.  The other values didn't seem to have any effect so I have been leaving them alone.  Don't have any idea what they do though.
[a href="index.php?act=findpost&pid=377911"][{POST_SNAPBACK}][/a]

Me neither, but setting them all on the same value ensured that the dB value displayed in iTunes is the correct one.

Replaygain -> SoundCheck convertor

Reply #3
Quote
Wow, and how many files were that?   [a href="index.php?act=findpost&pid=378132"][{POST_SNAPBACK}][/a]

Um yeah, so far we're talking like 6500+  You can see why I am so excited that you posted this.

Quote
Help dir, gives you all the info, but shortly:
[a href="index.php?act=findpost&pid=378132"][{POST_SNAPBACK}][/a]

I must be missing something, because all I can find in the directory is an executable and a cpp file which I don't know how to use.  The exe file doesn't extract anything as far as i can tell so I just assumed I need to run it from a DOS shell or something.  Where is the help directory you speak of?

Replaygain -> SoundCheck convertor

Reply #4
Quote
Quote
Wow, and how many files were that?   [a href="index.php?act=findpost&pid=378132"][{POST_SNAPBACK}][/a]

Um yeah, so far we're talking like 6500+  You can see why I am so excited that you posted this.

Quote
Help dir, gives you all the info, but shortly:
[a href="index.php?act=findpost&pid=378132"][{POST_SNAPBACK}][/a]

I must be missing something, because all I can find in the directory is an executable and a cpp file which I don't know how to use.  The exe file doesn't extract anything as far as i can tell so I just assumed I need to run it from a DOS shell or something.  Where is the help directory you speak of?
[a href="index.php?act=findpost&pid=378144"][{POST_SNAPBACK}][/a]


Sorry, my mistake, I meant the command: D:\>help for
The for command is one of the basic batch commands that you can use in the windows Command Prompt.


It is a command line program.
The basic usage is explained in the ipodrg.cpp and when you run ipodrg without any parameters:
D:\>ipodrg
Wrong command line, enter:
ipodrg file.mp3 a      for Album Gain
ipodrg file.mp3 t      for Track Gain

Let say you have a file called Song01.mp3 and it is already tagged with Foobar for Replaygain and tagged with iTunes for Soundcheck and you want to change the Souncheck value to the Album Gain value you just run:

ipodrg.exe Song01.mp3 a

When you use the for loop it's also handy to place the location of the ipodrg.exe file in the PATH variable to make it accessible anywhere.

I hope it is a bit more clear now.

Replaygain -> SoundCheck convertor

Reply #5
Yes, much clearer now thanks.

Unfortunately it isn't finding my replaygain tags.  They are ID3v2, do they need to be APE?  I'm not sure how that would work though.  iTunes can't read APE tags can it?

Replaygain -> SoundCheck convertor

Reply #6
Quote
Yes, much clearer now thanks.

Unfortunately it isn't finding my replaygain tags.  They are ID3v2, do they need to be APE?  I'm not sure how that would work though.  iTunes can't read APE tags can it?
[a href="index.php?act=findpost&pid=378312"][{POST_SNAPBACK}][/a]


No. All my tags are ID3v2 for that reason. Can you give the hex code of the replay gain tag?

This program was a quick hack and consequently only handles tags created in my situation which is Foobar2000 0.8.3 and iTunes 6.0.4.2.

But if you also use Foobar2000 0.8.3 it should create the same replaygain tags.

Edit: I think you wrote them in ISO-8859-1. It's better to use UTF-16, iTunes also recognizes and uses UTF-16.
Look at the settings for ID3v2 tag support in foobar. The first one should be unchecked.

Replaygain -> SoundCheck convertor

Reply #7
I thought about the ISO option so i unchecked it, reran Replaygain and then tried your program, still no go.  How would I go about getting the replaygain tag in hex?

edit: What about the second option for writing Byte Order Markers?  checked or unchecked?

edit2: Ok, i think I kind of understand what you are doing with the program so here is the hex code for my replygain album gain tag:

00000170:72 65 70 6c 61 79 67 61 69 6e 5f 61 6c 62 75 6d    replaygain_album
00000180:5f 67 61 69 6e 00 2d 37 2e 35 32 20 64 42            _gain.-7.52 dB 

It looks like the corresponding line in the cpp file is the same up until the last three characters.  My totally uneducated guess is that that is where the problem is.

Replaygain -> SoundCheck convertor

Reply #8
Quote
I thought about the ISO option so i unchecked it, reran Replaygain and then tried your program, still no go.  How would I go about getting the replaygain tag in hex?

edit: What about the second option for writing Byte Order Markers?  checked or unchecked?

edit2: Ok, i think I kind of understand what you are doing with the program so here is the hex code for my replygain album gain tag:

00000170:72 65 70 6c 61 79 67 61 69 6e 5f 61 6c 62 75 6d    replaygain_album
00000180:5f 67 61 69 6e 00 2d 37 2e 35 32 20 64 42             _gain.-7.52 dB 

It looks like the corresponding line in the cpp file is the same up until the last three characters.  My totally uneducated guess is that that is where the problem is.
[a href="index.php?act=findpost&pid=378359"][{POST_SNAPBACK}][/a]


Hmm it is still ISO and not utf should be like:
r.e.p.l.a.y.g.a.i.n._.a.l.b.u.m._.g.a.i.n.....-.4...3.6. .d.B.

Note the . UTF-16 uses 2 byte for each char.
Did you first remove the replaigain info?

Wait, I will add support for ISO also.
Edit: Done, should now also work for ISO replaygain tags.

Replaygain -> SoundCheck convertor

Reply #9
First off, thanks for modifying the program to work with ISO format.  Everything seems to be working very well, except that you have the values for tg and ag reversed.  I ran it with the t switch to verify. 

I hadn't removed the replaygain info when I ran it through foobar the second time, but I did tell it not to skip files that already had replaygain info in them.  When I viewed the tag in my tag editor the iTunNorm tag displayed a little differently than before.  Since I could see that the tag was modified I just assumed it had also converted it to UTF.  It turns out that whatever changes it did to the tag, made the iTunNorm tag unrecognizable to your program though.  I ran your program on an unmodified of the mp3s and it recognized both tags.

I just want to thank you again for providing the program and also for taking the time to troubleshoot it with me.  This little program is going to save me so much time.

Replaygain -> SoundCheck convertor

Reply #10
Quote
First off, thanks for modifying the program to work with ISO format.  Everything seems to be working very well, except that you have the values for tg and ag reversed.  I ran it with the t switch to verify.
[a href="index.php?act=findpost&pid=378554"][{POST_SNAPBACK}][/a]

Fixed now.

Replaygain -> SoundCheck convertor

Reply #11
Thanks for updating the program.

Now that everything is working I was wondering if it would be possible to have the program send the filename to the log file with the replaygain and soundcheck values.  I wanted to verify some of the conversions and it's tough to keep track of which values go with which tracks.  I can imagine that trying to find an error after running a bunch of files through would be particularly difficult without the filenames in the log.

Replaygain -> SoundCheck convertor

Reply #12
Thanks for updating the program.

Now that everything is working I was wondering if it would be possible to have the program send the filename to the log file with the replaygain and soundcheck values.  I wanted to verify some of the conversions and it's tough to keep track of which values go with which tracks.  I can imagine that trying to find an error after running a bunch of files through would be particularly difficult without the filenames in the log.


Done.

Replaygain -> SoundCheck convertor

Reply #13
Dude, you are soooo rad!  I really appreciate all of your help.  I'm going to run this on my collection this weekend.  If I run into any issues I'll let you know, but everything looks like it's working great.

Thanks.

Replaygain -> SoundCheck convertor

Reply #14
Hello JohanDeBock

sorry for digging out this old thread.

I was trying to download your "ipodrg"-Tool but the Link is down and I can't find a working mirror. I know this tool was made in 2006 but I don't know if there is any other utility or software which will convert replay gain tags to COMM_ITUNNORM (iTunes SoundCheck).

It would be very nice if you could re-upload this tool somewhere.

Thank you,
Ted

Replaygain -> SoundCheck convertor

Reply #15
... but I don't know if there is any other utility or software which will convert replay gain tags to COMM_ITUNNORM (iTunes SoundCheck).
::

Mp3tag can do it.


Greetings, Surf.

::