Changeset 7f6f880
- Timestamp:
- Sep 28, 2016, 3:23:01 PM (8 years ago)
- Branches:
- feature/cnn, feature/crepe, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch
- Children:
- 683d52f5
- Parents:
- 68586d4 (diff), 80d0083 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/sink_wavwrite.c
r68586d4 r7f6f880 69 69 }; 70 70 71 unsigned char *write_little_endian (unsigned int s, unsigned char *str, unsigned int length); 72 unsigned char *write_little_endian (unsigned int s, unsigned char *str, unsigned int length) { 71 static unsigned char *write_little_endian (unsigned int s, unsigned char *str, 72 unsigned int length); 73 74 static unsigned char *write_little_endian (unsigned int s, unsigned char *str, 75 unsigned int length) 76 { 73 77 uint_t i; 74 78 for (i = 0; i < length; i++) { -
src/io/source_wavread.c
r68586d4 r7f6f880 61 61 }; 62 62 63 unsigned int read_little_endian (unsigned char *buf, unsigned int length); 64 unsigned int read_little_endian (unsigned char *buf, unsigned int length) { 63 static unsigned int read_little_endian (unsigned char *buf, 64 unsigned int length); 65 66 static unsigned int read_little_endian (unsigned char *buf, 67 unsigned int length) 68 { 65 69 uint_t i, ret = 0; 66 70 for (i = 0; i < length; i++) { -
src/onset/onset.c
r68586d4 r7f6f880 191 191 goto beach; 192 192 } else if (buf_size < hop_size) { 193 AUBIO_ERR("onset: hop size (%d) is larger than win size (%d)\n", buf_size, hop_size);193 AUBIO_ERR("onset: hop size (%d) is larger than win size (%d)\n", hop_size, buf_size); 194 194 goto beach; 195 195 } else if ((sint_t)samplerate < 1) { … … 206 206 o->pp = new_aubio_peakpicker(); 207 207 o->od = new_aubio_specdesc(onset_mode,buf_size); 208 if (o->od == NULL) goto beach_specdesc; 208 209 o->fftgrain = new_cvec(buf_size); 209 210 o->desc = new_fvec(1); … … 220 221 return o; 221 222 223 beach_specdesc: 224 del_aubio_peakpicker(o->pp); 225 del_aubio_pvoc(o->pv); 222 226 beach: 223 227 AUBIO_FREE(o); -
src/pitch/pitch.c
r68586d4 r7f6f880 97 97 static void aubio_pitch_do_specacf (aubio_pitch_t * p, const fvec_t * ibuf, fvec_t * obuf); 98 98 99 /* conversion functions for frequency conversions*/100 s mpl_t freqconvbin (smpl_t f, uint_t samplerate, uint_t bufsize);101 s mpl_t freqconvmidi (smpl_t f, uint_t samplerate, uint_t bufsize);102 s mpl_t freqconvpass (smpl_t f, uint_t samplerate, uint_t bufsize);99 /* internal functions for frequency conversion */ 100 static smpl_t freqconvbin (smpl_t f, uint_t samplerate, uint_t bufsize); 101 static smpl_t freqconvmidi (smpl_t f, uint_t samplerate, uint_t bufsize); 102 static smpl_t freqconvpass (smpl_t f, uint_t samplerate, uint_t bufsize); 103 103 104 104 /* adapter to stack ibuf new samples at the end of buf, and trim `buf` to `bufsize` */ … … 127 127 pitch_type = aubio_pitcht_default; 128 128 else { 129 AUBIO_ERR ("unknown pitch detection method %s, using default.\n", 130 pitch_mode); 131 pitch_type = aubio_pitcht_default; 129 AUBIO_ERR ("pitch: unknown pitch detection method ‘%s’\n", pitch_mode); 130 goto beach; 132 131 } 133 132 … … 284 283 pitch_mode = aubio_pitchm_default; 285 284 else { 286 AUBIO_ERR ("unknown pitch detection unit %s, using default\n", pitch_unit); 285 AUBIO_WRN("pitch: unknown pitch detection unit ‘%s’, using default\n", 286 pitch_unit); 287 287 pitch_mode = aubio_pitchm_default; 288 288 err = AUBIO_FAIL; … … 325 325 } 326 326 327 smpl_t 328 aubio_pitch_get_tolerance (aubio_pitch_t * p) 329 { 330 smpl_t tolerance = 1.; 331 switch (p->type) { 332 case aubio_pitcht_yin: 333 tolerance = aubio_pitchyin_get_tolerance (p->p_object); 334 break; 335 case aubio_pitcht_yinfft: 336 tolerance = aubio_pitchyinfft_get_tolerance (p->p_object); 337 break; 338 default: 339 break; 340 } 341 return tolerance; 342 } 343 327 344 uint_t 328 345 aubio_pitch_set_silence (aubio_pitch_t * p, smpl_t silence) … … 332 349 return AUBIO_OK; 333 350 } else { 334 AUBIO_ ERR("pitch: could not set silence to %.2f", silence);351 AUBIO_WRN("pitch: could not set silence to %.2f\n", silence); 335 352 return AUBIO_FAIL; 336 353 } -
src/pitch/pitch.h
r68586d4 r7f6f880 118 118 uint_t aubio_pitch_set_tolerance (aubio_pitch_t * o, smpl_t tol); 119 119 120 /** get yin or yinfft tolerance threshold 121 122 \param o pitch detection object as returned by new_aubio_pitch() 123 \return tolerance (default is 0.15 for yin and 0.85 for yinfft) 124 125 */ 126 smpl_t aubio_pitch_get_tolerance (aubio_pitch_t * o); 127 120 128 /** deletion of the pitch detection object 121 129
Note: See TracChangeset
for help on using the changeset viewer.