Attempt to "fade in" phase resets on return to unity, so as to return to an approximate pass-through without too audible a click

This commit is contained in:
Chris Cannam
2022-06-17 15:01:26 +01:00
parent bcdd1149df
commit 380cad53b4
4 changed files with 104 additions and 30 deletions

View File

@@ -40,7 +40,9 @@ R3StretcherImpl::R3StretcherImpl(Parameters parameters,
m_guideConfiguration(m_guide.getConfiguration()),
m_channelAssembly(m_parameters.channels),
m_inhop(1),
m_prevInhop(1),
m_prevOuthop(1),
m_unityCount(0),
m_startSkip(0),
m_studyInputDuration(0),
m_totalTargetDuration(0),
@@ -826,9 +828,16 @@ R3StretcherImpl::analyseChannel(int c, int inhop, int prevInhop, int prevOuthop)
std::cout << std::endl;
}
*/
bool specialCaseUnity = true;
double ratio = getEffectiveRatio();
if (fabs(ratio - 1.0) < 1.0e-6) {
++m_unityCount;
} else {
m_unityCount = 0;
}
m_guide.updateGuidance(getEffectiveRatio(),
m_guide.updateGuidance(ratio,
prevOuthop,
classifyScale->mag.data(),
classifyScale->prevMag.data(),
@@ -836,7 +845,8 @@ R3StretcherImpl::analyseChannel(int c, int inhop, int prevInhop, int prevOuthop)
cd->segmentation,
cd->prevSegmentation,
cd->nextSegmentation,
specialCaseUnity,
v_mean(classifyScale->mag.data() + 1, classify/2),
m_unityCount,
cd->guidance);
/*
if (c == 0) {