Changeset edca23f


Ignore:
Timestamp:
May 22, 2005, 12:40:37 PM (19 years ago)
Author:
Paul Brossier <piem@altern.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:
9cf2833
Parents:
0b530cb
Message:

add aubio_ to pitch detection modes
add aubio_ to pitch detection modes

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • examples/utils.c

    r0b530cb redca23f  
    5959smpl_t pitch               = 0.;
    6060aubio_pitchdetection_t * pitchdet;
    61 aubio_pitchdetection_type mode = yin; // mcomb
     61aubio_pitchdetection_type mode = aubio_yin; // aubio_mcomb
    6262uint_t median         = 6;
    6363
     
    218218
    219219  if (usepitch) {
    220     pitchdet = new_aubio_pitchdetection(buffer_size*4, overlap_size, channels, samplerate, mode, freq);
     220    pitchdet = new_aubio_pitchdetection(buffer_size*4,
     221                    overlap_size, channels, samplerate, mode, aubio_freq);
    221222 
    222223  if (median) {
  • src/pitchdetection.c

    r0b530cb redca23f  
    5353        p->bufsize = bufsize;
    5454        switch(p->type) {
    55                 case yin:
     55                case aubio_yin:
    5656                        p->buf      = new_fvec(bufsize,channels);
    5757                        p->yin      = new_fvec(bufsize/2,channels);
    5858                        break;
    59                 case mcomb:
     59                case aubio_mcomb:
    6060                        p->pv       = new_aubio_pvoc(bufsize, hopsize, channels);
    6161                        p->fftgrain = new_cvec(bufsize, channels);
     
    7171void del_aubio_pitchdetection(aubio_pitchdetection_t * p) {
    7272        switch(p->type) {
    73                 case yin:
     73                case aubio_yin:
    7474                        del_fvec(p->yin);
    7575                        del_fvec(p->buf);
    7676                        break;
    77                 case mcomb:
     77                case aubio_mcomb:
    7878                        del_aubio_pvoc(p->pv);
    7979                        del_cvec(p->fftgrain);
     
    9292        uint_t i,j = 0;
    9393        switch(p->type) {
    94                 case yin:
     94                case aubio_yin:
    9595                        /* do sliding window blocking */
    9696                        for (i=0;i<p->buf->channels;i++){
     
    111111                        }
    112112                        break;
    113                 case mcomb:
     113                case aubio_mcomb:
    114114                        aubio_filter_do(p->filter,ibuf);
    115115                        aubio_filter_do(p->filter,ibuf);
  • src/pitchdetection.h

    r0b530cb redca23f  
    2525
    2626typedef enum {
    27         yin,
    28         mcomb
     27        aubio_yin,
     28        aubio_mcomb
    2929} aubio_pitchdetection_type;
    3030
    3131typedef enum {
    32         freq,
    33         midi,
    34         cent,
    35         bin
     32        aubio_freq,
     33        aubio_midi,
     34        aubio_cent,
     35        aubio_bin
    3636} aubio_pitchdetection_mode;
    3737
Note: See TracChangeset for help on using the changeset viewer.