Perform phase resets when squashing as well as stretching
This commit is contained in:
@@ -199,19 +199,18 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
double bigGap = 4000.0;
|
double bigGap = 4000.0;
|
||||||
if (ratio > 1.0 &&
|
if (segmentation.residualAbove >
|
||||||
segmentation.residualAbove >
|
|
||||||
segmentation.percussiveAbove + bigGap &&
|
segmentation.percussiveAbove + bigGap &&
|
||||||
prevSegmentation.residualAbove <
|
prevSegmentation.residualAbove <
|
||||||
prevSegmentation.percussiveAbove + bigGap) {
|
prevSegmentation.percussiveAbove + bigGap) {
|
||||||
guidance.phaseReset.present = true;
|
guidance.phaseReset.present = true;
|
||||||
guidance.phaseReset.f0 = std::min(segmentation.percussiveAbove,
|
guidance.phaseReset.f0 = std::min(segmentation.percussiveAbove,
|
||||||
nextSegmentation.percussiveAbove);
|
nextSegmentation.percussiveAbove);
|
||||||
|
guidance.phaseReset.f1 = std::max(segmentation.residualAbove,
|
||||||
|
nextSegmentation.residualAbove);
|
||||||
if (guidance.phaseReset.f0 < 200.0) {
|
if (guidance.phaseReset.f0 < 200.0) {
|
||||||
guidance.phaseReset.f0 = 0.0;
|
guidance.phaseReset.f0 = 0.0;
|
||||||
}
|
}
|
||||||
guidance.phaseReset.f1 = std::max(segmentation.residualAbove,
|
|
||||||
nextSegmentation.residualAbove);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double prevLower = guidance.fftBands[0].f1;
|
double prevLower = guidance.fftBands[0].f1;
|
||||||
|
|||||||
Reference in New Issue
Block a user