comparison src/Silvet.cpp @ 158:26d9a8b02adf

Bin frequencies, and some comments
author Chris Cannam
date Mon, 19 May 2014 17:47:34 +0100
parents e1ebbae52cff
children 58547262e735
comparison
equal deleted inserted replaced
157:8964b4920689 158:26d9a8b02adf
210 d.unit = ""; 210 d.unit = "";
211 d.hasFixedBinCount = true; 211 d.hasFixedBinCount = true;
212 d.binCount = processingHeight + 55; 212 d.binCount = processingHeight + 55;
213 d.binNames.clear(); 213 d.binNames.clear();
214 if (m_cq) { 214 if (m_cq) {
215 //!!! I think this output is not working correctly, and these values may be wrong
215 char name[20]; 216 char name[20];
216 for (int i = 0; i < processingHeight + 55; ++i) { 217 for (int i = 0; i < processingHeight + 55; ++i) {
217 float freq = m_cq->getBinFrequency(i); 218 float freq = m_cq->getBinFrequency(processingHeight + 54 - i);
218 sprintf(name, "%.1f Hz", freq); 219 sprintf(name, "%.1f Hz", freq);
219 d.binNames.push_back(name); 220 d.binNames.push_back(name);
220 } 221 }
221 } 222 }
222 d.hasKnownExtents = false; 223 d.hasKnownExtents = false;
233 d.unit = ""; 234 d.unit = "";
234 d.hasFixedBinCount = true; 235 d.hasFixedBinCount = true;
235 d.binCount = processingHeight; 236 d.binCount = processingHeight;
236 d.binNames.clear(); 237 d.binNames.clear();
237 if (m_cq) { 238 if (m_cq) {
239 //!!! I think this output is not working correctly, and these values may be wrong
238 char name[20]; 240 char name[20];
239 for (int i = 0; i < processingHeight; ++i) { 241 for (int i = 0; i < processingHeight; ++i) {
240 float freq = m_cq->getBinFrequency(i + 55); 242 float freq = m_cq->getBinFrequency(processingHeight + 54 - i);
241 sprintf(name, "%.1f Hz", freq); 243 sprintf(name, "%.1f Hz", freq);
242 d.binNames.push_back(name); 244 d.binNames.push_back(name);
243 } 245 }
244 } 246 }
245 d.hasKnownExtents = false; 247 d.hasKnownExtents = false;