Skip to content
Snippets Groups Projects
Commit 943fc045 authored by SeeLook's avatar SeeLook
Browse files

First 3 chunks are skipped in calculation of minimal note volume to split it...

First 3 chunks are skipped in calculation of minimal note volume to split it by. It is possible to redirect debug messages to file.
parent c1ca9c70
No related branches found
No related tags found
No related merge requests found
......@@ -66,7 +66,8 @@ public:
m_pList << floatPitch;
endChunk = chunkNr;
maxVol = qMax<float>(maxVol, vol);
minVol = qMin<float>(minVol, vol);
if (numChunks() > 3) // skip first 3 chunks - Tartini may detected a note with low volume
minVol = qMin<float>(minVol, vol);
if (qAbs<qreal>(floatPitch - (qreal)basePitch) < qAbs<qreal>(bestPitch - (qreal)basePitch))
bestPitch = floatPitch;
}
......
......@@ -26,11 +26,23 @@
#include <QTranslator>
void myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg) {
if (type == QtDebugMsg) {
QFile outFile("nootka-log.txt");
outFile.open(QIODevice::WriteOnly | QIODevice::Append);
QTextStream ts(&outFile);
ts << msg << endl;
}
}
Tglobals *gl;
bool resetConfig;
int main(int argc, char *argv[])
{
// qInstallMessageHandler(myMessageOutput);
QTranslator qtTranslator;
QTranslator qtbaseTranslator;
QTranslator nooTranslator;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment