Deejaysystem professional tools Homepage
Forum Home Forum Home > Deejaysystem international > English-speaking forum
  Active Topics Active Topics
  FAQ FAQ  Forum Search   Register Register  Login Login

auto gain

 Post Reply Post Reply Page  <12
Author
Message
  Topic Search Topic Search  Topic Options Topic Options
Edy View Drop Down
Development Team
Development Team
Avatar

Joined: 05-Aug-2004
Location: Spain
Online Status: Offline
Posts: 981
  Quote Edy Quote  Post ReplyReply bullet Posted: 01-Nov-2004 at 23:34

Exactly. The mp3 file is not modified. The gain data is stored at the database, which is applied on each track.

Hey, could you please perform a small test for me? I'm curious about the performance of the ReplayGain algorythm and its real-time capability. The testing I'd need is: take a typical long song (around 10 minutes) and use mp3gain on it. I want to know the time taken by the analysis phase only.

This way we would know an estimation of how much CPU the algorythm could take in real time. For instance, if the analysis time is 1 minute for a 10 minutes song, then the algorythm would take a 10% CPU when used in realtime playback.

Your current results (1.75 hours analysis time for 4000 tracks) means around 38 tracks per minute, so we can expect than the CPU time will be more than affordable when using Replay Gain.

Greetings,

Edy / Deejaysystem Team
www.deejaysystem.com
Back to Top
drjack View Drop Down
Newbie
Newbie
Avatar

Joined: 26-Oct-2004
Location: United States
Online Status: Offline
Posts: 11
  Quote drjack Quote  Post ReplyReply bullet Posted: 03-Nov-2004 at 03:06

Actually I ran a couple of tests, but on a slightly slower and more "normal" machine (2.2gigahertz) since the first tests [run on a highly tweaked 3.2 machine] were not realistic.  These tests should be more indicative.

First I chose a single 19:29 minute MP3.  With stopwatch in hand, analysis took 15:02 seconds and writing the tag took an additional 3:58 seconds.

Then I took a complete Alejandro Fernandez CD containing 13 tracks (see track list below) with a total run time of 55:22 and the results were:  Analysis of all tracks 46:10 seconds, writing all tags 14:31 seconds.

Keep in mind that if you write the tags like Glen Sawyer does (which I assume you would have to) when new tracks are added to a master list, if your code detects the replay gain tag you can have it skip those tracks that have already been modified.  True, the first time through might take a while but after that it should fly.

Yes, I understand that writing the "tags" to the DB should be faster than actually updating the MP3 tags.

Then again... trying to do this, in real time, might put one heck of a load on slower CPUs

-jack-

 



Edited by drjack
Back to Top
Edy View Drop Down
Development Team
Development Team
Avatar

Joined: 05-Aug-2004
Location: Spain
Online Status: Offline
Posts: 981
  Quote Edy Quote  Post ReplyReply bullet Posted: 06-Nov-2004 at 19:10

Wow, that means that performing the analysis realtime in one track would consume around the 80% of a 2,2Ghz CPU.

The replay-gain specification applies a 10-order infinite response filter (IIR) to the waveform. A 10-order IIR filter means 20 float-point multiplications per sample and per channel. An stereo waveform would receive 40 multiplications per sample. A sample rate of 44100Hz means 44100*40 = 1,76 millions of floating-pint multiplications per second.

It seems it's currently too much to real-time processing. A 2,2Ghz CPU wouldn't be able to process two tracks with replay-gain at the same time.

Althought I'll probably implement replay-gain anyway (I think mp3gain performance could be greatly optimized) I'm also exploring other possibilities of real-time normalization. I've found another approach based on RMS power that could perform a nice normalization (not as much quality as replay-gain) with very little CPU usage.

Greetings,

Edy / Deejaysystem Team
www.deejaysystem.com
Back to Top
drjack View Drop Down
Newbie
Newbie
Avatar

Joined: 26-Oct-2004
Location: United States
Online Status: Offline
Posts: 11
  Quote drjack Quote  Post ReplyReply bullet Posted: 07-Nov-2004 at 00:58

Like I said.. while realtime "normalization" (we both know that's not quite the correct term) is a wonderful concept.. it is, and would be, processor intensive.  However, the "idea" of pre-analyzing a "master list" and wrtiing the gain info to a data base rather than directly to the MP3s has merits.  Especially if one could pre-analyze CDs.

I know that everyone does things a little differently but I must assume that many build their playlists from MP3's stored on the same computer (or accessed from the same computer) as the playback software resides on and all those tracks could easily be pre-analyzed at a convenient time just as one would with MP3gain.  However, the possiblity that a situation might arise where a track (or tracks) from a CD might need to be injected into the playlist opens up the need for those tracks to be pre-analyzed (as a background operation) before they are queued (either in sequentail or random modes).  At least by using a DB to store the info this might be possible (even if the data for the "immediate" CD was only stored temporarily).

The major benefit of using the DB (as far as I can see) is that it could be applied to more "sources" than simply MP3s.

The person who can come up with a "real time" gain normalizer that is more than just a brickwall "limiter/compressor" will be cheered by many <grin>

 

Back to Top
Edy View Drop Down
Development Team
Development Team
Avatar

Joined: 05-Aug-2004
Location: Spain
Online Status: Offline
Posts: 981
  Quote Edy Quote  Post ReplyReply bullet Posted: 12-Nov-2004 at 22:56

Well, I don't like the "background analyzing" concept. I think it it's very important the player not to do anything that it's not expected to. If new tracks of a CD are injected in the playlist, it doesn't mean that they all will be played inmediately. What if the medium is slow and the performance of the entire computer drops while all songs are being pre-analyzed?

I think it's better to perform the analysis real-time, even if the quality is not as good as mp3gain. Current method is very basic, and high-quality methods are quite CPU intensive. So the solution may be to implement two or three methods with different qualities/cpu requirements so the user could choose which one he wants.

Greetings,

Edy / Deejaysystem Team
www.deejaysystem.com
Back to Top
drjack View Drop Down
Newbie
Newbie
Avatar

Joined: 26-Oct-2004
Location: United States
Online Status: Offline
Posts: 11
  Quote drjack Quote  Post ReplyReply bullet Posted: 12-Nov-2004 at 23:07
Agreed !!  No argument
Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down