Changeset ab7212f


Ignore:
Timestamp:
Dec 11, 2016, 4:49:13 PM (7 years ago)
Author:
Paul Brossier <piem@piem.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, sampler, yinfft+
Children:
ec45138
Parents:
1186c98
Message:

examples/aubioonset.c: add minioi option, in millisecond

Location:
examples
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • examples/aubionotes.c

    r1186c98 rab7212f  
    7070  if (notes == NULL) { ret = 1; goto beach; }
    7171
     72  if (onset_minioi != 0.) errmsg ("warning: minioio not supported yet\n");
     73
    7274  examples_common_process((aubio_process_func_t)process_block, process_print);
    7375
  • examples/aubioonset.c

    r1186c98 rab7212f  
    7575  if (silence_threshold != -90.)
    7676    aubio_onset_set_silence (o, silence_threshold);
     77  if (onset_minioi != 0.)
     78    aubio_onset_set_minioi_ms (o, onset_minioi);
    7779
    7880  onset = new_fvec (1);
  • examples/aubiotrack.c

    r1186c98 rab7212f  
    8181  // aubio_tempo_set_silence(tempo, -1000.);
    8282  if (onset_threshold != 0.) aubio_tempo_set_threshold (tempo, onset_threshold);
     83  if (onset_minioi != 0.) errmsg ("warning: minioio not supported yet\n");
    8384
    8485  wavetable = new_aubio_wavetable (samplerate, hop_size);
  • examples/parse_args.h

    r1186c98 rab7212f  
    3737extern char_t * onset_method;
    3838extern smpl_t onset_threshold;
     39extern smpl_t onset_minioi;
    3940// pitch stuff
    4041extern char_t * pitch_method;
     
    9293      "       -t      --onset-threshold  set onset detection threshold\n"
    9394      "                 a value between 0.1 (more detections) and 1 (less); default=0.3\n"
     95      "       -M      --minioi           set minimum inter-onset interval\n"
     96      "                 a value in millisecond; default=12.\n"
    9497#endif /* PROG_HAS_ONSET */
    9598#ifdef PROG_HAS_PITCH
     
    139142#endif /* PROG_HAS_OUTPUT */
    140143#ifdef PROG_HAS_ONSET
    141     "O:t:"
     144    "O:t:M:"
    142145#endif /* PROG_HAS_ONSET */
    143146#ifdef PROG_HAS_PITCH
     
    169172    {"onset",                 1, NULL, 'O'},
    170173    {"onset-threshold",       1, NULL, 't'},
     174    {"onset-minioi",          1, NULL, 'M'},
    171175#endif /* PROG_HAS_ONSET */
    172176#ifdef PROG_HAS_PITCH
     
    228232        onset_threshold = (smpl_t) atof (optarg);
    229233        break;
     234      case 'M':                /* threshold value for onset */
     235        onset_minioi = (smpl_t) atof (optarg);
     236        break;
    230237      case 'p':
    231238        pitch_method = optarg;
  • examples/utils.c

    r1186c98 rab7212f  
    4444char_t * onset_method = "default";
    4545smpl_t onset_threshold = 0.0; // will be set if != 0.
     46smpl_t onset_minioi = 0.0; // will be set if != 0.
    4647// pitch stuff
    4748char_t * pitch_unit = "default";
Note: See TracChangeset for help on using the changeset viewer.