diff options
| author | pp <pp@455248ca-bdda-0310-9134-f4ebb693071a> | 2008-03-23 17:38:12 +0000 |
|---|---|---|
| committer | pp <pp@455248ca-bdda-0310-9134-f4ebb693071a> | 2008-03-23 17:38:12 +0000 |
| commit | 6e38dfa629db5d34071c7d891633fe5dae52a2f1 (patch) | |
| tree | a50eb805497e4bf77dc2d349c7745186daa3a7f7 /src/lingot-config.c | |
| parent | 8c1d9e64746debf06465fb5213f37159e69b1592 (diff) | |
- YIN estimator improvements:master
- minimum detection now operates on interpolated values
- period calculation now interpolates raw difference function, as interpolation of the normalized function is said to be slightly biased
- added high threshold parameter, above which the result is ignored (no note detected)
git-svn-id: https://lampka.siedziba.pl:790/svn/repos/lingot-win32@314 455248ca-bdda-0310-9134-f4ebb693071a
Diffstat (limited to 'src/lingot-config.c')
| -rw-r--r-- | src/lingot-config.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/lingot-config.c b/src/lingot-config.c index e228540..898c56f 100644 --- a/src/lingot-config.c +++ b/src/lingot-config.c @@ -35,12 +35,12 @@ char* token[] = { "AUDIO_DEV", "SAMPLE_RATE", "OVERSAMPLING", "ROOT_FREQUENCY_ERROR", "MIN_FREQUENCY", "FFT_SIZE", "TEMPORAL_WINDOW", "NOISE_THRESHOLD", "CALCULATION_RATE", "VISUALIZATION_RATE", "PEAK_NUMBER", "PEAK_ORDER", - "PEAK_REJECTION_RELATION", "DFT_NUMBER", "DFT_SIZE", "YIN_THRESHOLD", - "ESTIMATOR", NULL // NULL terminated array + "PEAK_REJECTION_RELATION", "DFT_NUMBER", "DFT_SIZE", "YIN_THRESHOLD_LOW", + "YIN_THRESHOLD_HIGH", "ESTIMATOR", NULL // NULL terminated array }; // print/scan param formats. -const char* format = "sddffdffffddfddfd"; +const char* format = "sddffdffffddfddffd"; //---------------------------------------------------------------------------- @@ -59,10 +59,10 @@ LingotConfig* lingot_config_new() &config->noise_threshold_db, &config->calculation_rate, &config->visualization_rate, &config->peak_number, &config->peak_order, &config->peak_rejection_relation_db, - &config->dft_number, &config->dft_size, &config->yin_threshold, - &config->estimator }; + &config->dft_number, &config->dft_size, &config->yin_threshold_low, + &config->yin_threshold_high, &config->estimator }; - memcpy(config->param, c_param, 17*sizeof(void*)); + memcpy(config->param, c_param, 18*sizeof(void*)); return config; } @@ -100,7 +100,8 @@ void lingot_config_reset(LingotConfig* config) config->vr = -0.45; // near to minimum - config->yin_threshold = 0.1; + config->yin_threshold_low = 0.1; + config->yin_threshold_high = 0.2; config->estimator = 0; lingot_config_update_internal_params(config); |
