Wiki » History » Version 2
Version 1 (Chris Cannam, 2014-07-18 07:54 PM) → Version 2/6 (Chris Cannam, 2014-07-18 07:57 PM)
h1. Wiki
Trying this out in the "Piano Evaluation of the Silvet Note Transcription plugin":/projects/silvet/wiki/Piano_Evaluation_for_Level_Normalisation
h3. First attempt
As of commit:e36fe9312ad4
The aim is just to make the RMS level across a few seconds of audio tend toward some target.
We have a target "target" RMS value T (example 0.05). Start with an initial gain G equal to 1.
At each sample:
* Update the RMS level of the past 4 seconds of audio
* Find the gain G' that would be necessary to make that level equal to T (i.e. T / rms)
* Update our stored gain G to move it 1/N of the distance from G to G' (where N is 0.5 seconds in sample count)
* Return the sample scaled by G
Trying this out in the "Piano Evaluation of the Silvet Note Transcription plugin":/projects/silvet/wiki/Piano_Evaluation_for_Level_Normalisation
h3. First attempt
As of commit:e36fe9312ad4
The aim is just to make the RMS level across a few seconds of audio tend toward some target.
We have a target "target" RMS value T (example 0.05). Start with an initial gain G equal to 1.
At each sample:
* Update the RMS level of the past 4 seconds of audio
* Find the gain G' that would be necessary to make that level equal to T (i.e. T / rms)
* Update our stored gain G to move it 1/N of the distance from G to G' (where N is 0.5 seconds in sample count)
* Return the sample scaled by G