Changeset 4c67dc8 for examples/utils.c


Ignore:
Timestamp:
May 4, 2006, 4:54:58 PM (15 years ago)
Author:
Paul Brossier <piem@altern.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
fe4f78a
Parents:
b965fb1
Message:

use yinfft by default
use yinfft by default

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/utils.c

    rb965fb1 r4c67dc8  
    5959smpl_t pitch               = 0.;
    6060aubio_pitchdetection_t * pitchdet;
    61 aubio_pitchdetection_type type_pitch = aubio_pitch_schmitt; // aubio_pitch_mcomb
     61aubio_pitchdetection_type type_pitch = aubio_pitch_yinfft; // aubio_pitch_mcomb
    6262aubio_pitchdetection_mode mode_pitch = aubio_pitchm_freq;
    6363uint_t median         = 6;
     
    183183                                if (strcmp(optarg,"mcomb") == 0)
    184184                                        type_pitch = aubio_pitch_mcomb;
     185                                else if (strcmp(optarg,"yinfft") == 0)
     186                                        type_pitch = aubio_pitch_yin;
    185187                                else if (strcmp(optarg,"yin") == 0)
    186188                                        type_pitch = aubio_pitch_yin;
     
    265267  if (usepitch) {
    266268    pitchdet = new_aubio_pitchdetection(buffer_size*4,
    267                     overlap_size, channels, samplerate, type_pitch, mode_pitch);
    268  
    269   if (median) {
    270           note_buffer = new_fvec(median, 1);
    271           note_buffer2= new_fvec(median, 1);
    272   }
     269        overlap_size, channels, samplerate, type_pitch, mode_pitch);
     270    aubio_pitchdetection_set_yinthresh(pitchdet, 0.7);
     271
     272    if (median) {
     273      note_buffer = new_fvec(median, 1);
     274      note_buffer2= new_fvec(median, 1);
     275    }
    273276  }
    274277  /* phase vocoder */
Note: See TracChangeset for help on using the changeset viewer.