Mercurial > hg > midi-score-follower
comparison jnmr/testApp.cpp @ 35:6cd3e0075adf
now writing out alignment data - correct beat positions for the MIDI file so alignment can be done via iostream over RWV database
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Wed, 14 Dec 2011 17:28:17 +0000 |
parents | 9d2a651a87b2 |
children | 5a1b0c6fa1fb |
comparison
equal
deleted
inserted
replaced
34:9d2a651a87b2 | 35:6cd3e0075adf |
---|---|
6 } | 6 } |
7 | 7 |
8 //-------------------------------------------------------------- | 8 //-------------------------------------------------------------- |
9 void testApp::setup(){ | 9 void testApp::setup(){ |
10 | 10 |
11 | 11 midiEvents.fileOutput = &myfile; |
12 | |
13 string root = "../../../data/FilesOut/exampletest.txt"; | |
12 myfile.open("../../../data/FilesOut/exampletest.txt"); | 14 myfile.open("../../../data/FilesOut/exampletest.txt"); |
13 if (myfile.is_open()) | 15 if (myfile.is_open()) |
14 { | 16 { |
15 myfile << "This is a line.\n"; | 17 // myfile << "This is a line.\n"; |
16 myfile << "This is another line.\n"; | 18 // myfile << "This is another line.\n"; |
17 myfile.close(); | 19 // myfile.close(); |
18 printf("WRITING TO TEXT FILE\n"); | 20 printf("WRITING TO TEXT FILE\n"); |
19 } | 21 } |
20 else cout << "Unable to open file"; | 22 else cout << "Unable to open file"; |
21 | 23 |
22 | 24 |
125 //midiEvents.bayesStruct.speedPriorValue = speedPrior; | 127 //midiEvents.bayesStruct.speedPriorValue = speedPrior; |
126 } | 128 } |
127 | 129 |
128 if ( m.getAddress() == "/startplaying" ) | 130 if ( m.getAddress() == "/startplaying" ) |
129 { | 131 { |
130 prepareToStartOnNextNote(); | 132 // prepareToStartOnNextNote(); |
133 startPlaying(); | |
131 } | 134 } |
132 | 135 |
133 if ( m.getAddress() == "/stopplaying" ) | 136 if ( m.getAddress() == "/stopplaying" ) |
134 { | 137 { |
135 stopPlaying(); | 138 stopPlaying(); |
139 myfile.close(); | |
136 } | 140 } |
137 | 141 |
138 | 142 |
139 if ( m.getAddress() == "/integratedEstimate" ) | 143 if ( m.getAddress() == "/integratedEstimate" ) |
140 { | 144 { |