comparison jnmr/testApp.cpp @ 49:3ce6dadd8167

Added src for the results calculator, comparing match output with the JNMR midi follower output
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Fri, 23 Mar 2012 10:53:57 +0000
parents 803edc47e825
children 158f5f38e9d3
comparison
equal deleted inserted replaced
48:803edc47e825 49:3ce6dadd8167
9 //-------------------------------------------------------------- 9 //--------------------------------------------------------------
10 void testApp::setup(){ 10 void testApp::setup(){
11 11
12 12
13 13
14 root = "/Users/andrew/Documents/work/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 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 midiEvents.differenceOutput = &diffFile; 24
25 25
26 26
27 this->args->printArgs(); 27 this->args->printArgs();
28 this->args->printOpts(); 28 this->args->printOpts();
29 29
31 31
32 loadRWCfileNumber(2); 32 loadRWCfileNumber(2);
33 openOutputFile(2); 33 openOutputFile(2);
34 loadAnnotation(2); 34 loadAnnotation(2);
35 35
36 midiEvents.differenceOutput = &diffFile;
37
36 /* if (this->args->getCount() > 0){ 38 /* if (this->args->getCount() > 0){
37 museScoreFilename = this->args->getString(1); 39 museScoreFilename = this->args->getString(1);
38 //printf("MUSESCORE FILENAME IS %s\n", museScoreFilename); 40 //printf("MUSESCORE FILENAME IS %s\n", museScoreFilename);
39 cout << "running!! " << museScoreFilename << endl; 41 cout << "running!! " << museScoreFilename << endl;
40 midiFileName = museScoreFilename; 42 midiFileName = museScoreFilename;
703 // } 705 // }
704 706
705 } 707 }
706 708
707 void testApp::loadAnnotation(const int& fileID){ 709 void testApp::loadAnnotation(const int& fileID){
708 string annotationRoot = "/Users/andrew/Documents/work/MuseScore/RWC/ANNOTATION/RM-C0"; 710
709 string annotationEnding = "_annotation+WavPos.csv"; 711 string annotationEnding = "_annotation+WavPos.csv";
710 string path = makeRWCfilename(annotationRoot, fileID, annotationEnding ); 712 string path = makeRWCfilename(annotationRoot, fileID, annotationEnding );
711 midiEvents.myNotation.readInRWCfile(path); 713 midiEvents.myNotation.readInRWCfile(path);
712 } 714 }
713 715