Created
July 1, 2017 22:34
-
-
Save fireattack/5e614bab979ee382ece6cf3b8a81b208 to your computer and use it in GitHub Desktop.
Normalize audio signal via target RMS (in dB)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [ y ] = normalizerms( x, targetdB ) | |
%NORMALIZERMS Summary of this function goes here | |
% Detailed explanation goes here | |
%normalize | |
targetrms=10^(targetdB/20); | |
myrms=rms(x); | |
% valueDBFS = 20*log10(abs(myrms)); | |
y=x/(myrms/targetrms); | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment