diff jnmr/midiEventHolder.cpp @ 38:c3d32207565f

Annotations autoloading for the various files, still needs proper checker though
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Fri, 16 Dec 2011 17:37:44 +0000
parents 795a99987875
children 5685ef75550c
line wrap: on
line diff
--- a/jnmr/midiEventHolder.cpp	Thu Dec 15 13:02:52 2011 +0000
+++ b/jnmr/midiEventHolder.cpp	Fri Dec 16 17:37:44 2011 +0000
@@ -17,7 +17,7 @@
 
 midiEventHolder::midiEventHolder(){
 	
-	myNotation.readInSomeValues();
+
 	
 //	recordedNoteOnIndex = 0;
 	alignmentPosition = 0;
@@ -811,10 +811,12 @@
 	
 	while (smoothIndex < recordedEventTimes.size() && recordedEventTimes[smoothIndex] < newPosition){
 		float annotationTime = 0;
+		float annotationLocation = 0;
 		int annotationNote = 0;
 		if (smoothIndex < myNotation.rwcAnnotations.size()){
 			annotationTime = myNotation.rwcAnnotations[smoothIndex].eventTime;
 			annotationNote = myNotation.rwcAnnotations[smoothIndex].midiNote;
+			annotationLocation = myNotation.rwcAnnotations[smoothIndex].beatLocation;
 		}
 		
 		float difference = playingTime - (annotationTime*1000.0);
@@ -828,13 +830,15 @@
 				}
 			(*fileOutput) << " \n";
 			
-			printf("midi %i beat pos %f now at %f :: annotaion %i time %f diff \t%f ms\n",  recordedNoteOnMatrix[smoothIndex][1], 
-				   beatPositions[smoothIndex], playingTime, annotationNote, annotationTime, difference);
+
 	
 		}
 	
 		if ((*differenceOutput).is_open()){
 			(*differenceOutput) << beatPositions[smoothIndex] << "," << difference << "\n";
+			printf("midi %i beat pos %f now at %f :: annotaion %i loc % f time %f diff \t%f ms\n",  recordedNoteOnMatrix[smoothIndex][1], 
+				   beatPositions[smoothIndex], playingTime, 
+				   annotationNote, annotationLocation, annotationTime, difference);
 		}
 		
 		smoothIndex++;