From f194becadfc15e8eca9baae44a6caaaf3e51bce8 Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Thu, 29 Sep 2022 15:45:47 +0100 Subject: [PATCH 1/3] Use number of actually-populated bands, not total number --- src/finer/PhaseAdvance.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/finer/PhaseAdvance.h b/src/finer/PhaseAdvance.h index 6015a22..956ddf2 100644 --- a/src/finer/PhaseAdvance.h +++ b/src/finer/PhaseAdvance.h @@ -135,7 +135,8 @@ public: for (int i = lowest; i <= highest; ++i) { m_currentPeaks[c][i] = i; } - for (const auto &band : guidance[c]->phaseLockBands) { + for (int i = 0; i < guidance[c]->phaseLockBandCount; ++i) { + const auto &band = guidance[c]->phaseLockBands[i]; int startBin = binForFrequency (band.f0, m_parameters.fftSize, m_parameters.sampleRate); int endBin = binForFrequency @@ -187,7 +188,8 @@ public: for (int i = lowest; i <= highest; ++i) { process_t f = frequencyForBin (i, m_parameters.fftSize, m_parameters.sampleRate); - while (f > g->phaseLockBands[phaseLockBand].f1) { + while (f > g->phaseLockBands[phaseLockBand].f1 && + phaseLockBand + 1 < g->phaseLockBandCount) { ++phaseLockBand; } process_t ph = 0.0; From 11d5deff628d7164a942388ccc3707bf9a5f401f Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Thu, 29 Sep 2022 15:57:11 +0100 Subject: [PATCH 2/3] Reverting these tweaked values to their 3.0 state - this change wasn't an obvious improvement and just meant that the output no longer matched the last round of listening tests, so revert it --- src/finer/Guide.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/finer/Guide.h b/src/finer/Guide.h index 83667b4..c6ff78d 100644 --- a/src/finer/Guide.h +++ b/src/finer/Guide.h @@ -235,7 +235,7 @@ public: guidance.phaseLockBands[0].f1 = 1600.0; guidance.phaseLockBands[1].p = 2; - guidance.phaseLockBands[1].beta = betaFor(4800.0, ratio); + guidance.phaseLockBands[1].beta = betaFor(5000.0, ratio); guidance.phaseLockBands[1].f0 = 1600.0; guidance.phaseLockBands[1].f1 = 7000.0; @@ -388,7 +388,7 @@ public: guidance.phaseLockBands[1].f1 = mid; guidance.phaseLockBands[2].p = 3; - guidance.phaseLockBands[2].beta = betaFor(4800.0, ratio); + guidance.phaseLockBands[2].beta = betaFor(5000.0, ratio); guidance.phaseLockBands[2].f0 = mid; guidance.phaseLockBands[2].f1 = higher; From f26771d0779eecd6f2f7ca6e4eafdcbe22f40b62 Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Thu, 29 Sep 2022 16:19:43 +0100 Subject: [PATCH 3/3] Add mathmisc to dotnet --- dotnet/rubberband-library.vcxproj | 1 + 1 file changed, 1 insertion(+) diff --git a/dotnet/rubberband-library.vcxproj b/dotnet/rubberband-library.vcxproj index 3f84bb1..816c8be 100644 --- a/dotnet/rubberband-library.vcxproj +++ b/dotnet/rubberband-library.vcxproj @@ -157,6 +157,7 @@ +