view src/calc_delays.m @ 5:dc0f2b2be9e4

Start on pitch filterbank, & bring in external code
author Chris Cannam
date Wed, 12 Aug 2015 11:46:29 +0100
parents calc_delays.m@d0880801415d
children 19088c4ba50a
line wrap: on
line source

load MIDI_FB_ellip_pitch_60_96_22050_Q25.mat;

dirac = zeros(50000, 1);
dirac(1) = 1.0;

delays = zeros(120, 1);

for n = 21:120
    f = filter(h(n).b, h(n).a, dirac);
    [~,pos] = max(f(1:10000));
    [~,neg] = max(-f(1:10000));
    delays(n) = 1 + (pos + neg) / 2;
end