Mercurial > hg > tipic
view src/calc_delays.m @ 15:368bb5a1b4bf
Don't carry out expensive construction in the Vamp plugin ctor. Add tuning freq parameter (not implemented yet though)
author | Chris Cannam |
---|---|
date | Mon, 17 Aug 2015 15:51:13 +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));