function aif2wav(foldername)
% AIF2WAV converts .aiff files in folder 'foldername' to .wav files. 
%
% by Brecht De Man at Centre for Digital Music, 10 June 2013

list = dir([foldername '/*.aiff']);
for i = 1:length(list)
    [x,fs] = audioread([foldername '/' list(i).name]);
    audiowrite([foldername '/' list(i).name(1:end-5) '.wav'],x,fs);
end

end