annotate _beattracker/bt_parms.m @ 9:4ea6619cb3f5 tip

removed log files
author matthiasm
date Fri, 11 Apr 2014 15:55:11 +0100
parents b5b38998ef3b
children
rev   line source
matthiasm@8 1 function p = bt_parms(res)
matthiasm@8 2
matthiasm@8 3 if nargin<1
matthiasm@8 4 res = 0.01161;
matthiasm@8 5 end
matthiasm@8 6
matthiasm@8 7 p.fs = 44100;
matthiasm@8 8
matthiasm@8 9 p.timeres = round(p.fs * res);
matthiasm@8 10
matthiasm@8 11 p.winlen = round(512^2/p.timeres);
matthiasm@8 12
matthiasm@8 13 p.step = round(p.winlen/4);
matthiasm@8 14
matthiasm@8 15 p.bwinlen = 512; % always!
matthiasm@8 16 p.bstep = 128; % for the beat tracker!
matthiasm@8 17
matthiasm@8 18 % step and consistency thresholds from beat tracker
matthiasm@8 19 p.stepthresh = round(8*(512/p.timeres));
matthiasm@8 20 p.constthresh = round(p.stepthresh/2);
matthiasm@8 21
matthiasm@8 22 % parameter for rayleigh distribution weighting
matthiasm@8 23 % p.rayparam = round(43*(512/p.timeres));
matthiasm@8 24 p.rayparam = round(33*(512/p.timeres));
matthiasm@8 25
matthiasm@8 26 % minimum and maximum periodicities for comb filterbank
matthiasm@8 27 p.pmax = round(80*(512/p.timeres));
matthiasm@8 28 p.pmin = round(4*(512/p.timeres));
matthiasm@8 29 p.lowest = round(21*(512/p.timeres)); % dixon upper limit of 247 bpm
matthiasm@8 30
matthiasm@8 31 %parameters for adaptive movingm mean threshold
matthiasm@8 32 p.pre = round(8*(512/p.timeres));
matthiasm@8 33 % p.post = round(7*(512/p.timeres));
matthiasm@8 34 p.post = p.pre-1;
matthiasm@8 35
matthiasm@8 36 % factor for converting between beat period and tempo
matthiasm@8 37 p.fact = 60*p.fs/p.timeres;
matthiasm@8 38