Changeset 0ce9acc3 for examples


Ignore:
Timestamp:
Jun 7, 2005, 6:56:39 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:
b31f262
Parents:
97b8c3d
Message:

updated beattracking.c ad aubiotrack.c to support variable hopsize

Location:
examples
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • examples/aubiotrack.c

    r97b8c3d r0ce9acc3  
    2727aubio_beattracking_t * bt = NULL;
    2828uint_t winlen             = 512;
    29 uint_t step               = 128;
    30 uint_t laglen             = 128;
    31 uint_t rayparam           = 43;
     29uint_t step               = 0;
    3230uint_t istactus           = 0;
    3331
     
    8482              if (pos2 == btoutput[i]) {
    8583                      //printf("pos2: %d\n", pos2);
     84                      //printf("tempo:\t%3.5f bpm \n",
     85                      //60.*44100./overlap_size/abs(btoutput[2]-btoutput[1]));
    8686                      /* test for silence */
    8787                      if (aubio_silence_detection(ibuf, threshold2)==1) {
     
    123123  /* override default settings */
    124124  examples_common_init(argc,argv);
     125  winlen = SQR(512)/overlap_size;
    125126
    126127  dfframe = new_fvec(winlen,channels);
     128  step = winlen/4;
    127129  out = new_fvec(step,channels);
     130
    128131  /* test input : impulses starting from 15, at intervals of 50 samples */
    129132  //for(i=0;i<16;i++){
     
    131134  //}
    132135
    133   bt = new_aubio_beattracking(winlen,step, laglen,
    134                   rayparam, channels);
     136  bt = new_aubio_beattracking(winlen,channels);
    135137
    136138  examples_common_process(aubio_process,process_print);
  • examples/utils.c

    r97b8c3d r0ce9acc3  
    9898
    9999int parse_args (int argc, char **argv) {
    100         const char *options = "hvjo:i:O:t:s:a";
     100        const char *options = "hvjo:i:O:t:s:H:a";
    101101        int next_option;
    102102        struct option long_options[] =
     
    111111                {"silence"  , 0, NULL, 's'},
    112112                {"averaging", 0, NULL, 'a'},
     113                {"hopsize",   0, NULL, 'H'},
    113114                {NULL       , 0, NULL, 0}
    114115        };
     
    169170                                averaging = 1;
    170171                                break;
     172                        case 'H':
     173                                overlap_size = atoi(optarg);
     174                                break;
    171175                        case '?':       /* unknown options */
    172176                                usage(stderr, 1);
Note: See TracChangeset for help on using the changeset viewer.