matthiasm@0: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% matthiasm@0: % Audio Degradation Toolbox matthiasm@0: % matthiasm@0: % Centre for Digital Music, Queen Mary University of London. matthiasm@0: % This file copyright 2013 Sebastian Ewert, Matthias Mauch and QMUL. matthiasm@0: % matthiasm@0: % This program is free software; you can redistribute it and/or matthiasm@0: % modify it under the terms of the GNU General Public License as matthiasm@0: % published by the Free Software Foundation; either version 2 of the matthiasm@0: % License, or (at your option) any later version. See the file matthiasm@0: % COPYING included with this distribution for more information. matthiasm@0: % matthiasm@0: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% matthiasm@0: matthiasm@0: clear matthiasm@0: matthiasm@0: dirInfo = dir('*.wav'); matthiasm@0: matthiasm@0: for k=1:length(dirInfo) matthiasm@0: filename = dirInfo(k).name; matthiasm@0: [y,fs,nbits] = wavread(filename); matthiasm@0: matthiasm@0: gain = 0.99 / max(max(abs(y))); matthiasm@0: matthiasm@0: wavwrite(y * gain,fs,24,filename); matthiasm@0: end