function  singleFolderConvertPitch

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


mkdir(DBpath,'pitchFiles');

for n = 1:length(filenames)
        
    currentFile = filenames{n};  
    filename = [DBpath,'\',currentFile];
    [~,name,~] = fileparts(filename);

    a = audioread(filename);
    p = monoPitch(a,4410);

    savepath = [DBpath,'\','pitchFiles','\',name,'.mat'];
    save(savepath,'p')
     
end

end

