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