diff --git a/qml/PlayerScreen.qml b/qml/PlayerScreen.qml index c76c094..cbdd515 100644 --- a/qml/PlayerScreen.qml +++ b/qml/PlayerScreen.qml @@ -138,7 +138,7 @@ Item { theme: main.theme - marks: [1, 2, 3, 4, 5, 6, 7, 8, 9] + marks: [1, 2, 3, 4, 5, 6, 7, 8] //nb_marks_displayed: is_portrait ? 4 : 3 width: parent.width * 0.6 diff --git a/qml/TunerScreen.qml b/qml/TunerScreen.qml index b262429..c4261f9 100644 --- a/qml/TunerScreen.qml +++ b/qml/TunerScreen.qml @@ -141,7 +141,7 @@ Item { anchors.rightMargin: is_portrait ? (parent.width - width) / 2 : parent.width / 20 theme: main.theme - marks: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + marks: [1, 2, 3, 4, 5, 6, 7, 8] nb_marks_displayed: is_portrait ? 4 : 3 width: is_portrait ? meter.width / 2 : parent.width / 6 diff --git a/src/PitchDetection.cpp b/src/PitchDetection.cpp index 83c2412..41a9e79 100644 --- a/src/PitchDetection.cpp +++ b/src/PitchDetection.cpp @@ -22,6 +22,13 @@ using namespace std; +/* with scpy: + * + * nyq=rate/2 + * norm=cutoff/nyq + * b, a = butter(order, norm, btype='high', analog=False) + */ + // high 10hz / 16k static double a10[] = { 1 , -2.99214602, 2.98432286, -0.99217678 }; static double b10[] = { 0.99608071, -2.98824212, 2.98824212, -0.99608071 }; diff --git a/src/PitchDetection.hpp b/src/PitchDetection.hpp index 4f2be4f..edb11fa 100644 --- a/src/PitchDetection.hpp +++ b/src/PitchDetection.hpp @@ -46,15 +46,15 @@ class PitchDetection { static const int rate = 16000; private: - static const int defaultNbFrame = 1024; - static const int defaultFreqMin = 50; - static const int defaultFreqMax = 2000; + static const int defaultNbFrame = 2048; + static const int defaultFreqMin = 30; + static const int defaultFreqMax = 3000; /// number of analyses to confirm a note static const int nbConfirm = 3; /// number of analyses to drop a note - static const int nbDefect = 20; + static const int nbDefect = 14; /// number of deviation values for average - static const int nbDeviationValues = 8; + static const int nbDeviationValues = 4; LinearFilter *high_filter; ZeroCross *cross;