I am currently writing a music comparing AI code on MATLAB. It is my graduation project.
Firstly, I printed filtered with grayscale 1,0 spectrogram graph of our saved music with the function i write and i recorded 5 second sound. I also processed same way to the sound I recorded from external mic.
SPECTROGRAM OF MUSIC:
5 SECOND RECORDED FILE:
They are both 129xSamples
How can i compare and search from the exact music matrix as fast as possible? I wrote the little function but i cant use with this way. It took apx 56 second and its too long for one song.
Here my little code:
Music1 = extractBefore(Music1,".");
Sample1 = extractBefore(Sample1,".");
[a,b] = size(M1);
[c,d] = size(S1);
sira = 1;
for SS = 1:b-d+1
count = 0;
for jj = sira:d+(sira-1)
for ii = 1:129
list1(end+1) = CC;
What is the best way to compare two matrices?
I am planning to compare from 100 to 200 music sample as fast as possible. I am open to any recommendations.
Thanks a lot