Incorrect downsampling audio range
1 view (last 30 days)
Show older comments
Hi, I have an .wav input audio with the signal in the range [-1;1] at 44.1kHz and I try to apply a down-sampling to about 2kHz but as result I have a signal that exceed the original audio range [-1;1]. It seen like the anti-aliasing filter amplify the signal. I suspect it may be because the filter is not ideal or the algorithm introduce some kind of distorsion.
Below is the code:
[x,F]=audioread('example.wav');
Fs=F/24; %1837.5Hz
x_decimate=decimate(x,F/Fs,2,'iir');
Results:
max(x)
1.000
min(x)
-1.000
max(x_decimate)
1.1108
min(x_decimate)
-1.1078
What is wrong? Am I making a mistake?
Thank you
4 Comments
Ameer Hamza
on 5 May 2020
What are the issues with values going beyond -1 and +1? I guess if the decimated signal looks similar to the original signal, then it should not be a problem. You can also consider rescaling then filtered so that it remains in the range of -1 to 1.
Answers (0)
See Also
Categories
Find more on Simulation, Tuning, and Visualization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!