Changes in / [ddea34b:1070378]
- Files:
-
- 3 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/web.cfg
rddea34b r1070378 836 836 ../src/pitch/pitchyin.h \ 837 837 ../src/pitch/pitchyinfft.h \ 838 ../src/pitch/pitchyinfast.h \ 838 839 ../src/pitch/pitchschmitt.h \ 839 840 ../src/pitch/pitchfcomb.h \ -
python/lib/gen_external.py
rddea34b r1070378 31 31 'pitchyin', 32 32 'pitchyinfft', 33 'pitchyinfast', 33 34 'sink', 34 35 'sink_apple_audio', -
python/tests/test_pitch.py
rddea34b r1070378 71 71 #print 'median errors: ', median(errors), 'median pitches: ', median(pitches) 72 72 73 pitch_algorithms = [ "default", "yinfft", "yin", " schmitt", "mcomb", "fcomb" , "specacf" ]74 pitch_algorithms = [ "default", "yinfft", "yin", " schmitt", "mcomb", "fcomb" ]73 pitch_algorithms = [ "default", "yinfft", "yin", "yinfast", "schmitt", "mcomb", "fcomb" , "specacf" ] 74 pitch_algorithms = [ "default", "yinfft", "yin", "yinfast", "schmitt", "mcomb", "fcomb" ] 75 75 76 76 #freqs = [ 27.5, 55., 110., 220., 440., 880., 1760., 3520. ] -
src/aubio.h
rddea34b r1070378 215 215 #include "pitch/pitchyin.h" 216 216 #include "pitch/pitchyinfft.h" 217 #include "pitch/pitchyinfast.h" 217 218 #include "pitch/pitchschmitt.h" 218 219 #include "pitch/pitchfcomb.h" -
src/pitch/pitch.c
rddea34b r1070378 33 33 #include "pitch/pitchschmitt.h" 34 34 #include "pitch/pitchyinfft.h" 35 #include "pitch/pitchyinfast.h" 35 36 #include "pitch/pitchspecacf.h" 36 37 #include "pitch/pitch.h" … … 46 47 aubio_pitcht_fcomb, /**< `fcomb`, Fast comb filter */ 47 48 aubio_pitcht_yinfft, /**< `yinfft`, Spectral YIN */ 49 aubio_pitcht_yinfast, /**< `yinfast`, YIN fast */ 48 50 aubio_pitcht_specacf, /**< `specacf`, Spectral autocorrelation */ 49 51 aubio_pitcht_default … … 95 97 static void aubio_pitch_do_fcomb (aubio_pitch_t * p, const fvec_t * ibuf, fvec_t * obuf); 96 98 static void aubio_pitch_do_yinfft (aubio_pitch_t * p, const fvec_t * ibuf, fvec_t * obuf); 99 static void aubio_pitch_do_yinfast (aubio_pitch_t * p, const fvec_t * ibuf, fvec_t * obuf); 97 100 static void aubio_pitch_do_specacf (aubio_pitch_t * p, const fvec_t * ibuf, fvec_t * obuf); 98 101 … … 118 121 if (strcmp (pitch_mode, "mcomb") == 0) 119 122 pitch_type = aubio_pitcht_mcomb; 123 else if (strcmp (pitch_mode, "yinfast") == 0) 124 pitch_type = aubio_pitcht_yinfast; 120 125 else if (strcmp (pitch_mode, "yinfft") == 0) 121 126 pitch_type = aubio_pitcht_yinfft; … … 193 198 aubio_pitchyinfft_set_tolerance (p->p_object, 0.85); 194 199 break; 200 case aubio_pitcht_yinfast: 201 p->buf = new_fvec (bufsize); 202 p->p_object = new_aubio_pitchyinfast (bufsize); 203 if (!p->p_object) goto beach; 204 p->detect_cb = aubio_pitch_do_yinfast; 205 p->conf_cb = (aubio_pitch_get_conf_t)aubio_pitchyinfast_get_confidence; 206 aubio_pitchyinfast_set_tolerance (p->p_object, 0.15); 207 break; 195 208 case aubio_pitcht_specacf: 196 209 p->buf = new_fvec (bufsize); … … 239 252 del_fvec (p->buf); 240 253 del_aubio_pitchyinfft (p->p_object); 254 break; 255 case aubio_pitcht_yinfast: 256 del_fvec (p->buf); 257 del_aubio_pitchyinfast (p->p_object); 241 258 break; 242 259 case aubio_pitcht_specacf: … … 330 347 aubio_pitchyinfft_set_tolerance (p->p_object, tol); 331 348 break; 349 case aubio_pitcht_yinfast: 350 aubio_pitchyinfast_set_tolerance (p->p_object, tol); 351 break; 332 352 default: 333 353 break; … … 346 366 case aubio_pitcht_yinfft: 347 367 tolerance = aubio_pitchyinfft_get_tolerance (p->p_object); 368 break; 369 case aubio_pitcht_yinfast: 370 tolerance = aubio_pitchyinfast_get_tolerance (p->p_object); 348 371 break; 349 372 default: … … 415 438 aubio_pitch_slideblock (p, ibuf); 416 439 aubio_pitchyinfft_do (p->p_object, p->buf, obuf); 440 pitch = obuf->data[0]; 441 if (pitch > 0) { 442 pitch = p->samplerate / (pitch + 0.); 443 } else { 444 pitch = 0.; 445 } 446 obuf->data[0] = pitch; 447 } 448 449 void 450 aubio_pitch_do_yinfast (aubio_pitch_t * p, const fvec_t * ibuf, fvec_t * obuf) 451 { 452 smpl_t pitch = 0.; 453 aubio_pitch_slideblock (p, ibuf); 454 aubio_pitchyinfast_do (p->p_object, p->buf, obuf); 417 455 pitch = obuf->data[0]; 418 456 if (pitch > 0) { -
src/pitch/pitch.h
rddea34b r1070378 81 81 82 82 see http://recherche.ircam.fr/equipes/pcm/pub/people/cheveign.html 83 84 \b \p yinfast : Yinfast algorithm 85 86 This algorithm is equivalent to the YIN algorithm, but computed in the 87 spectral domain for efficiency. See also `python/demos/demo_yin_compare.py`. 83 88 84 89 \b \p yinfft : Yinfft algorithm
Note: See TracChangeset
for help on using the changeset viewer.