Changeset 7f6f880


Ignore:
Timestamp:
Sep 28, 2016, 3:23:01 PM (7 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/cnn, feature/crepe, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch
Children:
683d52f5
Parents:
68586d4 (diff), 80d0083 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into pitchshift

Location:
src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/io/sink_wavwrite.c

    r68586d4 r7f6f880  
    6969};
    7070
    71 unsigned char *write_little_endian (unsigned int s, unsigned char *str, unsigned int length);
    72 unsigned char *write_little_endian (unsigned int s, unsigned char *str, unsigned int length) {
     71static unsigned char *write_little_endian (unsigned int s, unsigned char *str,
     72    unsigned int length);
     73
     74static unsigned char *write_little_endian (unsigned int s, unsigned char *str,
     75    unsigned int length)
     76{
    7377  uint_t i;
    7478  for (i = 0; i < length; i++) {
  • src/io/source_wavread.c

    r68586d4 r7f6f880  
    6161};
    6262
    63 unsigned int read_little_endian (unsigned char *buf, unsigned int length);
    64 unsigned int read_little_endian (unsigned char *buf, unsigned int length) {
     63static unsigned int read_little_endian (unsigned char *buf,
     64    unsigned int length);
     65
     66static unsigned int read_little_endian (unsigned char *buf,
     67    unsigned int length)
     68{
    6569  uint_t i, ret = 0;
    6670  for (i = 0; i < length; i++) {
  • src/onset/onset.c

    r68586d4 r7f6f880  
    191191    goto beach;
    192192  } else if (buf_size < hop_size) {
    193     AUBIO_ERR("onset: hop size (%d) is larger than win size (%d)\n", buf_size, hop_size);
     193    AUBIO_ERR("onset: hop size (%d) is larger than win size (%d)\n", hop_size, buf_size);
    194194    goto beach;
    195195  } else if ((sint_t)samplerate < 1) {
     
    206206  o->pp = new_aubio_peakpicker();
    207207  o->od = new_aubio_specdesc(onset_mode,buf_size);
     208  if (o->od == NULL) goto beach_specdesc;
    208209  o->fftgrain = new_cvec(buf_size);
    209210  o->desc = new_fvec(1);
     
    220221  return o;
    221222
     223beach_specdesc:
     224  del_aubio_peakpicker(o->pp);
     225  del_aubio_pvoc(o->pv);
    222226beach:
    223227  AUBIO_FREE(o);
  • src/pitch/pitch.c

    r68586d4 r7f6f880  
    9797static void aubio_pitch_do_specacf (aubio_pitch_t * p, const fvec_t * ibuf, fvec_t * obuf);
    9898
    99 /* conversion functions for frequency conversions */
    100 smpl_t freqconvbin (smpl_t f, uint_t samplerate, uint_t bufsize);
    101 smpl_t freqconvmidi (smpl_t f, uint_t samplerate, uint_t bufsize);
    102 smpl_t freqconvpass (smpl_t f, uint_t samplerate, uint_t bufsize);
     99/* internal functions for frequency conversion */
     100static smpl_t freqconvbin (smpl_t f, uint_t samplerate, uint_t bufsize);
     101static smpl_t freqconvmidi (smpl_t f, uint_t samplerate, uint_t bufsize);
     102static smpl_t freqconvpass (smpl_t f, uint_t samplerate, uint_t bufsize);
    103103
    104104/* adapter to stack ibuf new samples at the end of buf, and trim `buf` to `bufsize` */
     
    127127    pitch_type = aubio_pitcht_default;
    128128  else {
    129     AUBIO_ERR ("unknown pitch detection method %s, using default.\n",
    130         pitch_mode);
    131     pitch_type = aubio_pitcht_default;
     129    AUBIO_ERR ("pitch: unknown pitch detection method ‘%s’\n", pitch_mode);
     130    goto beach;
    132131  }
    133132
     
    284283    pitch_mode = aubio_pitchm_default;
    285284  else {
    286     AUBIO_ERR ("unknown pitch detection unit %s, using default\n", pitch_unit);
     285    AUBIO_WRN("pitch: unknown pitch detection unit ‘%s’, using default\n",
     286        pitch_unit);
    287287    pitch_mode = aubio_pitchm_default;
    288288    err = AUBIO_FAIL;
     
    325325}
    326326
     327smpl_t
     328aubio_pitch_get_tolerance (aubio_pitch_t * p)
     329{
     330  smpl_t tolerance = 1.;
     331  switch (p->type) {
     332    case aubio_pitcht_yin:
     333      tolerance = aubio_pitchyin_get_tolerance (p->p_object);
     334      break;
     335    case aubio_pitcht_yinfft:
     336      tolerance = aubio_pitchyinfft_get_tolerance (p->p_object);
     337      break;
     338    default:
     339      break;
     340  }
     341  return tolerance;
     342}
     343
    327344uint_t
    328345aubio_pitch_set_silence (aubio_pitch_t * p, smpl_t silence)
     
    332349    return AUBIO_OK;
    333350  } else {
    334     AUBIO_ERR("pitch: could not set silence to %.2f", silence);
     351    AUBIO_WRN("pitch: could not set silence to %.2f\n", silence);
    335352    return AUBIO_FAIL;
    336353  }
  • src/pitch/pitch.h

    r68586d4 r7f6f880  
    118118uint_t aubio_pitch_set_tolerance (aubio_pitch_t * o, smpl_t tol);
    119119
     120/** get yin or yinfft tolerance threshold
     121
     122  \param o pitch detection object as returned by new_aubio_pitch()
     123  \return tolerance (default is 0.15 for yin and 0.85 for yinfft)
     124
     125*/
     126smpl_t aubio_pitch_get_tolerance (aubio_pitch_t * o);
     127
    120128/** deletion of the pitch detection object
    121129
Note: See TracChangeset for help on using the changeset viewer.