Hi,
Replying to myself...
I found some code in madplay (http://www.underbit.com/products/mad/), specifically in the file player.c, which could be useful as a basis for a Python implementation. I'll look a bit further in this, when I find some time. Volunteers are of course welcome, as well.
Jörg
On 20.07.05, Joerg Lehmann wrote:
Hi Dag,
On 20.07.05, Dag Wieers wrote:
On Mon, 18 Jul 2005, Joerg Lehmann wrote:
That's what I was trying to do for MP3 files. However, I failed because I couldn't manage to bring the supposedly authorative tool mp3gain to insert tags (and not to adjust the whole file) ;-) And if somebody provide me with a pointer to a reference where I can find all this, it would really help.
I just found this:
http://www.hydrogenaudio.org/forums/index.php?showtopic=24527&mode=threa...
which explains to me what you mean. And as far as I can see there is no option to tell mp3gain to NOT change the mp3 file and just add the replay gain tags.
Which seems silly, because the beauty of replay gain is the fact that it is just a tag, nothing more complex than that.
Great ;-) It's even better. MP3Gain adds information about the adjustment in so-called APE tags, which seems to be the de-facto standard for ReplayGain information [1]. Now I at least know, why my id3 tagging programs didn't show them... The only OS tag library which seems to be able to read APE tags is TagLib, at least in recent versions. There are Python bindings for this library, but I've not looked further whether they are of reasonable quality.
All this information can be found on the nice hydrogeneaudio wiki, which I just discoverd:
http://wiki.hydrogenaudio.org/index.php?title=Replaygain
But I don't see who this would matter for pytone. I wouldn't advice people to use mp3gain really, but if the tags exist pytone shouldn't care what mp3gain did, just act according to the tag.
I matters as far as PyTone has to be able to read the tag, and this is a bit tricky, as I've discussed above.
In the case of Ogg Vorbis, everything seems to be more clear. On the other hand, I do only have a couple of Ogg Vorbis files (I only use them for testing purposes), so my motivation is not too high to implement this feature without being able to use it by myself...
Jörg[1] To make things even worse, LAME uses the mp3info header to store ReplayGain (actually only track gain) information. It seems that no player supports this so far. But probably, we could just ignore this "standard"