This commit is contained in:
Chris Cannam
2022-06-09 15:39:06 +01:00
parent 4a9574b7ee
commit a7353d7161
2 changed files with 0 additions and 42 deletions

View File

@@ -213,13 +213,7 @@ public:
guidance.phaseReset.f1 = std::max(segmentation.residualAbove,
nextSegmentation.residualAbove);
}
/*
double higher = snapToTrough(m_defaultHigher, troughs);
if (higher > m_maxHigher) higher = m_maxHigher;
double lower = snapToTrough(m_defaultLower, troughs);
if (lower > m_maxLower) lower = m_maxLower;
*/
double prevLower = guidance.fftBands[0].f1;
double lower = descendToValley(prevLower, magnitudes);
if (lower > m_maxLower || lower < m_minLower) {
@@ -232,26 +226,6 @@ public:
higher = m_defaultHigher;
}
/*
double higher = snapToTrough(prevHigher, troughs, magnitudes);
if (higher < m_minHigher || higher > m_maxHigher) {
higher = snapToTrough(m_defaultHigher, troughs, magnitudes);
if (higher < m_minHigher || higher > m_maxHigher) {
higher = prevHigher;
}
}
*/
/*
double higher = m_defaultHigher;
if (lower < m_minLower || lower > m_maxLower) {
lower = snapToTrough(m_defaultLower, troughs, magnitudes);
if (lower < m_minLower || lower > m_maxLower) {
lower = prevLower;
}
}
*/
guidance.fftBands[0].f0 = 0.0;
guidance.fftBands[0].f1 = lower;
@@ -354,9 +328,7 @@ protected:
}
double descendToValley(double f, const double *const magnitudes) const {
// return frequencyForBin(troughs[binForFrequency(f)]);
int b = binForFrequency(f);
for (int i = 0; i < 3; ++i) {
if (magnitudes[b+1] < magnitudes[b]) {
++b;
@@ -366,18 +338,6 @@ protected:
break;
}
}
/*
int snapped = troughs[bin];
std::cout << "snapToTrough: " << f << " -> bin " << bin << " -> snapped " << snapped << " -> " << sf << std::endl;
for (int i = -3; i <= 3; ++i) {
if (i == 0) std::cout << "[";
std::cout << magnitudes[bin + i];
if (i == 0) std::cout << "]";
std::cout << " ";
}
std::cout << std::endl;
*/
double sf = frequencyForBin(b);
return sf;
}

View File

@@ -652,7 +652,6 @@ R3StretcherImpl::analyseChannel(int c, int inhop, int prevInhop, int prevOuthop)
cd->segmentation = cd->nextSegmentation;
cd->nextSegmentation = cd->segmenter->segment(cd->nextClassification.data());
/*
if (c == 0) {
double pb = cd->nextSegmentation.percussiveBelow;
double pa = cd->nextSegmentation.percussiveAbove;
@@ -674,7 +673,6 @@ R3StretcherImpl::analyseChannel(int c, int inhop, int prevInhop, int prevOuthop)
}
std::cout << std::endl;
}
*/
double instantaneousRatio = double(prevOuthop) / double(prevInhop);
bool specialCaseUnity = true;