Scaling an audio signal to a given rms-in-dB value
조회 수: 5 (최근 30일)
이전 댓글 표시
I need to scale a given audio signal to a given acoustic rms-amplification (60dB) and a given base acoustic pressure (p0=20*10^(-6)). How to do this?
What I've tried so far:
signal=audioread('signal.wav');
RMS_signal_dB = 20*log10(rms(signal)/p0)
% Amplification difference to 60dB
Diff_signal_dB = 60 - RMS_signal_dB;
% Compute factor
Diff_signal = p0 * 10^(Diff_signal_dB/20);
% Scale
new_signal = Diff_signal*signal;
% New value on 60 dB?
new_RMS_signal_dB = 20*log10(rms(new_signal)/p0);
end
The new rms amplification value differs from 60 dB... Could be a mathematical fault, maybe someone can help. Thanks!
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Audio Processing Algorithm Design에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!