Changeset ce6186a
- Timestamp:
- Dec 8, 2013, 2:14:09 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:
- 3826e0b
- Parents:
- fe6a393a
- Location:
- examples
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/aubionotes.c
rfe6a393a rce6186a 58 58 59 59 /* curlevel is negatif or 1 if silence */ 60 smpl_t curlevel = aubio_level_detection(ibuf, silence );60 smpl_t curlevel = aubio_level_detection(ibuf, silence_threshold); 61 61 if (fvec_read_sample(onset, 0)) { 62 62 /* test for silence */ -
examples/aubioonset.c
rfe6a393a rce6186a 28 28 aubio_wavetable_t *wavetable; 29 29 fvec_t *onset; 30 smpl_t is_onset; 31 uint_t is_silence = 0.; 30 32 31 33 void … … 33 35 fvec_zeros(obuf); 34 36 aubio_onset_do (o, ibuf, onset); 35 if ( fvec_read_sample(onset, 0) ) { 37 if (silence_threshold != -90.) 38 is_silence = aubio_silence_detection(ibuf, silence_threshold); 39 is_onset = fvec_read_sample(onset, 0); 40 if ( is_onset && !is_silence ) { 36 41 aubio_wavetable_play ( wavetable ); 37 42 } else { … … 47 52 process_print (void) 48 53 { 49 smpl_t onset_found = fvec_read_sample (onset, 0); 50 if (onset_found) { 54 if ( is_onset && !is_silence ) { 51 55 outmsg ("%f\n", aubio_onset_get_last_s (o) ); 52 56 } … … 60 64 verbmsg ("buffer_size: %d, ", buffer_size); 61 65 verbmsg ("hop_size: %d, ", hop_size); 66 verbmsg ("threshold: %f, ", silence_threshold); 62 67 verbmsg ("threshold: %f\n", onset_threshold); 63 68 -
examples/aubioquiet.c
rfe6a393a rce6186a 26 26 void process_block(fvec_t * ibuf, fvec_t * obuf) { 27 27 fvec_zeros (obuf); 28 if (aubio_silence_detection(ibuf, silence )==1) {28 if (aubio_silence_detection(ibuf, silence_threshold)==1) { 29 29 if (wassilence==1) issilence = 1; 30 30 else issilence = 2; -
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 } -
examples/parse_args.h
rfe6a393a rce6186a 38 38 extern char_t * tempo_method; 39 39 // more general stuff 40 extern smpl_t silence ;40 extern smpl_t silence_threshold; 41 41 extern uint_t mix_input; 42 42 … … 184 184 break; 185 185 case 's': /* silence threshold */ 186 silence = (smpl_t) atof (optarg);186 silence_threshold = (smpl_t) atof (optarg); 187 187 break; 188 188 case 'm': /* mix_input flag */ -
examples/utils.c
rfe6a393a rce6186a 51 51 char_t * tempo_method = "default"; 52 52 // more general stuff 53 smpl_t silence = -90.;53 smpl_t silence_threshold = -90.; 54 54 uint_t mix_input = 0; 55 55
Note: See TracChangeset
for help on using the changeset viewer.