Skip to content

Commit

Permalink
Debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
cannam committed Apr 24, 2024
1 parent a877385 commit 4720818
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/finer/Guide.h
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ class Guide
<< guidance.phaseReset.f0 << " to " << guidance.phaseReset.f1
<< "]" << std::endl;
m_log.log(1, str.str().c_str());
m_log.log(2, str.str().c_str());
*/
}

Expand All @@ -478,7 +478,9 @@ class Guide
double m_maxHigher;

void updateForSilence(Guidance &guidance) const {
// std::cout << "phase reset on silence" << std::endl;

m_log.log(2, "Guide::updateForSilence");

double nyquist = m_parameters.sampleRate / 2.0;
if (!m_parameters.singleWindowMode) {
guidance.fftBands[0].f0 = 0.0;
Expand All @@ -498,7 +500,7 @@ class Guide
const BinSegmenter::Segmentation &segmentation,
bool realtime) const {

// std::cout << "unity" << std::endl;
m_log.log(2, "Guide::updateForUnity: realtime and single-window mode", (int)realtime, m_parameters.singleWindowMode);

double nyquist = m_parameters.sampleRate / 2.0;

Expand Down Expand Up @@ -533,9 +535,9 @@ class Guide
if (!hadPhaseReset) {
guidance.phaseReset.f0 = 16000.0;
guidance.phaseReset.f1 = nyquist;
// std::cout << "f0 = " << guidance.phaseReset.f0 << std::endl;
return;
} else {
m_log.log(2, "Guide::updateForUnity: had phase reset");
guidance.phaseReset.f0 *= 0.9;
guidance.phaseReset.f1 *= 1.1;
}
Expand All @@ -552,12 +554,8 @@ class Guide
if (guidance.phaseReset.f0 < 100.0) {
guidance.phaseReset.f0 = 0.0;
}
/*
if (guidance.phaseReset.f0 > 0.0) {
std::cout << "unity: f0 = " << guidance.phaseReset.f0
<< ", f1 = " << guidance.phaseReset.f1 << std::endl;
}
*/

m_log.log(2, "Guide::updateForUnity: f0 and f1", guidance.phaseReset.f0, guidance.phaseReset.f1);
}

bool checkPotentialKick(const process_t *const magnitudes,
Expand Down
3 changes: 3 additions & 0 deletions src/finer/R3LiveShifter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ R3LiveShifter::measureResamplerDelay()
m_inResampler->reset();

m_resamplerDelay = bs - outcount;

m_log.log(1, "R3LiveShifter::measureResamplerDelay: measured delay and outcount ", m_resamplerDelay, outcount);
}

Expand Down Expand Up @@ -1149,6 +1150,8 @@ R3LiveShifter::synthesiseChannel(int c, int outhop, bool draining)

process_t winscale = process_t(outhop) / scaleData->windowScaleFactor;

m_log.log(2, "R3LiveShifter::synthesiseChannel: outhop and winscale", outhop, winscale);

// The frequency filter is applied naively in the frequency
// domain. Aliasing is reduced by the shorter resynthesis
// window. We resynthesise each scale individually, then sum -
Expand Down

0 comments on commit 4720818

Please sign in to comment.