Mercurial > hg > bayesian-drum-tracker
annotate newOFsrc/beatTempo.h @ 12:e148d1534733 tip
adding new max player
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Fri, 09 Mar 2012 20:42:34 +0000 |
parents | c49a8f33afab |
children |
rev | line source |
---|---|
andrew@2 | 1 /* |
andrew@2 | 2 * beatTempo.h |
andrew@2 | 3 * bayesianTempo1 |
andrew@2 | 4 * |
andrew@2 | 5 * Created by Andrew Robertson on 08/05/2010. |
andrew@2 | 6 * Copyright 2010 __MyCompanyName__. All rights reserved. |
andrew@2 | 7 * |
andrew@2 | 8 */ |
andrew@2 | 9 |
andrew@2 | 10 class beatTempo{ |
andrew@2 | 11 |
andrew@2 | 12 public: |
andrew@2 | 13 beatTempo(); |
andrew@2 | 14 |
andrew@2 | 15 double beatTimes[16]; |
andrew@2 | 16 double relativeIntervals[16][2]; |
andrew@2 | 17 double intervalDifferences[16][16];//diff between new index , other index |
andrew@2 | 18 bool intervalUsed[16][16]; |
andrew@2 | 19 int tatumMultiples[16][16]; |
andrew@2 | 20 bool OnsetIsKick[16]; |
andrew@2 | 21 |
andrew@2 | 22 int closestClickIndexToBeat[16]; |
andrew@2 | 23 int clickIndex;//used by testApp but to be replaced |
andrew@2 | 24 // int clickPosition[16]; |
andrew@2 | 25 |
andrew@2 | 26 double clickTimes[16]; |
andrew@2 | 27 int clickNumber[16]; |
andrew@2 | 28 float beatMapTimeDifferences[48]; |
andrew@2 | 29 |
andrew@2 | 30 float beatProbabilityDistribution[4][6][2]; |
andrew@2 | 31 |
andrew@2 | 32 // int recentClickIndex; |
andrew@2 | 33 |
andrew@2 | 34 int index, startIndex; |
andrew@2 | 35 |
andrew@2 | 36 char beatMap[48]; |
andrew@2 | 37 |
andrew@2 | 38 void addBeatTime(double f, int type); |
andrew@2 | 39 double calculateInterval(int newIndex, int otherIndex); |
andrew@2 | 40 void addToProbabilityDistribution(int beatSegment, int typeToAdd); |
andrew@2 | 41 void decayProbabilityDistributionRow(int row); |
andrew@2 | 42 void resetBeatTimeArray(); |
andrew@2 | 43 |
andrew@2 | 44 double tatum; |
andrew@2 | 45 double lastClickTime, lastBeatTime; |
andrew@2 | 46 int lastClickIndex, beatSegment, timeDifference; |
andrew@2 | 47 float decayAmount;//amount that the old probability observation contributed to the probability array |
andrew@2 | 48 |
andrew@2 | 49 }; |