Mercurial > hg > tipic
view src/calc_delays.m @ 42:00b6ae41efbe
Update to use qm-dsp instead of files from constant-q-cpp and bqvec. Some of the classes here (e.g. DCT) have moved to qm-dsp in the meantime.
author | Chris Cannam |
---|---|
date | Wed, 07 Oct 2015 11:46:33 +0100 |
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));