comparison jnmr/testApp.cpp @ 50:158f5f38e9d3

outputting exact difference for annotations, comparison with match annotations is now working over all rwc files
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Thu, 29 Mar 2012 13:41:59 +0100
parents 3ce6dadd8167
children 13194a9dca77
comparison
equal deleted inserted replaced
49:3ce6dadd8167 50:158f5f38e9d3
12 12
13 13
14 root = "/Users/andrew/Documents/work/Alignment/MuseScore/RWC/Classical_RWC_Groundtruth/RM-C0"; 14 root = "/Users/andrew/Documents/work/Alignment/MuseScore/RWC/Classical_RWC_Groundtruth/RM-C0";
15 outputFileRoot = "../../../data/FilesOut/rwcOutputData_RM-C0"; 15 outputFileRoot = "../../../data/FilesOut/rwcOutputData_RM-C0";
16 annotationRoot = "/Users/andrew/Documents/work/Alignment/MuseScore/RWC/ANNOTATION/RM-C0"; 16 annotationRoot = "/Users/andrew/Documents/work/Alignment/MuseScore/RWC/ANNOTATION/RM-C0";
17 myfile.open("../../../data/FilesOut/exampletest2.txt"); 17 //myfile.open("../../../data/FilesOut/exampletest2.txt");
18 18
19 19
20 20
21 //diffFile.open("../../../data/FilesOut/diffTest.txt"); 21 //diffFile.open("../../../data/FilesOut/diffTest.txt");
22 22
23 midiEvents.fileOutput = &myfile; 23 // midiEvents.fileOutput = &myfile;
24 24
25 25
26 26
27 this->args->printArgs(); 27 this->args->printArgs();
28 this->args->printOpts(); 28 this->args->printOpts();
218 { 218 {
219 219
220 float playedDuration = m.getArgAsFloat(0); 220 float playedDuration = m.getArgAsFloat(0);
221 double recordedDuration = midiEvents.recordedEventTimes[midiEvents.recordedEventTimes.size()-1]; 221 double recordedDuration = midiEvents.recordedEventTimes[midiEvents.recordedEventTimes.size()-1];
222 midiEvents.speedPriorValue = recordedDuration/playedDuration; 222 midiEvents.speedPriorValue = recordedDuration/playedDuration;
223 midiEvents.testSpeedPriorSetting();
223 printf("played duration %f, recorded %f\n", playedDuration, recordedDuration); 224 printf("played duration %f, recorded %f\n", playedDuration, recordedDuration);
224 printf("speed prior set to %f\n", midiEvents.bayesStruct.speedPriorValue); 225 printf("speed prior set to %f\n", midiEvents.bayesStruct.speedPriorValue);
225 226
226 } 227 }
227 228
593 lastScoreIndexSent = 0; 594 lastScoreIndexSent = 0;
594 midiEvents.bestMatchIndex = 0; 595 midiEvents.bestMatchIndex = 0;
595 sendNoteToMuseScore(); 596 sendNoteToMuseScore();
596 597
597 diffFile.close(); 598 diffFile.close();
598 myfile.close(); 599 //myfile.close();
599 600
600 } 601 }
601 602
602 bool testApp::getFilenameFromDialogBox(string* fileNameToSave){ 603 bool testApp::getFilenameFromDialogBox(string* fileNameToSave){
603 //this uses a pointer structure within the loader and returns true if the dialogue box was used successfully 604 //this uses a pointer structure within the loader and returns true if the dialogue box was used successfully