comparison BeatRootProcessor.h @ 12:59520cd6abac

Debug output, and some actual debugging... getting there.
author Chris Cannam
date Thu, 06 Oct 2011 15:21:03 +0100
parents 1c1e98cd1b2e
children f1252b6a7cf5
comparison
equal deleted inserted replaced
11:7169eb47b1bc 12:59520cd6abac
20 #include "Event.h" 20 #include "Event.h"
21 #include "BeatTracker.h" 21 #include "BeatTracker.h"
22 22
23 #include <vector> 23 #include <vector>
24 #include <cmath> 24 #include <cmath>
25
26 #ifdef DEBUG_BEATROOT
27 #include <iostream>
28 #endif
25 29
26 using std::vector; 30 using std::vector;
27 31
28 class BeatRootProcessor 32 class BeatRootProcessor
29 { 33 {
141 // Note that salience must be non-negative or the beat tracking system fails! 145 // Note that salience must be non-negative or the beat tracking system fails!
142 e.salience = spectralFlux[index] - minSalience; 146 e.salience = spectralFlux[index] - minSalience;
143 onsetList.push_back(e); 147 onsetList.push_back(e);
144 } 148 }
145 149
150 #ifdef DEBUG_BEATROOT
151 std::cerr << "Onsets: " << onsetList.size() << std::endl;
152 #endif
153
146 return BeatTracker::beatTrack(onsetList); 154 return BeatTracker::beatTrack(onsetList);
147 155
148 } // processFile() 156 } // processFile()
149 157
150 protected: 158 protected: