Changeset 614ba69 for examples/aubioonset.c
- Timestamp:
- Dec 15, 2013, 3:08:42 AM (11 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:
- d626fac
- Parents:
- c7ec2c6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/aubioonset.c
rc7ec2c6 r614ba69 29 29 fvec_t *onset; 30 30 smpl_t is_onset; 31 uint_t is_silence = 0.;32 31 33 32 void … … 35 34 fvec_zeros(obuf); 36 35 aubio_onset_do (o, ibuf, onset); 37 if (silence_threshold != -90.)38 is_silence = aubio_silence_detection(ibuf, silence_threshold);39 36 is_onset = fvec_read_sample(onset, 0); 40 if ( is_onset && !is_silence) {37 if ( is_onset ) { 41 38 aubio_wavetable_play ( wavetable ); 42 39 } else { … … 52 49 process_print (void) 53 50 { 54 if ( is_onset && !is_silence) {51 if ( is_onset ) { 55 52 outmsg ("%f\n", aubio_onset_get_last_s (o) ); 56 53 } … … 64 61 verbmsg ("buffer_size: %d, ", buffer_size); 65 62 verbmsg ("hop_size: %d, ", hop_size); 66 verbmsg (" threshold: %f, ", silence_threshold);63 verbmsg ("silence: %f, ", silence_threshold); 67 64 verbmsg ("threshold: %f\n", onset_threshold); 68 65 69 66 o = new_aubio_onset (onset_method, buffer_size, hop_size, samplerate); 70 if (onset_threshold != 0.) aubio_onset_set_threshold (o, onset_threshold); 67 if (onset_threshold != 0.) 68 aubio_onset_set_threshold (o, onset_threshold); 69 if (silence_threshold != -90.) 70 aubio_onset_set_silence (o, silence_threshold); 71 71 72 onset = new_fvec (1); 72 73
Note: See TracChangeset
for help on using the changeset viewer.