Changeset 2f99427


Ignore:
Timestamp:
Mar 10, 2017, 10:10:17 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
Children:
6352034
Parents:
ccdc51b
Message:

src/cvec.h: add cvec_logmag

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/cvec.c

    rccdc51b r2f99427  
    140140  cvec_phas_zeros(s);
    141141}
     142
     143void cvec_logmag(cvec_t *s, smpl_t lambda) {
     144  uint_t j;
     145  for (j=0; j< s->length; j++) {
     146    s->norm[j] = LOG(lambda * s->norm[j] + 1);
     147  }
     148}
  • src/cvec.h

    rccdc51b r2f99427  
    231231void cvec_zeros(cvec_t *s);
    232232
     233/** take logarithmic magnitude
     234
     235  \param fftgrain cvec to compress
     236  \param lambda value to use for normalisation
     237
     238*/
     239void cvec_logmag(cvec_t *s, smpl_t lambda);
     240
    233241#ifdef __cplusplus
    234242}
Note: See TracChangeset for help on using the changeset viewer.