view aux/finddouble.m @ 1:b64c9fb34bd0

Response folder included in package (put README in it).
author Brecht <b.deman@qmul.ac.uk>
date Wed, 30 Jul 2014 12:38:47 +0100
parents 4fd284285159
children 5e72201496c8
line wrap: on
line source
function finddouble(foldername)
% FINDDOUBLE spots doubles of audio files in the same folder
% 
% by Brecht De Man at Centre for Digital Music on 15 July 2013

list = dir([foldername '\*.wav']);
sums = length(list)-1; 
for i = 1:length(list)
    audio = audioread([foldername '\' list(i).name]); 
    sums(i) = sum(sum(audio.^2));
    % find doubles in this list (method or manual)
    % find corresponding audio files; print their names
end

for i = 1:length(list)
    for j = i+1:length(list)
        if sums(i) == sums(j)
            disp(['ERROR: ' list(i).name ' = ' list(j).name])
        end
    end
end

end

% TODO: expand to more folders