Mercurial > hg > ape
view aux/autoaligntest.m @ 3:1f7b986dab05
Added autoalign.m: aligns audio by zero-padding before the signal to align the peak of the crosscorrelation function
author | Brecht De Man <b.deman@qmul.ac.uk> |
---|---|
date | Mon, 17 Nov 2014 23:01:09 +0000 |
parents | |
children |
line wrap: on
line source
% autoalign test % generate files to test autoalign.m [fragment,fs] = audioread('../../AUDIO/SR1/pro.wav', [10*96000, 20*96000]); % from 0:10 to 0:20 % files with increasing leading zeros - end result should be all same file N = 5; spacing = 45678; % samples for i = 1:N audiowrite(['autoaligntest' num2str(i) '.wav'], ... % file name [zeros(i*spacing, size(fragment, 2)); fragment], ... % audio fs, 'BitsPerSample', 24); % format end