view src/calc_delays.m @ 50:9c4703a2ea92

Just remove a couple of unused args
author Chris Cannam
date Tue, 14 Mar 2017 13:49:41 +0000
parents 19088c4ba50a
children
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(2:10000));
    [~,neg] = max(-f(2:10000));
    delays(n) = 2 + (pos + neg) / 2;
end

csvwrite('delays.csv', round(delays));