diff src/testApp.h @ 4:f40577e6b30d

revised this to work with onset and chroma and looking now to do sequential DTW
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Wed, 08 Jun 2011 17:35:56 +0100
parents 9ce18f24b266
children 0d51e93bfe74
line wrap: on
line diff
--- a/src/testApp.h	Thu May 19 16:23:49 2011 +0100
+++ b/src/testApp.h	Wed Jun 08 17:35:56 2011 +0100
@@ -42,7 +42,7 @@
 
 		void audioRequested 	(float * input, int bufferSize, int nChannels);
 		void loadSndfile();
-		double getEnergyOfFrame();
+		//double getEnergyOfFrame();
 
 	
 		void drawChromoGram();
@@ -50,8 +50,9 @@
 		void loadFirstAudioFile();
 		void initialiseVariables();
 
-
- typedef std::vector<double> DoubleVector;
+		void calculateSimilarityAndAlignment();
+	
+	typedef std::vector<double> DoubleVector;
 	typedef std::vector<DoubleVector> DoubleMatrix;
 	
 //	DoubleMatrix chromaMatrix;
@@ -77,6 +78,7 @@
 //	DoubleVector minimumAlignmentPath;
 	
 	void drawAlignmentPath(int startingChromaXFrame, int startingChromaYFrame);
+	void drawForwardsAlignmentPath(int startingChromaXFrame, int startingChromaYFrame);
 	int findStartWidthFrame();	  
 	
 	void printScoreForRow(int row, int max);
@@ -126,7 +128,7 @@
 	
 		//int* firstAudioLength, secondAudioLength;
 	
-		string soundFileName, secondFileName;
+		string firstFileName, secondFileName, soundFileName;
 	
 	float screenHeight, screenWidth;
 	
@@ -176,7 +178,7 @@
 		float audioPosition;
 		float width, height;
 		int chromaIndex;	
-		int totalNumberOfFrames;
+	//	int totalNumberOfFrames;
 		int currentPlayingFrame;
 		int currentChromaFrame ;
 		string chordString;
@@ -191,9 +193,11 @@
 		SF_INFO sfinfo ; // struct to hold info about sound file
 	
 		int chromaConversionRatio;//not needed but could be useful
-		timeWarp tw;
+		TimeWarp tw;
 		Chromagram chromaG;
 	OnsetDetectionFunction* onset;
+	
+	int conversionFactor;
 };
 
 #endif