Help interpreting Audio-Signal from 'audioread( .wav)' output?

11 views (last 30 days)
Hey
I am a beginner at MatLab and working with Audio-Signals. So I have a few basic questions:
Using the audioread('.wav') to sample a wav-file, I become to outputs, [data,fs]. data=A Matrix with two vectors of samples of the wav-file, and fs=the sampling-rate.
  1. Why do I get two vectors of data?
  2. How do I best proceed to get a plot of the frequency-domain?
  3. Should I only use the fft() on one of the vectors?
  4. What do I get if I make a convolution of the two vectors of the data?

Accepted Answer

Walter Roberson
Walter Roberson on 13 Aug 2015
  1. you do not get two vectors of data. You get an N x 2 array. The left channel is in the first column and the right channel is in the second column.
  2. plot(abs(fft(A(:,1)))) . Notice this will give you the frequency information over the entire time. You might be more interested in frequency information over shorter periods of time. For that look at spectrogram
  3. It depends on your purpose. You can use fft(A) if you want. The result will be the two separate ffts combined into one array, as if you had done [fft(A(:,1)), fft(A(:,2))]
  4. something pretty useless
  4 Comments
Mukhammadsher Shermamatov
Edited: Mukhammadsher Shermamatov on 1 May 2018
Thank you for your answer it was helpful for me. I've implemented FFT myself, now i am using [myfft(A(:,1)), myfft(A(:,2))] and it is giving the same graph with matlab's fft function. The problem now i have, is that using ifft it does not give back my original input signal. Can you help me to understand it?
Shivam Dubey
Shivam Dubey on 28 Nov 2020
Why do you mean by N x 2 arrays? Each column represents the sound level right? How are they different?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!