diff options
| author | pp <pp@455248ca-bdda-0310-9134-f4ebb693071a> | 2008-03-22 16:56:08 +0000 |
|---|---|---|
| committer | pp <pp@455248ca-bdda-0310-9134-f4ebb693071a> | 2008-03-22 16:56:08 +0000 |
| commit | c77651dcdf11427071d69821d63b8de80874b7a2 (patch) | |
| tree | 58540adff3441dd55ec36a649fcfe01f6429200a /src/lingot-config.c | |
| parent | 65d7466d6f9f44b0c7104d941b0e89fdd6938920 (diff) | |
- experimental, very simple implementation of YIN fundamental frequency estimator
git-svn-id: https://lampka.siedziba.pl:790/svn/repos/lingot-win32@309 455248ca-bdda-0310-9134-f4ebb693071a
Diffstat (limited to 'src/lingot-config.c')
| -rw-r--r-- | src/lingot-config.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lingot-config.c b/src/lingot-config.c index 7164a29..a46e372 100644 --- a/src/lingot-config.c +++ b/src/lingot-config.c @@ -34,11 +34,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", NULL // NULL terminated array + "PEAK_REJECTION_RELATION", "DFT_NUMBER", "DFT_SIZE", "YIN_THRESHOLD", + "ESTIMATOR", NULL // NULL terminated array }; // print/scan param formats. -const char* format = "sddffdffffddfdd"; +const char* format = "sddffdffffddfddfd"; //---------------------------------------------------------------------------- @@ -57,9 +58,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->dft_number, &config->dft_size, &config->yin_threshold, + &config->estimator }; - memcpy(config->param, c_param, 15*sizeof(void*)); + memcpy(config->param, c_param, 17*sizeof(void*)); return config; } @@ -97,6 +99,9 @@ void lingot_config_reset(LingotConfig* config) config->vr = -0.45; // near to minimum + config->yin_threshold = 0.1; + config->estimator = 0; + lingot_config_update_internal_params(config); } |
