Wiki » History » Version 1
Chris Cannam, 2014-07-18 07:54 PM
1 | 1 | Chris Cannam | h1. Wiki |
---|---|---|---|
2 | 1 | Chris Cannam | |
3 | 1 | Chris Cannam | Trying this out in the "Piano Evaluation of the Silvet Note Transcription plugin":/projects/silvet/wiki/Piano_Evaluation_for_Level_Normalisation |
4 | 1 | Chris Cannam | |
5 | 1 | Chris Cannam | h3. First attempt |
6 | 1 | Chris Cannam | |
7 | 1 | Chris Cannam | As of commit:e36fe9312ad4 |
8 | 1 | Chris Cannam | |
9 | 1 | Chris Cannam | We have a "target" RMS value T (example 0.05). Start with an initial gain G equal to 1. |
10 | 1 | Chris Cannam | |
11 | 1 | Chris Cannam | At each sample: |
12 | 1 | Chris Cannam | |
13 | 1 | Chris Cannam | * Update the RMS level of the past 4 seconds of audio |
14 | 1 | Chris Cannam | * Find the gain G' that would be necessary to make that level equal to T (i.e. T / rms) |
15 | 1 | Chris Cannam | * 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) |
16 | 1 | Chris Cannam | * Return the sample scaled by G |