Changeset 40acfbc


Ignore:
Timestamp:
Oct 21, 2009, 3:08:24 PM (15 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, pitchshift, sampler, timestretch, yinfft+
Children:
1f8e522
Parents:
1c190d5
Message:

examples/: set threshold as needed

Location:
examples
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • examples/aubionotes.c

    r1c190d5 r40acfbc  
    148148  o = new_aubio_onset (onset_mode, buffer_size, overlap_size, channels,
    149149          samplerate);
     150  if (threshold != 0.) aubio_onset_set_threshold (o, threshold);
    150151  onset = new_fvec (1, channels);
    151152
  • examples/aubioonset.c

    r1c190d5 r40acfbc  
    7979  o = new_aubio_onset (onset_mode, buffer_size, overlap_size, channels,
    8080          samplerate);
     81  if (threshold != 0.) aubio_onset_set_threshold (o, threshold);
    8182  onset = new_fvec (1, channels);
    8283
  • examples/aubiotrack.c

    r1c190d5 r40acfbc  
    8484  tempo_out = new_fvec(2,channels);
    8585  bt = new_aubio_tempo(onset_mode,buffer_size,overlap_size,channels, samplerate);
     86  if (threshold != 0.) aubio_tempo_set_threshold (bt, threshold);
    8687
    8788  examples_common_process(aubio_process,process_print);
  • examples/utils.c

    r1c190d5 r40acfbc  
    5757/* energy,specdiff,hfc,complexdomain,phase */
    5858char_t * onset_mode = "default";
    59 smpl_t threshold = 0.3;
     59smpl_t threshold = 0.0;         // leave unset, only set as asked
    6060smpl_t silence = -90.;
    6161uint_t buffer_size = 512;       //1024;
     
    149149        onset_mode = optarg;
    150150        break;
    151       case 's':                /* threshold value for onset */
     151      case 's':                /* silence value for onset */
    152152        silence = (smpl_t) atof (optarg);
    153153        break;
    154154      case 't':                /* threshold value for onset */
    155155        threshold = (smpl_t) atof (optarg);
    156         /*
    157            if (!isfinite(threshold)) {
    158            debug("could not get threshold.\n");
    159            abort();
    160            }
    161          */
    162156        break;
    163157      case 'p':
Note: See TracChangeset for help on using the changeset viewer.