Different length of sound files with different sampling frequencies

5 views (last 30 days)
Dear all,
Im currently struggling to understand what is happening. So, I created a sound using the audiowrite function (the sound is created using two different sounds but I dont think it matters) first with a sampling frequency of 44100 Hz, and another one, the sound file is the same but the sampling frequency is 48000 Hz. Now Im observing that the sound produced at 44100Hz is approx. 30sec longer than the other one (48000Hz sampling). It looks like phase shifting of some sort, but Im not sure. Any help/explanation is appreciated. I also made a amplitude/time plot for better understanding below
untitled.jpg
  8 Comments
Denis Benka
Denis Benka on 31 May 2019
@Stephen, yes dont mind the figure, Im just wondering how (or if) the sampling frequency is affecting the length of the sound file (in seconds). But the size (in kB) of both files seems equal even though the lengths differ, which is also kinda odd to me
Denis Benka
Denis Benka on 31 May 2019
@Stephen, @Geoff, I think I finally understand what is happening. Those calculations are exactly what I wanted to know, shame on me I forgot about these. Thanks a lot!

Sign in to comment.

Answers (0)

Categories

Find more on Audio I/O and Waveform Generation in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!