- June 30, 2005
- 250
- 0
- Thread starter
- #91
knutinh said:I dont know any C#, but Id love to participate on algorithm/low-level implementation of a normalization routine.
If all files are converted to 44.1/16bit wav files beforehand, I think that it should be quite easy to do a file-scan for statistics, compare the given files, and do a individual file attenuation before returning to actually burning the CD.
Adobe Audition has quite nice normalisation features.
Id say that it is sufficient to scan for peak amplitude as well as average "percieved" amplitude (using some weighing filter taking our hearings increased sensitivity for midrange sounds).
Then you get two vectors:
peak1, percieved1
peak2, percieved2
...
Now, we dont want any peak levels to exceed the maximum allowable amplitude (0dB, '1' or +/- 32768). So take the maximum
Find the global "gain factor" by checking all files percieved amplitude against peak amplitude to find the one song that limits the total gain (typically one with high peak-to-rms ratio) and use this factor with the inverse of percieved amplitude to attenuate every song.
Now, the main obstacles would be finding fast and compact means to do a full wav file convolution (weighing filter) as well as attenuation. Adobe audition is quite slow, so I think it is hard to do very fast.
BTW, the convolution would contain only a few filter taps, no need to have milimetre-precision.
The UI really should have only a simple selection for "no normalise", "normalise by peak" and "normalise by percieved soundlevel"
regards
Knut
Your more than welcome to help out The more the merrier (and less work for me!)
All the source code for the MyBurner plugin is included in the download. Grab a copy of that then look for the function called MakeWav. This uses Madlibb.dll to do the MP3 -> Wav conversion. After this you have your temporary wav file to do you normalisation on.
Egon