Ignore:
Timestamp:
Mar 10, 2017, 2:26:32 PM (7 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, sampler
Children:
ee8a57c
Parents:
00d0275 (diff), 67b6618 (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' into awhitening

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/aubiotrack.c

    r00d0275 r155cc10  
    2121#include "utils.h"
    2222#define PROG_HAS_TEMPO 1
     23#define PROG_HAS_ONSET 1
     24#define PROG_HAS_SILENCE 1
    2325#define PROG_HAS_OUTPUT 1
    2426#define PROG_HAS_JACK 1
     
    2830aubio_wavetable_t *wavetable;
    2931fvec_t * tempo_out;
    30 smpl_t is_beat = 0;
    31 uint_t is_silence = 0.;
     32smpl_t is_beat = 0.;
     33uint_t is_silence = 0;
    3234
    3335void process_block(fvec_t * ibuf, fvec_t *obuf) {
     
    4042  if ( is_beat && !is_silence ) {
    4143    aubio_wavetable_play ( wavetable );
     44    /* send a midi tap (default to C0) out to the midi output */
     45    if (usejack) send_noteon(miditap_note, miditap_velo);
    4246  } else {
    4347    aubio_wavetable_stop ( wavetable );
     
    5761
    5862int main(int argc, char **argv) {
     63  int ret = 0;
    5964  // override general settings from utils.c
    6065  buffer_size = 1024;
     
    7277  tempo_out = new_fvec(2);
    7378  tempo = new_aubio_tempo(tempo_method, buffer_size, hop_size, samplerate);
     79  if (tempo == NULL) { ret = 1; goto beach; }
    7480  // set silence threshold very low to output beats even during silence
    7581  // aubio_tempo_set_silence(tempo, -1000.);
    7682  if (onset_threshold != 0.) aubio_tempo_set_threshold (tempo, onset_threshold);
     83  if (onset_minioi != 0.) errmsg ("warning: minioio not supported yet\n");
    7784
    7885  wavetable = new_aubio_wavetable (samplerate, hop_size);
     
    8289  examples_common_process((aubio_process_func_t)process_block,process_print);
    8390
     91  // send a last note off
     92  if (usejack) {
     93    send_noteon (miditap_note, 0);
     94  }
     95
    8496  del_aubio_tempo(tempo);
    8597  del_aubio_wavetable (wavetable);
    8698  del_fvec(tempo_out);
    8799
     100beach:
    88101  examples_common_del();
    89   return 0;
     102  return ret;
    90103}
    91 
Note: See TracChangeset for help on using the changeset viewer.