Ignore:
Timestamp:
Dec 18, 2013, 8:07:27 AM (10 years ago)
Author:
Paul Brossier <piem@piem.org>
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:
6465d7f
Parents:
1573b16 (diff), c3c6305 (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.
Message:

Merge branch 'master' of aubio.org:/git/aubio/aubio into develop

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/aubioonset.c

    r1573b16 r21234ee  
    2929fvec_t *onset;
    3030smpl_t is_onset;
    31 uint_t is_silence = 0.;
    3231
    3332void
     
    3534  fvec_zeros(obuf);
    3635  aubio_onset_do (o, ibuf, onset);
    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  is_onset = fvec_get_sample(onset, 0);
     37  if ( is_onset ) {
    4138    aubio_wavetable_play ( wavetable );
    4239  } else {
     
    5249process_print (void)
    5350{
    54   if ( is_onset && !is_silence ) {
     51  if ( is_onset ) {
    5552    outmsg ("%f\n", aubio_onset_get_last_s (o) );
    5653  }
     
    6461  verbmsg ("buffer_size: %d, ", buffer_size);
    6562  verbmsg ("hop_size: %d, ", hop_size);
    66   verbmsg ("threshold: %f, ", silence_threshold);
     63  verbmsg ("silence: %f, ", silence_threshold);
    6764  verbmsg ("threshold: %f\n", onset_threshold);
    6865
    6966  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
    7172  onset = new_fvec (1);
    7273
Note: See TracChangeset for help on using the changeset viewer.