Avoid kick analysis in single-window mode; comment update
This commit is contained in:
@@ -289,6 +289,8 @@ public:
|
|||||||
guidance.channelLock.f1 = 600.0;
|
guidance.channelLock.f1 = 600.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!m_parameters.singleWindowMode) {
|
||||||
|
|
||||||
bool kick =
|
bool kick =
|
||||||
(segmentation.percussiveBelow > 40.0) &&
|
(segmentation.percussiveBelow > 40.0) &&
|
||||||
(prevSegmentation.percussiveBelow < 40.0) &&
|
(prevSegmentation.percussiveBelow < 40.0) &&
|
||||||
@@ -298,6 +300,18 @@ public:
|
|||||||
(nextSegmentation.percussiveBelow > 40.0) &&
|
(nextSegmentation.percussiveBelow > 40.0) &&
|
||||||
(segmentation.percussiveBelow < 40.0) &&
|
(segmentation.percussiveBelow < 40.0) &&
|
||||||
checkPotentialKick(nextMagnitudes, magnitudes);
|
checkPotentialKick(nextMagnitudes, magnitudes);
|
||||||
|
|
||||||
|
if (kick) {
|
||||||
|
guidance.kick.present = true;
|
||||||
|
guidance.kick.f0 = 0.0;
|
||||||
|
guidance.kick.f1 = segmentation.percussiveBelow;
|
||||||
|
} else if (futureKick) {
|
||||||
|
guidance.preKick.present = true;
|
||||||
|
guidance.preKick.f0 = 0.0;
|
||||||
|
guidance.preKick.f1 = nextSegmentation.percussiveBelow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
std::cout << "d:"
|
std::cout << "d:"
|
||||||
<< prevSegmentation.percussiveBelow << ","
|
<< prevSegmentation.percussiveBelow << ","
|
||||||
@@ -308,15 +322,6 @@ public:
|
|||||||
<< (kick ? "K" : "N") << ","
|
<< (kick ? "K" : "N") << ","
|
||||||
<< (futureKick ? "F" : "N") << std::endl;
|
<< (futureKick ? "F" : "N") << std::endl;
|
||||||
*/
|
*/
|
||||||
if (kick) {
|
|
||||||
guidance.kick.present = true;
|
|
||||||
guidance.kick.f0 = 0.0;
|
|
||||||
guidance.kick.f1 = segmentation.percussiveBelow;
|
|
||||||
} else if (futureKick) {
|
|
||||||
guidance.preKick.present = true;
|
|
||||||
guidance.preKick.f0 = 0.0;
|
|
||||||
guidance.preKick.f1 = nextSegmentation.percussiveBelow;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (segmentation.residualAbove > segmentation.percussiveAbove) {
|
if (segmentation.residualAbove > segmentation.percussiveAbove) {
|
||||||
guidance.highUnlocked.present = true;
|
guidance.highUnlocked.present = true;
|
||||||
|
|||||||
@@ -281,8 +281,8 @@ R3Stretcher::createResampler()
|
|||||||
if (isRealTime()) {
|
if (isRealTime()) {
|
||||||
// If we knew the caller would never change ratio, we could
|
// If we knew the caller would never change ratio, we could
|
||||||
// supply RatioMostlyFixed - but it can have such overhead
|
// supply RatioMostlyFixed - but it can have such overhead
|
||||||
// when the ratio *does* change that a single call would kill
|
// when the ratio *does* change (and it's not RT-safe overhead
|
||||||
// RT use, so it's not a good idea
|
// either) that a single call would kill RT use
|
||||||
resamplerParameters.dynamism = Resampler::RatioOftenChanging;
|
resamplerParameters.dynamism = Resampler::RatioOftenChanging;
|
||||||
resamplerParameters.ratioChange = Resampler::SmoothRatioChange;
|
resamplerParameters.ratioChange = Resampler::SmoothRatioChange;
|
||||||
} else {
|
} else {
|
||||||
@@ -1193,8 +1193,6 @@ R3Stretcher::adjustFormant(int c)
|
|||||||
void
|
void
|
||||||
R3Stretcher::adjustPreKick(int c)
|
R3Stretcher::adjustPreKick(int c)
|
||||||
{
|
{
|
||||||
//!!! if we aren't going to do this, we should modify Guide so as
|
|
||||||
//!!! not to do the small additional work of checking for it
|
|
||||||
if (isSingleWindowed()) return;
|
if (isSingleWindowed()) return;
|
||||||
|
|
||||||
Profiler profiler("R3Stretcher::adjustPreKick");
|
Profiler profiler("R3Stretcher::adjustPreKick");
|
||||||
|
|||||||
Reference in New Issue
Block a user