comparison SimpleCepstrum.cpp @ 27:44bb93cae288

Change peak-to-next-peak ratio to a difference (because difference of peaks in log values don't vary with signal amplification)
author Chris Cannam
date Sat, 07 Jul 2012 21:06:37 +0100
parents 0a3c1ecff644
children fb862b3418f3
comparison
equal deleted inserted replaced
25:a15d8c89a36e 27:44bb93cae288
304 d.description = "Return the proportion of total energy that is found in the bins around the peak bin (as far as the nearest local minima), within the specified range of the cepstrum"; 304 d.description = "Return the proportion of total energy that is found in the bins around the peak bin (as far as the nearest local minima), within the specified range of the cepstrum";
305 m_ppOutput = n++; 305 m_ppOutput = n++;
306 outputs.push_back(d); 306 outputs.push_back(d);
307 307
308 d.identifier = "peak_to_second_peak"; 308 d.identifier = "peak_to_second_peak";
309 d.name = "Peak to second-peak ratio"; 309 d.name = "Peak to second-peak difference";
310 d.unit = ""; 310 d.unit = "";
311 d.description = "Return the ratio of the value found in the peak bin within the specified range of the cepstrum, to the value found in the next highest peak"; 311 d.description = "Return the difference between the value found in the peak bin within the specified range of the cepstrum, and that found in the next highest peak";
312 m_pkoOutput = n++; 312 m_pkoOutput = n++;
313 outputs.push_back(d); 313 outputs.push_back(d);
314 314
315 d.identifier = "total"; 315 d.identifier = "total";
316 d.name = "Total energy"; 316 d.name = "Total energy";
614 pv.values.push_back(maxval); 614 pv.values.push_back(maxval);
615 fs[m_pvOutput].push_back(pv); 615 fs[m_pvOutput].push_back(pv);
616 616
617 Feature pko; 617 Feature pko;
618 if (nextPeakVal != 0.0) { 618 if (nextPeakVal != 0.0) {
619 pko.values.push_back(maxval / nextPeakVal); 619 pko.values.push_back(maxval - nextPeakVal);
620 } else { 620 } else {
621 pko.values.push_back(0.0); 621 pko.values.push_back(0.0);
622 } 622 }
623 fs[m_pkoOutput].push_back(pko); 623 fs[m_pkoOutput].push_back(pko);
624 624