• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ del_fvec函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中del_fvec函数的典型用法代码示例。如果您正苦于以下问题:C++ del_fvec函数的具体用法?C++ del_fvec怎么用?C++ del_fvec使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了del_fvec函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1:

static void *aubiotempo_tilde_del(t_aubiotempo_tilde *x)
{
  if(x->t)      del_aubio_tempo(x->t);
  if(x->output) del_fvec(x->output);
  if(x->vec)    del_fvec(x->vec);
  return 0;
}
开发者ID:joshelser,项目名称:Instrument-Trainer,代码行数:7,代码来源:aubiotempo~.c


示例2: del_aubio_pitchdetection

//--------------------------------------------------------------
aubioAnalyzer::~aubioAnalyzer(){
	  del_aubio_pitchdetection(pitch_output);
	  del_fvec(in);
      del_fvec(beats);
      del_aubio_beattracking(tracker);
	  aubio_cleanup();
}
开发者ID:wandp,项目名称:RGB,代码行数:8,代码来源:aubioAnalyzer.cpp


示例3: del_aubio_pitch

void
del_aubio_pitch (aubio_pitch_t * p)
{
  switch (p->type) {
    case aubio_pitcht_yin:
      del_fvec (p->buf);
      del_aubio_pitchyin (p->p_object);
      break;
    case aubio_pitcht_mcomb:
      del_aubio_pvoc (p->pv);
      del_cvec (p->fftgrain);
      del_aubio_filter (p->filter);
      del_aubio_pitchmcomb (p->p_object);
      break;
    case aubio_pitcht_schmitt:
      del_fvec (p->buf);
      del_aubio_pitchschmitt (p->p_object);
      break;
    case aubio_pitcht_fcomb:
      del_fvec (p->buf);
      del_aubio_pitchfcomb (p->p_object);
      break;
    case aubio_pitcht_yinfft:
      del_fvec (p->buf);
      del_aubio_pitchyinfft (p->p_object);
      break;
    case aubio_pitcht_specacf:
      del_fvec (p->buf);
      del_aubio_pitchspecacf (p->p_object);
      break;
    default:
      break;
  }
  AUBIO_FREE (p);
}
开发者ID:EQ4,项目名称:aubio-mod,代码行数:35,代码来源:pitch.c


示例4: main

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;
}
开发者ID:daphne-yu,项目名称:aubio,代码行数:35,代码来源:test-beattracking.c


示例5: main

int main ()
{
  uint_t win_s = 64; // window size

  // create biquad filter with `b0`, `b1`, `b2`, `a1`, `a2`
  aubio_filter_t * o = new_aubio_filter_biquad(0.3,0.2,0.1,0.2,0.3);

  fvec_t * in_vec  = new_fvec (win_s); // input buffer
  fvec_t * tmp_vec = new_fvec (win_s); // temporary buffer
  fvec_t * out_vec = new_fvec (win_s); // output buffer

  uint_t times = 100;
  while ( times-- ) {
    // copy to out, then filter out
    aubio_filter_do_outplace(o, in_vec, out_vec);
    // in-place filtering
    aubio_filter_do(o, in_vec);
    // in-place filtering
    aubio_filter_do_filtfilt(o, in_vec, out_vec);
    fvec_print(in_vec);
  }

  // memory clean-up, one for each new
  del_aubio_filter(o);
  del_fvec(in_vec);
  del_fvec(tmp_vec);
  del_fvec(out_vec);

  return 0;
}
开发者ID:apanly,项目名称:hackprinceton13,代码行数:30,代码来源:test-biquad.c


示例6: main

int main(){
        /* allocate some memory */
        uint_t win_s      = 4096;                       /* window size        */
        uint_t channels   = 100;                        /* number of channels */
        fvec_t * in       = new_fvec (win_s, channels); /* input buffer       */
        cvec_t * fftgrain = new_cvec (win_s, channels); /* fft norm and phase */
        fvec_t * out      = new_fvec (win_s, channels); /* output buffer      */
        /* allocate fft and other memory space */
        aubio_mfft_t * fft = new_aubio_mfft(win_s,channels);
        /* fill input with some data */
        //printf("initialised\n");
        /* execute stft */
        aubio_mfft_do (fft,in,fftgrain);
        //printf("computed forward\n");
        /* execute inverse fourier transform */
        aubio_mfft_rdo(fft,fftgrain,out);
        //printf("computed backard\n");
        del_aubio_mfft(fft);
        del_fvec(in);
        del_cvec(fftgrain);
        del_fvec(out);
        //printf("memory freed\n");
        aubio_cleanup();
        return 0;
}
开发者ID:joshelser,项目名称:Instrument-Trainer,代码行数:25,代码来源:test-mfft.c


示例7: main

int main (void)
{
  uint_t win_s = 16; // window size
  uint_t impulse_at = win_s / 2;
  fvec_t *in = new_fvec (win_s); // input buffer
  fvec_t *out = new_fvec (win_s); // input buffer

  aubio_filter_t *o = new_aubio_filter_c_weighting (44100);
  in->data[impulse_at] = 0.5;
  fvec_print (in);
  aubio_filter_do (o, in);
  fvec_print (in);
  del_aubio_filter (o);

  o = new_aubio_filter_a_weighting (32000);
  in->data[impulse_at] = 0.5;
  fvec_print (in);
  aubio_filter_do_outplace (o, in, out);
  fvec_print (out);

  aubio_filter_set_a_weighting (o, 32000);
  in->data[impulse_at] = 0.5;
  fvec_print (in);
  aubio_filter_do_filtfilt (o, in, out);
  fvec_print (out);

  del_fvec (in);
  del_fvec (out);
  del_aubio_filter (o);
  aubio_cleanup ();

  return 0;
}
开发者ID:NightFury13,项目名称:NoteClassification,代码行数:33,代码来源:test-filter.c


示例8: main

int main (int argc, char **argv)
{
  uint_t err = 0;
  if (argc < 2) {
    err = 2;
    PRINT_ERR("not enough arguments\n");
    PRINT_MSG("read a wave file as a mono vector\n");
    PRINT_MSG("usage: %s <source_path> [samplerate] [win_size] [hop_size]\n", argv[0]);
    return err;
  }
  uint_t samplerate = 0;
  if ( argc >= 3 ) samplerate = atoi(argv[2]);
  uint_t win_size = 1024; // window size
  if ( argc >= 4 ) win_size = atoi(argv[3]);
  uint_t hop_size = win_size / 4;
  if ( argc >= 5 ) hop_size = atoi(argv[4]);
  uint_t n_frames = 0, read = 0;

  char_t *source_path = argv[1];
  aubio_source_t * source = new_aubio_source(source_path, samplerate, hop_size);
  if (!source) { err = 1; goto beach; }

  if (samplerate == 0 ) samplerate = aubio_source_get_samplerate(source);

  // create some vectors
  fvec_t * in = new_fvec (hop_size); // input audio buffer
  fvec_t * out = new_fvec (1); // output position

  // create tempo object
  aubio_tempo_t * o = new_aubio_tempo("default", win_size, hop_size, samplerate);

  do {
    // put some fresh data in input vector
    aubio_source_do(source, in, &read);
    // execute tempo
    aubio_tempo_do(o,in,out);
    // do something with the beats
    if (out->data[0] != 0) {
      PRINT_MSG("beat at %.3fms, %.3fs, frame %d, %.2fbpm with confidence %.2f\n",
          aubio_tempo_get_last_ms(o), aubio_tempo_get_last_s(o),
          aubio_tempo_get_last(o), aubio_tempo_get_bpm(o), aubio_tempo_get_confidence(o));
    }
    n_frames += read;
  } while ( read == hop_size );

  PRINT_MSG("read %.2fs, %d frames at %dHz (%d blocks) from %s\n",
      n_frames * 1. / samplerate,
      n_frames, samplerate,
      n_frames / hop_size, source_path);

  // clean up memory
  del_aubio_tempo(o);
  del_fvec(in);
  del_fvec(out);
  del_aubio_source(source);
beach:
  aubio_cleanup();

  return err;
}
开发者ID:XunjunYin,项目名称:aubio,代码行数:60,代码来源:test-tempo.c


示例9: main

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 (2);     /* input buffer */
        aubio_tempo_t * o  = new_aubio_tempo("complex", win_s, win_s/4, 44100.);
        uint_t i = 0;

        smpl_t curtempo, curtempoconf;

        while (i < 1000) {
          aubio_tempo_do(o,in,out);
          curtempo = aubio_tempo_get_bpm(o);
          if (curtempo != 0.) {
            fprintf(stdout,"%f\n",curtempo);
            return 1;
          }
          curtempoconf = aubio_tempo_get_confidence(o);
          if (curtempoconf != 0.) {
            fprintf(stdout,"%f\n",curtempo);
            return 1;
          }
          i++;
        };

        del_aubio_tempo(o);
        del_fvec(in);
        del_fvec(out);
        aubio_cleanup();

        return 0;
}
开发者ID:daphne-yu,项目名称:aubio,代码行数:32,代码来源:test-tempo.c


示例10: del_aubio_tss

void del_aubio_tss(aubio_tss_t *s)
{
  del_fvec(s->theta1);
  del_fvec(s->theta2);
  del_fvec(s->oft1);
  del_fvec(s->oft2);
  del_fvec(s->dev);
  AUBIO_FREE(s);
}
开发者ID:daphne-yu,项目名称:aubio,代码行数:9,代码来源:tss.c


示例11: del_aubio_notes

void del_aubio_notes (aubio_notes_t *o) {
  if (o->note_buffer) del_fvec(o->note_buffer);
  if (o->note_buffer2) del_fvec(o->note_buffer2);
  if (o->pitch_output) del_fvec(o->pitch_output);
  if (o->pitch) del_aubio_pitch(o->pitch);
  if (o->onset_output) del_fvec(o->onset_output);
  if (o->onset) del_aubio_onset(o->onset);
  AUBIO_FREE(o);
}
开发者ID:anthonylauzon,项目名称:aubio,代码行数:9,代码来源:notes.c


示例12: del_aubio_pvoc

void del_aubio_pvoc(aubio_pvoc_t *pv) {
	del_fvec(pv->data);
	del_fvec(pv->synth);
	del_fvec(pv->dataold);
	del_fvec(pv->synthold);
	del_aubio_mfft(pv->fft);
	AUBIO_FREE(pv->w);
	AUBIO_FREE(pv);
}
开发者ID:BYVoid,项目名称:notes_extract,代码行数:9,代码来源:phasevoc.c


示例13: del_aubio_pitchfcomb

void
del_aubio_pitchfcomb (aubio_pitchfcomb_t * p)
{
    del_cvec (p->fftOut);
    del_fvec (p->fftLastPhase);
    del_fvec (p->win);
    del_fvec (p->winput);
    del_aubio_fft (p->fft);
    AUBIO_FREE (p);
}
开发者ID:XunjunYin,项目名称:aubio,代码行数:10,代码来源:pitchfcomb.c


示例14: del_aubio_pitchspecacf

void
del_aubio_pitchspecacf (aubio_pitchspecacf_t * p)
{
    del_fvec (p->win);
    del_fvec (p->winput);
    del_aubio_fft (p->fft);
    del_fvec (p->sqrmag);
    del_fvec (p->fftout);
    AUBIO_FREE (p);
}
开发者ID:XunjunYin,项目名称:aubio,代码行数:10,代码来源:pitchspecacf.c


示例15: examples_common_del

void examples_common_del (void)
{
#ifdef HAVE_JACK
  if (ev.buffer) free(ev.buffer);
#endif
  del_fvec (ibuf);
  del_fvec (obuf);
  aubio_cleanup ();
  fflush(stderr);
  fflush(stdout);
}
开发者ID:anthonylauzon,项目名称:aubio,代码行数:11,代码来源:utils.c


示例16: main

int main (void)
{
  uint_t n = 10; // compute n times
  uint_t win_s = 1024; // window size
  uint_t hop_s = 256;  // hop size

  // create some vectors
  fvec_t * in       = new_fvec (hop_s); // input buffer
  cvec_t * fftgrain = new_cvec (win_s); // fft norm and phase
  cvec_t * cstead   = new_cvec (win_s); // fft norm and phase
  cvec_t * ctrans   = new_cvec (win_s); // fft norm and phase
  fvec_t * stead    = new_fvec (hop_s); // output buffer
  fvec_t * trans    = new_fvec (hop_s); // output buffer

  // create phase vocoder for analysis of input signal 
  aubio_pvoc_t * pv = new_aubio_pvoc (win_s,hop_s);
  // create transient/steady-state separation object
  aubio_tss_t *  tss = new_aubio_tss(win_s,hop_s);
  // create phase vocoder objects for synthesis of output signals
  aubio_pvoc_t * pvt = new_aubio_pvoc(win_s,hop_s);
  aubio_pvoc_t * pvs = new_aubio_pvoc(win_s,hop_s);

  /* execute stft */
  while ( n-- ) {
    // fftgrain = pv(in)
    aubio_pvoc_do (pv, in, fftgrain);
    // ctrans, cstead = tss (fftgrain)
    aubio_tss_do (tss, fftgrain, ctrans, cstead);
    // stead = pvt_inverse (cstead)
    // trans = pvt_inverse (ctrans)
    aubio_pvoc_rdo (pvt, cstead, stead);
    aubio_pvoc_rdo (pvs, ctrans, trans);
  }

  aubio_tss_set_alpha(tss, 4.);
  aubio_tss_set_beta(tss, 3.);
  aubio_tss_set_threshold(tss, 3.);

  del_aubio_pvoc(pv);
  del_aubio_pvoc(pvt);
  del_aubio_pvoc(pvs);
  del_aubio_tss(tss);

  del_fvec(in);
  del_cvec(fftgrain);
  del_cvec(cstead);
  del_cvec(ctrans);
  del_fvec(stead);
  del_fvec(trans);

  aubio_cleanup();

  return 0;
}
开发者ID:aubio,项目名称:aubio,代码行数:54,代码来源:test-tss.c


示例17: aubio_destruct

void aubio_destruct() {
    del_aubio_pvoc(pv);
    del_fvec(ibuf);
    del_cvec(fftgrain);
    del_aubio_onsetdetection(o);
    del_aubio_peakpicker(parms);
    del_fvec(onset);
    if (usedoubled)    {
        del_aubio_onsetdetection(o2);
        del_fvec(onset2);
    }
}
开发者ID:gmuller,项目名称:Dirt,代码行数:12,代码来源:segment.c


示例18: del_aubio_pitchyinfft

void
del_aubio_pitchyinfft (aubio_pitchyinfft_t * p)
{
  del_fvec (p->win);
  del_aubio_fft (p->fft);
  del_fvec (p->yinfft);
  del_fvec (p->sqrmag);
  del_cvec (p->res);
  del_cvec (p->fftout);
  del_fvec (p->winput);
  del_fvec (p->weight);
  AUBIO_FREE (p);
}
开发者ID:daphne-yu,项目名称:aubio,代码行数:13,代码来源:pitchyinfft.c


示例19: del_aubio_tempo

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;
}
开发者ID:BYVoid,项目名称:notes_extract,代码行数:13,代码来源:tempo.c


示例20: main

int main(int argc, char **argv) {
  // override general settings from utils.c
  buffer_size = 1024;
  hop_size = 512;

  rgb_music_init();

  examples_common_init(argc,argv);

  verbmsg ("using source: %s at %dHz\n", source_uri, samplerate);

  verbmsg ("tempo method: %s, ", tempo_method);
  verbmsg ("buffer_size: %d, ", buffer_size);
  verbmsg ("hop_size: %d, ", hop_size);
  verbmsg ("threshold: %f\n", onset_threshold);

  tempo_out = new_fvec(2);
  tempo = new_aubio_tempo(tempo_method, buffer_size, hop_size, samplerate);
  if (onset_threshold != 0.) aubio_tempo_set_threshold (tempo, onset_threshold);

  pitch = new_aubio_pitch (pitch_method, buffer_size, hop_size, samplerate);
  if (pitch_tolerance != 0.)
    aubio_pitch_set_tolerance (pitch, pitch_tolerance);
  if (silence_threshold != -90.)
    aubio_pitch_set_silence (pitch, silence_threshold);
  if (pitch_unit != NULL)
    aubio_pitch_set_unit (pitch, pitch_unit);

  pitch_out = new_fvec (1);



  wavetable = new_aubio_wavetable (samplerate, hop_size);
  aubio_wavetable_set_freq ( wavetable, 2450.);
  //aubio_sampler_load (sampler, "/archives/sounds/woodblock.aiff");

  examples_common_process((aubio_process_func_t)process_block,process_print);

  del_aubio_tempo(tempo);
  del_aubio_wavetable (wavetable);
  del_fvec(tempo_out);

  del_aubio_pitch (pitch);
  del_fvec (pitch_out);

  examples_common_del();
  return 0;
}
开发者ID:karshan,项目名称:rgb_music,代码行数:48,代码来源:main.c



注:本文中的del_fvec函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ del_gendisk函数代码示例发布时间:2022-05-30
下一篇:
C++ delSetting函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap