* Change terminology: peak locking -> lamination (we no longer do peak locking)

* Adjustments to lamination code
This commit is contained in:
Chris Cannam
2008-07-08 16:32:52 +00:00
parent 55b9516fff
commit a96c85befc
3 changed files with 29 additions and 21 deletions

View File

@@ -697,6 +697,8 @@ RubberBandStretcher::Impl::modifyChunk(size_t channel,
const int lookback = 1;
double distacc = 0.0;
for (int i = count; i >= 0; i -= lookback) {
bool resetThis = phaseReset;
@@ -748,9 +750,11 @@ RubberBandStretcher::Impl::modifyChunk(size_t channel,
if (inherit) {
double inherited =
cd.unwrappedPhase[i + lookback] - cd.prevPhase[i + lookback];
advance = ((advance * distance) + (inherited * (mi - distance)))
/ mi;
advance = ((advance * distance) +
(inherited * (maxdist - distance)))
/ maxdist;
outphase = p + advance;
distacc += distance;
distance += 1.0;
} else {
outphase = cd.unwrappedPhase[i] + advance;
@@ -770,6 +774,10 @@ RubberBandStretcher::Impl::modifyChunk(size_t channel,
cd.unwrappedPhase[i] = outphase;
}
if (m_debugLevel > 1) {
cerr << "mean inheritance distance = " << distacc / count << endl;
}
if (fullReset) unchanged = true;
cd.unchanged = unchanged;