Digital System Processing (Audio Processing)

조회 수: 2 (최근 30일)
Lina Ngoopos
Lina Ngoopos 2020년 12월 9일
댓글: Lina Ngoopos 2020년 12월 9일
I'm working on project to find the piano notes of a song. From the time domain graph, I was able to find the correct frequency where the note is present. I used: [S,F,T] = spectrogram (y, 512 , [] , 512, fs); to get the frequency of my song. But the size of the matrix S is too big and I cannot find the correcr frequency row. Can someone please help me understand how to get the correct row of frequency knowing the time?
Thanks
  댓글 수: 2
Mathieu NOE
Mathieu NOE 2020년 12월 9일
hello
do you have a audio (wav) file to share ?
Lina Ngoopos
Lina Ngoopos 2020년 12월 9일
Hello! Unfortunately, the audio that I have is the format .m4a, I cannot attached it. My problem is understanding how to extract the frequency from the spectrogram array knowing the time. Is there a way you can explan this to me without me sending the audio? You can use any .wav files you can have. It is the concept that I'm trying to understand

댓글을 달려면 로그인하십시오.

채택된 답변

Elimelech Schreiber
Elimelech Schreiber 2020년 12월 9일
편집: Elimelech Schreiber 2020년 12월 9일
If you have a specific time, then you should probably find the maximum frequency at that time, in the matrix S.
Each column in the matrix S contains the magnitudes of all the processed frequencies at a certain timestep.
e.g. Lets say t=1.13[sec].
first find the correct time index in T, which index 'i' yields T[i] =~ t (= 1.13) :
[~, i ] = min(abs(T - t))
lets say you've found i = 11,
now find the INDEX of the maximum magnitude in the i-th column of S:
[~, maxIdx] = max(S(:, i) ) % S(:, i)- The i-th column, containing freq. magnitudes at timestep i
finaly convert that index into a frequency, using F:
maxFrequency = F[maxIdx];
  댓글 수: 5
Elimelech Schreiber
Elimelech Schreiber 2020년 12월 9일
Yes, replace it if you have already found it.
And skip that step: that line is meant to find the correct index.
Lina Ngoopos
Lina Ngoopos 2020년 12월 9일
Thank you very much! I appreciate the help!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by