andrew@0: /* andrew@0: * beatTempo.h andrew@0: * bayesianTempo1 andrew@0: * andrew@0: * Created by Andrew Robertson on 08/05/2010. andrew@0: * Copyright 2010 __MyCompanyName__. All rights reserved. andrew@0: * andrew@0: */ andrew@0: andrew@0: class beatTempo{ andrew@0: andrew@0: public: andrew@0: beatTempo(); andrew@0: andrew@0: double beatTimes[16]; andrew@0: double relativeIntervals[16][2]; andrew@0: double intervalDifferences[16][16];//diff between new index , other index andrew@0: bool intervalUsed[16][16]; andrew@0: int tatumMultiples[16][16]; andrew@0: bool OnsetIsKick[16]; andrew@0: andrew@0: int closestClickIndexToBeat[16]; andrew@0: int clickIndex;//used by testApp but to be replaced andrew@0: // int clickPosition[16]; andrew@0: andrew@0: double clickTimes[16]; andrew@0: int clickNumber[16]; andrew@0: float beatMapTimeDifferences[48]; andrew@0: andrew@0: float beatProbabilityDistribution[4][6][2]; andrew@0: andrew@0: // int recentClickIndex; andrew@0: andrew@0: int index, startIndex; andrew@0: andrew@0: char beatMap[48]; andrew@0: andrew@0: void addBeatTime(double f, int type); andrew@0: double calculateInterval(int newIndex, int otherIndex); andrew@0: void addToProbabilityDistribution(int beatSegment, int typeToAdd); andrew@0: void decayProbabilityDistributionRow(int row); andrew@0: void resetBeatTimeArray(); andrew@0: andrew@0: double tatum; andrew@0: double lastClickTime, lastBeatTime; andrew@0: int lastClickIndex, beatSegment, timeDifference; andrew@0: float decayAmount;//amount that the old probability observation contributed to the probability array andrew@0: andrew@0: };