Mercurial > hg > midi-score-follower
diff src/BayesianArrayStructure.h @ 2:5581023e0de4
Added separate CannamMidiFileLoader class to handle the loading in.
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Fri, 19 Aug 2011 01:26:40 +0100 |
parents | b299a65a3ad0 |
children | de86d77f2612 |
line wrap: on
line diff
--- a/src/BayesianArrayStructure.h Thu Aug 18 23:27:42 2011 +0100 +++ b/src/BayesianArrayStructure.h Fri Aug 19 01:26:40 2011 +0100 @@ -6,6 +6,9 @@ * Copyright 2011 QMUL. All rights reserved. * */ +#ifndef BAYESIAN_ARRAY_STRUCTURE +#define BAYESIAN_ARRAY_STRUCTURE + #include "ofMain.h" //#include "DynamicBayesianArray.h" @@ -27,6 +30,8 @@ void resetSize(int length); void resetArrays(); void simpleExample(); + void setStartPlaying(); + void zeroArrays(); double screenWidth; @@ -34,9 +39,11 @@ // DynamicBayesianArray bayesArray; double lastEventTime; + double likelihoodNoise; + double speedLikelihoodNoise; DynamicVector tmpPrior; - + DynamicVector tmpPosteriorForStorage; DynamicVector prior; DynamicVector posterior; DynamicVector likelihood; @@ -46,11 +53,20 @@ DynamicVector relativeSpeedPosterior; DynamicVector acceleration; + double tmpBestEstimate; + void updateTmpBestEstimate(const double& timeDifference); + + int updateCounter; + + void setPositionDistributionScalar(double f); + void resetSpeedToOne(); + void addGaussianNoiseToSpeedPosterior(const double& std_dev); + void addTriangularNoiseToSpeedPosterior(const double& std_dev); double bestEstimate; void updateBestEstimate(); -// double lastBestEstimateUpdateTime; + double lastBestEstimateUpdateTime; double speedDecayWidth, speedDecayAmount; void decaySpeedDistribution(double timeDifference); @@ -69,4 +85,4 @@ void crossUpdateArrays(DynamicVector& position, DynamicVector& speed, double timeDifference); }; - +#endif