Changeset ce6186a for examples/aubiotrack.c
- Timestamp:
- Dec 8, 2013, 2:14:09 AM (10 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:
- 3826e0b
- Parents:
- fe6a393a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/aubiotrack.c
rfe6a393a rce6186a 28 28 aubio_wavetable_t *wavetable; 29 29 fvec_t * tempo_out; 30 smpl_t istactus = 0; 31 smpl_t isonset = 0; 30 smpl_t is_beat = 0; 31 smpl_t is_onset = 0; 32 uint_t is_silence = 0.; 32 33 33 34 void process_block(fvec_t * ibuf, fvec_t *obuf) { 34 35 aubio_tempo_do (tempo, ibuf, tempo_out); 35 istactus = fvec_read_sample (tempo_out, 0); 36 isonset = fvec_read_sample (tempo_out, 1); 36 is_beat = fvec_read_sample (tempo_out, 0); 37 is_onset = fvec_read_sample (tempo_out, 1); 38 if (silence_threshold != -90.) 39 is_silence = aubio_silence_detection(ibuf, silence_threshold); 37 40 fvec_zeros (obuf); 38 if ( istactus > 0.) {41 if ( is_beat && !is_silence ) { 39 42 aubio_wavetable_play ( wavetable ); 40 43 } else { … … 48 51 49 52 void process_print (void) { 50 if ( istactus) {53 if ( is_beat && !is_silence ) { 51 54 outmsg("%f\n", aubio_tempo_get_last_s(tempo) ); 52 55 } 53 //if ( isonset && verbose)56 //if ( is_onset ) 54 57 // outmsg(" \t \t%f\n",(blocks)*hop_size/(float)samplerate); 55 58 }
Note: See TracChangeset
for help on using the changeset viewer.