changeset 44:73fbbc92fdfb

alignment is looking correct now
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Fri, 04 May 2012 16:00:33 +0100
parents b7ad807c9cde
children d23685b9e766
files annotationCalculatorSrc/BeatAnnotationReader.cpp annotationCalculatorSrc/testApp.cpp
diffstat 2 files changed, 19 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/annotationCalculatorSrc/BeatAnnotationReader.cpp	Fri May 04 15:33:36 2012 +0100
+++ b/annotationCalculatorSrc/BeatAnnotationReader.cpp	Fri May 04 16:00:33 2012 +0100
@@ -75,8 +75,10 @@
 	
 	alignmentTimes.clear();
 	
-	DoubleVector fileTimes;
+	DoubleVector liveFileTimes;
 	DoubleVector multialignTimes;
+	DoubleVector playedAlignTimes;
+	
 	
 	ifstream file ( pathName.c_str());
 	string value, tmpLine;
@@ -100,7 +102,7 @@
 			if (lineCount == 0){
 				printf("First part of align found '%s'\n", part.c_str());
 				double newBeatTime = atof(part.c_str());
-				fileTimes.push_back(newBeatTime);
+				liveFileTimes.push_back(newBeatTime);
 			}
 			if (lineCount == 1){
 				printf("Second part of align found '%s'\n", part.c_str());
@@ -108,6 +110,13 @@
 				multialignTimes.push_back(newAlignTime);
 				
 			}
+			
+			if (lineCount == 2){
+				printf("Third part of align found '%s'\n", part.c_str());
+				double newAlignTime = atof(part.c_str());
+				playedAlignTimes.push_back(newAlignTime);
+				
+			}
 			lineCount++;
 		
 		}//end while reading line
@@ -116,8 +125,8 @@
 		
 	}//end while
 	
-	alignmentTimes.push_back(fileTimes);
+	alignmentTimes.push_back(liveFileTimes);
 	alignmentTimes.push_back(multialignTimes);
-
+	alignmentTimes.push_back(playedAlignTimes);
 }
 
--- a/annotationCalculatorSrc/testApp.cpp	Fri May 04 15:33:36 2012 +0100
+++ b/annotationCalculatorSrc/testApp.cpp	Fri May 04 16:00:33 2012 +0100
@@ -40,11 +40,16 @@
 	ofSetColor(0,0,0);
 //	plotter.plotVector(beatReader.beatTimes);
 	int limit = 50;
+		//live is X
+		//rehearsal is Y
 		plotter.plotTwoVectors(GroundTruth[0], GroundTruth[1], xPlotMin, xPlotMax, yPlotMin, yPlotMax);
 	
 	ofSetColor(0,0,200);
 	plotter.plotTwoVectors(beatReader.alignmentTimes[1], beatReader.alignmentTimes[0], xPlotMin, xPlotMax, yPlotMin, yPlotMax);
-	//plotter.plotVector(beatReader.beatTimes, 0, 100, 0, 100);
+
+	ofSetColor(200,0,0);
+	plotter.plotTwoVectors(beatReader.alignmentTimes[2], beatReader.alignmentTimes[0], xPlotMin, xPlotMax, yPlotMin, yPlotMax);
+	
 }
 
 //--------------------------------------------------------------