Revision 23:633ec097fa56 Agent.cpp

View differences:

Agent.cpp
16 16
#include "Agent.h"
17 17
#include "BeatTracker.h"
18 18

  
19
double Agent::POST_MARGIN_FACTOR = 0.3;
20
double Agent::PRE_MARGIN_FACTOR = 0.15;
19
const double AgentParameters::DEFAULT_POST_MARGIN_FACTOR = 0.3;
20
const double AgentParameters::DEFAULT_PRE_MARGIN_FACTOR = 0.15;
21
const double AgentParameters::DEFAULT_MAX_CHANGE = 0.2;
22
const double AgentParameters::DEFAULT_EXPIRY_TIME = 10.0;
23

  
21 24
const double Agent::INNER_MARGIN = 0.040;
22
double Agent::MAX_CHANGE = 0.2;
23
double Agent::CONF_FACTOR = 0.5;
25
const double Agent::CONF_FACTOR = 0.5;
24 26
const double Agent::DEFAULT_CORRECTION_FACTOR = 50.0;
25
const double Agent::DEFAULT_EXPIRY_TIME = 10.0;
26 27

  
27 28
int Agent::idCounter = 0;
28 29

  
29
double Agent::innerMargin = 0.0;
30
double Agent::correctionFactor = 0.0;
31
double Agent::expiryTime = 0.0;
32
double Agent::decayFactor = 0.0;
33

  
34 30
void Agent::accept(Event e, double err, int beats) {
35 31
    beatTime = e.time;
36 32
    events.push_back(e);
37 33
    if (fabs(initialBeatInterval - beatInterval -
38
             err / correctionFactor) < MAX_CHANGE * initialBeatInterval)
34
             err / correctionFactor) < maxChange * initialBeatInterval)
39 35
        beatInterval += err / correctionFactor;// Adjust tempo
40 36
    beatCount += beats;
41 37
    double conFactor = 1.0 - CONF_FACTOR * err /

Also available in: Unified diff