comparison layer/SpectrogramLayer.cpp @ 998:1a6304c547bf tony-2.0-integration

Some minor tweaks to make behaviour more like prior Tony
author Chris Cannam
date Thu, 20 Aug 2015 15:40:04 +0100
parents 4f4f0e158ecf
children 89f44d182d37
comparison
equal deleted inserted replaced
997:296ccd36f626 998:1a6304c547bf
2569 fft->getNormalizedMagnitudesAt(sx, autoarray, minbin, maxbin - minbin + 1); 2569 fft->getNormalizedMagnitudesAt(sx, autoarray, minbin, maxbin - minbin + 1);
2570 } else if (m_normalization == NormalizeHybrid) { 2570 } else if (m_normalization == NormalizeHybrid) {
2571 fft->getNormalizedMagnitudesAt(sx, autoarray, minbin, maxbin - minbin + 1); 2571 fft->getNormalizedMagnitudesAt(sx, autoarray, minbin, maxbin - minbin + 1);
2572 float max = fft->getMaximumMagnitudeAt(sx); 2572 float max = fft->getMaximumMagnitudeAt(sx);
2573 float scale = log10f(max + 1.f); 2573 float scale = log10f(max + 1.f);
2574 cout << "sx = " << sx << ", max = " << max << ", log10(max) = " << log10(max) << ", scale = " << scale << endl; 2574 // cout << "sx = " << sx << ", max = " << max << ", log10(max) = " << log10(max) << ", scale = " << scale << endl;
2575 for (int i = minbin; i <= maxbin; ++i) { 2575 for (int i = minbin; i <= maxbin; ++i) {
2576 autoarray[i - minbin] *= scale; 2576 autoarray[i - minbin] *= scale;
2577 } 2577 }
2578 } else { 2578 } else {
2579 fft->getMagnitudesAt(sx, autoarray, minbin, maxbin - minbin + 1); 2579 fft->getMagnitudesAt(sx, autoarray, minbin, maxbin - minbin + 1);