Mercurial > hg > audio-time-warp
comparison src/testApp.h @ 8:166bece5922c
Version that works sequentially with chroma and onset energy, but doesn't use combined matrix, hence more efficient. playing switches okay, bug fixed on path calculation
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Mon, 07 Nov 2011 17:24:52 +0000 |
parents | b9d05eb35488 |
children | 69419f188284 |
comparison
equal
deleted
inserted
replaced
7:fc0a8412d6fb | 8:166bece5922c |
---|---|
47 void drawAlignmentmeasureValues(const int& startingYframe); | 47 void drawAlignmentmeasureValues(const int& startingYframe); |
48 void drawChromoGram(); | 48 void drawChromoGram(); |
49 | 49 |
50 void loadFirstAudioFile(); | 50 void loadFirstAudioFile(); |
51 void initialiseVariables(); | 51 void initialiseVariables(); |
52 | 52 |
53 void clearVectors(); | |
54 | |
53 void calculateSimilarityAndAlignment(); | 55 void calculateSimilarityAndAlignment(); |
54 | 56 |
55 typedef std::vector<double> DoubleVector; | 57 typedef std::vector<double> DoubleVector; |
56 typedef std::vector<DoubleVector> DoubleMatrix; | 58 typedef std::vector<DoubleVector> DoubleMatrix; |
57 | 59 |
58 typedef std::vector<int> IntVector; | 60 typedef std::vector<int> IntVector; |
59 typedef std::vector<IntVector> IntMatrix; | 61 typedef std::vector<IntVector> IntMatrix; |
60 | 62 |
61 // DoubleMatrix chromaMatrix; | |
62 // DoubleMatrix secondMatrix; | |
63 DoubleMatrix* matrixPtr; | 63 DoubleMatrix* matrixPtr; |
64 | 64 |
65 void drawDoubleMatrix(DoubleMatrix* dMatrix);//DoubleMatrix* dMatrix); WOULD BE NICE TO USE POINTER BUT NOT WORKING YET | 65 void drawDoubleMatrix(DoubleMatrix* dMatrix);//DoubleMatrix* dMatrix); WOULD BE NICE TO USE POINTER BUT NOT WORKING YET |
66 void drawSpectralDifference(DoubleMatrix* dMatrix); | 66 void drawSpectralDifference(DoubleMatrix* dMatrix); |
67 | 67 |
106 bool testForNewAlignmentMinimum(double *previousMinimum, int i, int j); | 106 bool testForNewAlignmentMinimum(double *previousMinimum, int i, int j); |
107 | 107 |
108 void calculateAlignmentMatrix(); | 108 void calculateAlignmentMatrix(); |
109 // void performNextAlignment(); | 109 // void performNextAlignment(); |
110 double getDistance(int i, int j); | 110 double getDistance(int i, int j); |
111 void printAlignmentMatrix(); | 111 void printAlignmentMatrix(const DoubleMatrix& alignmentMatrix); |
112 double getMinimum(int i, int j, float newValue); | 112 double getMinimum(int i, int j, float newValue); |
113 bool extendAlignmentUp(); | 113 bool extendAlignmentUp(); |
114 bool extendAlignmentAlong(); | 114 bool extendAlignmentAlong(); |
115 void calculateMinimumAlignmentPath(); | 115 void calculateMinimumAlignmentPath(); |
116 int findMinimumOfVector(DoubleVector *d); | 116 int findMinimumOfVector(DoubleVector *d); |
200 float chromaConversionRatio;//not needed but could be useful | 200 float chromaConversionRatio;//not needed but could be useful |
201 TimeWarp tw; | 201 TimeWarp tw; |
202 Chromagram chromaG; | 202 Chromagram chromaG; |
203 OnsetDetectionFunction* onset; | 203 OnsetDetectionFunction* onset; |
204 | 204 |
205 int conversionFactor; | 205 float conversionFactor; |
206 }; | 206 }; |
207 | 207 |
208 #endif | 208 #endif |