- Timestamp:
- Oct 15, 2009, 6:54:23 PM (15 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 515c7b2
- Parents:
- cd77c15
- Location:
- examples
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/aubionotes.c
rcd77c15 rfe163ad 40 40 aubio_pvoc_do (pv,ibuf, fftgrain); 41 41 aubio_onsetdetection_do(o,fftgrain, onset); 42 if (usedoubled) {43 aubio_onsetdetection_do(o2,fftgrain, onset2);44 onset->data[0][0] *= onset2->data[0][0];45 }46 42 isonset = aubio_peakpicker_do(parms, onset); 47 43 -
examples/aubioonset.c
rcd77c15 rfe163ad 40 40 aubio_pvoc_do (pv,ibuf, fftgrain); 41 41 aubio_onsetdetection_do (o,fftgrain, onset); 42 if (usedoubled) {43 aubio_onsetdetection_do (o2,fftgrain, onset2);44 onset->data[0][0] *= onset2->data[0][0];45 }46 42 isonset = aubio_peakpicker_do(parms, onset); 47 43 if (isonset) { -
examples/utils.c
rcd77c15 rfe163ad 65 65 fvec_t *woodblock; 66 66 aubio_onsetdetection_t *o; 67 aubio_onsetdetection_t *o2;68 67 fvec_t *onset; 69 68 fvec_t *onset2; … … 75 74 smpl_t pitch = 0.; 76 75 aubio_pitchdetection_t *pitchdet; 77 aubio_pitchdetection_type type_pitch = aubio_pitch_yinfft; // aubio_pitch_mcomb 78 aubio_pitchdetection_mode mode_pitch = aubio_pitchm_freq;76 char_t * pitch_unit = "default"; 77 char_t * pitch_mode = "default"; 79 78 uint_t median = 6; 80 79 … … 177 176 break; 178 177 case 'p': 179 if (strcmp (optarg, "mcomb") == 0) 180 type_pitch = aubio_pitch_mcomb; 181 else if (strcmp (optarg, "yinfft") == 0) 182 type_pitch = aubio_pitch_yin; 183 else if (strcmp (optarg, "yin") == 0) 184 type_pitch = aubio_pitch_yin; 185 else if (strcmp (optarg, "schmitt") == 0) 186 type_pitch = aubio_pitch_schmitt; 187 else if (strcmp (optarg, "fcomb") == 0) 188 type_pitch = aubio_pitch_fcomb; 189 else { 190 errmsg ("unknown pitch type.\n"); 191 abort (); 192 } 178 pitch_mode = optarg; 193 179 break; 194 180 case 'a': … … 294 280 295 281 if (usepitch) { 296 pitchdet = new_aubio_pitchdetection ( buffer_size * 4,297 overlap_size, channels, samplerate , type_pitch, mode_pitch);282 pitchdet = new_aubio_pitchdetection (pitch_mode, buffer_size * 4, 283 overlap_size, channels, samplerate); 298 284 aubio_pitchdetection_set_tolerance (pitchdet, 0.7); 299 285 pitch_obuf = new_fvec (1, channels); … … 325 311 } 326 312 del_fvec (pitch_obuf); 327 }328 if (usedoubled) {329 del_aubio_onsetdetection (o2);330 del_fvec (onset2);331 313 } 332 314 del_aubio_onsetdetection (o); -
examples/utils.h
rcd77c15 rfe163ad 108 108 extern smpl_t pitch; 109 109 extern aubio_pitchdetection_t *pitchdet; 110 extern aubio_pitchdetection_type mode;111 110 extern uint_t median; 112 111
Note: See TracChangeset
for help on using the changeset viewer.