matthiasm@8: function p = bt_parms(res) matthiasm@8: matthiasm@8: if nargin<1 matthiasm@8: res = 0.01161; matthiasm@8: end matthiasm@8: matthiasm@8: p.fs = 44100; matthiasm@8: matthiasm@8: p.timeres = round(p.fs * res); matthiasm@8: matthiasm@8: p.winlen = round(512^2/p.timeres); matthiasm@8: matthiasm@8: p.step = round(p.winlen/4); matthiasm@8: matthiasm@8: p.bwinlen = 512; % always! matthiasm@8: p.bstep = 128; % for the beat tracker! matthiasm@8: matthiasm@8: % step and consistency thresholds from beat tracker matthiasm@8: p.stepthresh = round(8*(512/p.timeres)); matthiasm@8: p.constthresh = round(p.stepthresh/2); matthiasm@8: matthiasm@8: % parameter for rayleigh distribution weighting matthiasm@8: % p.rayparam = round(43*(512/p.timeres)); matthiasm@8: p.rayparam = round(33*(512/p.timeres)); matthiasm@8: matthiasm@8: % minimum and maximum periodicities for comb filterbank matthiasm@8: p.pmax = round(80*(512/p.timeres)); matthiasm@8: p.pmin = round(4*(512/p.timeres)); matthiasm@8: p.lowest = round(21*(512/p.timeres)); % dixon upper limit of 247 bpm matthiasm@8: matthiasm@8: %parameters for adaptive movingm mean threshold matthiasm@8: p.pre = round(8*(512/p.timeres)); matthiasm@8: % p.post = round(7*(512/p.timeres)); matthiasm@8: p.post = p.pre-1; matthiasm@8: matthiasm@8: % factor for converting between beat period and tempo matthiasm@8: p.fact = 60*p.fs/p.timeres; matthiasm@8: