diff src/testApp.h @ 5:0d51e93bfe74

some work in improving the efficiency of doing chroma and onset analysis ahs been made - don't need to recalculate the chroma comparison each time
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Wed, 20 Jul 2011 12:06:45 +0100
parents f40577e6b30d
children b9d05eb35488
line wrap: on
line diff
--- a/src/testApp.h	Wed Jun 08 17:35:56 2011 +0100
+++ b/src/testApp.h	Wed Jul 20 12:06:45 2011 +0100
@@ -44,7 +44,7 @@
 		void loadSndfile();
 		//double getEnergyOfFrame();
 
-	
+	void drawAlignmentmeasureValues(const int& startingYframe);
 		void drawChromoGram();
 
 		void loadFirstAudioFile();
@@ -55,6 +55,9 @@
 	typedef std::vector<double> DoubleVector;
 	typedef std::vector<DoubleVector> DoubleMatrix;
 	
+	typedef std::vector<int> IntVector;
+	typedef std::vector<IntVector> IntMatrix;
+	
 //	DoubleMatrix chromaMatrix;
 //	DoubleMatrix secondMatrix;
 	DoubleMatrix* matrixPtr;
@@ -73,11 +76,14 @@
 	void drawSimilarityMatrix();
 	void printSimilarityMatrix(int sizeToPrint);
 	
+	
+	void drawChromaSimilarityMatrix();
+	
 //	DoubleMatrix alignmentMeasureMatrix;
 
 //	DoubleVector minimumAlignmentPath;
 	
-	void drawAlignmentPath(int startingChromaXFrame, int startingChromaYFrame);
+	void drawAlignmentPath(int startingChromaXFrame, int startingChromaYFrame, IntMatrix* backPath);
 	void drawForwardsAlignmentPath(int startingChromaXFrame, int startingChromaYFrame);
 	int findStartWidthFrame();	  
 	
@@ -87,9 +93,7 @@
 	int numberOfScrollWidthsForSecondFile;
 	
 	void checkIfAudioPositionExceedsWidthForFirstFile();
-	
-	typedef std::vector<int> IntVector;
-	typedef std::vector<IntVector> IntMatrix;
+
 		
 //	IntMatrix backwardsAlignmentPath;
 	int backwardsAlignmentIndex;//used for drawing the path
@@ -114,6 +118,7 @@
 	int findMatchFromAlignment(bool whichFileToTest);
 	
 	void drawEnergyVectorFromPointer(DoubleVector* energyVec);
+	void drawForwardsAlignmentPathOnChromaSimilarity(const int& startingXFrame, const int& startingYFrame);
 	
 		void processAudioToDoubleMatrix(DoubleMatrix* myDoubleMatrix, DoubleVector* energyVector);
 	
@@ -192,7 +197,7 @@
 		SNDFILE *infile; // define input and output sound files
 		SF_INFO sfinfo ; // struct to hold info about sound file
 	
-		int chromaConversionRatio;//not needed but could be useful
+		float chromaConversionRatio;//not needed but could be useful
 		TimeWarp tw;
 		Chromagram chromaG;
 	OnsetDetectionFunction* onset;