function singleFolderMFCCComp
% singleFolderFeatureComp
%
% Funkce pro vypocet MFCC parametru
%
% Stepan Miklanek, 2018

DBpath = uigetdir;
DBinfo = dir(DBpath);
filenames = extractfield(DBinfo(3:end),'name');

nAudio = length(filenames);

% nAudio = 1;

mkdir(DBpath,'mirPar');

%% MFCC

mfccCell = cell(52,13);

for n = 1:nAudio
        
    currentFile = filenames{n};  
    filename = [DBpath,'\',currentFile];
    
    a = miraudio(filename,'Mono',1);
    
    mfcc = mirgetdata(mirmfcc(a,'Frame','Rank',1:13));
    mfccCell{n,1} = mfcc(1,:);
    mfccCell{n,2} = mfcc(2,:);
    mfccCell{n,3} = mfcc(3,:);  
    mfccCell{n,4} = mfcc(4,:);
    mfccCell{n,5} = mfcc(5,:);
    mfccCell{n,6} = mfcc(6,:);
    mfccCell{n,7} = mfcc(7,:);  
    mfccCell{n,8} = mfcc(8,:);
    mfccCell{n,9} = mfcc(9,:);
    mfccCell{n,10} = mfcc(10,:);
    mfccCell{n,11} = mfcc(11,:);
    mfccCell{n,12} = mfcc(12,:);
    mfccCell{n,13} = mfcc(13,:);
    
        
end
savepathMIR = [DBpath,'\mirPar\mfccCell.mat'];
save(savepathMIR,'mfccCell');

clearvars mfccCell

      
end

