コード例 #1
0
ファイル: aubioAnalyzer.cpp プロジェクト: wandp/RGB
//--------------------------------------------------------------
aubioAnalyzer::~aubioAnalyzer(){
	  del_aubio_pitchdetection(pitch_output);
	  del_fvec(in);
      del_fvec(beats);
      del_aubio_beattracking(tracker);
	  aubio_cleanup();
}
コード例 #2
0
ファイル: test-beattracking.c プロジェクト: daphne-yu/aubio
int main(){
        /* allocate some memory */
        uint_t win_s      = 1024;                       /* window size */
        fvec_t * in       = new_fvec (win_s); /* input buffer */
        fvec_t * out      = new_fvec (win_s/4);     /* input buffer */
  
        /* allocate fft and other memory space */
        aubio_beattracking_t * tempo  = new_aubio_beattracking(win_s);

        uint_t i = 0;

        smpl_t curtempo, curtempoconf;

        while (i < 10) {
          aubio_beattracking_do(tempo,in,out);
          curtempo = aubio_beattracking_get_bpm(tempo);
          if (curtempo != 0.) {
            fprintf(stdout,"%f\n",curtempo);
            return 1;
          }
          curtempoconf = aubio_beattracking_get_confidence(tempo);
          if (curtempoconf != 0.) {
            fprintf(stdout,"%f\n",curtempo);
            return 1;
          }
          i++;
        };

        del_aubio_beattracking(tempo);
        del_fvec(in);
        del_fvec(out);
        aubio_cleanup();

        return 0;
}
コード例 #3
0
ファイル: tempo.c プロジェクト: BYVoid/notes_extract
void del_aubio_tempo (aubio_tempo_t *o)
{
  del_aubio_onsetdetection(o->od);
  del_aubio_beattracking(o->bt);
  del_aubio_peakpicker(o->pp);
  del_aubio_pvoc(o->pv);
  del_fvec(o->out);
  del_fvec(o->of);
  del_cvec(o->fftgrain);
  del_fvec(o->dfframe);
  AUBIO_FREE(o);
  return;
}
コード例 #4
0
int main(){
        /* allocate some memory */
        uint_t win_s      = 1024;                       /* window size */
        uint_t channels   = 1;                          /* number of channel */
        fvec_t * in       = new_fvec (win_s, channels); /* input buffer */
        fvec_t * out      = new_fvec (win_s/4, channels);     /* input buffer */
  
        /* allocate fft and other memory space */
        aubio_beattracking_t * tempo  = new_aubio_beattracking(win_s, channels);

        uint_t i = 0;

        while (i < 10) {
          aubio_beattracking_do(tempo,in,out);
          i++;
        };

        del_aubio_beattracking(tempo);
        del_fvec(in);
        del_fvec(out);
        aubio_cleanup();

        return 0;
}