Connect up the ChannelsTogether option in R3 as well, to extend the channel lock range upward

This commit is contained in:
Chris Cannam
2022-07-04 10:52:50 +01:00
parent 67cb55c375
commit 687e3958a7
3 changed files with 33 additions and 18 deletions

View File

@@ -156,6 +156,7 @@ public:
double meanMagnitude,
int unityCount,
bool realtime,
bool tighterChannelLock,
Guidance &guidance) const {
bool hadPhaseReset = guidance.phaseReset.present;
@@ -191,7 +192,12 @@ public:
guidance.channelLock.present = true;
guidance.channelLock.f0 = 0.0;
guidance.channelLock.f1 = 600.0;
if (tighterChannelLock) {
guidance.channelLock.f1 = nyquist;
} else {
guidance.channelLock.f1 = 600.0;
}
bool kick =
(segmentation.percussiveBelow > 40.0) &&

View File

@@ -968,7 +968,10 @@ R3Stretcher::analyseChannel(int c, int inhop, int prevInhop, int prevOuthop)
} else {
m_unityCount = 0;
}
bool tighterChannelLock =
m_parameters.options & RubberBandStretcher::OptionChannelsTogether;
m_guide.updateGuidance(ratio,
prevOuthop,
classifyScale->mag.data(),
@@ -980,6 +983,7 @@ R3Stretcher::analyseChannel(int c, int inhop, int prevInhop, int prevOuthop)
v_mean(classifyScale->mag.data() + 1, classify/2),
m_unityCount,
isRealTime(),
tighterChannelLock,
cd->guidance);
/*
if (c == 0) {