Mercurial > hg > ape
view aux/finddouble.m @ 0:4fd284285159
Adding listening test plus some helpful functions and scripts.
author | Brecht <b.deman@qmul.ac.uk> |
---|---|
date | Thu, 24 Apr 2014 23:53:31 +0100 |
parents | |
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