summaryrefslogtreecommitdiff
path: root/src/transforms.rs
diff options
context:
space:
mode:
authorJustin Worthe <justin@worthe-it.co.za>2017-07-11 20:10:03 +0200
committerJustin Worthe <justin@worthe-it.co.za>2017-07-11 20:10:03 +0200
commit19ad6abf0933d3e3e5b1b3fa693676c47bb07be9 (patch)
treee1151388e7bd43cb34fb9f763f6c2ed42042dc20 /src/transforms.rs
parentdac54d0e4345e52ce18a802b0ee22e6bb8696f9a (diff)
Updated silence level and made no pitch's error show a 'perfect' pitch background
Diffstat (limited to 'src/transforms.rs')
-rw-r--r--src/transforms.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/transforms.rs b/src/transforms.rs
index c4a5b5c..43522da 100644
--- a/src/transforms.rs
+++ b/src/transforms.rs
@@ -15,7 +15,7 @@ pub fn correlation(signal: &Vec<f32>) -> Vec<f32> {
pub fn find_fundamental_frequency_correlation(signal: &Vec<f32>, sample_rate: f32) -> Option<f32> {
let normalized_signal = remove_mean_offset(&signal);
- if normalized_signal.iter().all(|&x| x.abs() < 0.1) {
+ if normalized_signal.iter().all(|&x| x.abs() < 0.05) {
// silence
return None;
}