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