To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Revision:

root / _beattracker / bt_parms.m

History | View | Annotate | Download (926 Bytes)

1
function p = bt_parms(res)
2

    
3
if nargin<1
4
    res = 0.01161;
5
end
6

    
7
p.fs = 44100;
8

    
9
p.timeres = round(p.fs * res);
10

    
11
p.winlen = round(512^2/p.timeres);
12

    
13
p.step = round(p.winlen/4);
14

    
15
p.bwinlen = 512; % always!
16
p.bstep = 128; % for the beat tracker!
17

    
18
% step and consistency thresholds from beat tracker
19
p.stepthresh = round(8*(512/p.timeres));
20
p.constthresh  = round(p.stepthresh/2);
21

    
22
% parameter for rayleigh distribution weighting
23
% p.rayparam = round(43*(512/p.timeres));
24
p.rayparam = round(33*(512/p.timeres));
25

    
26
% minimum and maximum periodicities for comb filterbank
27
p.pmax = round(80*(512/p.timeres));
28
p.pmin = round(4*(512/p.timeres));
29
p.lowest = round(21*(512/p.timeres)); % dixon upper limit of 247 bpm
30

    
31
%parameters for adaptive movingm mean threshold
32
p.pre = round(8*(512/p.timeres));
33
% p.post = round(7*(512/p.timeres));
34
p.post = p.pre-1;
35

    
36
% factor for converting between beat period and tempo
37
p.fact = 60*p.fs/p.timeres;
38