Changeset 633400d for src/musicutils.h


Ignore:
Timestamp:
Dec 5, 2018, 10:34:39 PM (5 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/cnn, feature/crepe, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master
Children:
283a619a
Parents:
5b46bc3 (diff), f19db54 (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 feature/pitchshift

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/musicutils.h

    r5b46bc3 r633400d  
    8787smpl_t aubio_freqtobin (smpl_t freq, smpl_t samplerate, smpl_t fftsize);
    8888
     89/** convert frequency (Hz) to mel
     90
     91  \param freq input frequency, in Hz
     92
     93  \return output mel
     94
     95  Converts a scalar from the frequency domain to the mel scale using Slaney
     96  Auditory Toolbox's implementation:
     97
     98  If \f$ f < 1000 \f$, \f$ m = 3 f / 200 \f$.
     99
     100  If \f$ f >= 1000 \f$, \f$ m = 1000 + 27 \frac{{ln}(f) - ln(1000))}
     101  {{ln}(6400) - ln(1000)}
     102  \f$
     103
     104  See also
     105  --------
     106
     107  aubio_meltohz(), aubio_hztomel_htk().
     108
     109*/
     110smpl_t aubio_hztomel (smpl_t freq);
     111
     112/** convert mel to frequency (Hz)
     113
     114  \param mel input mel
     115
     116  \return output frequency, in Hz
     117
     118  Converts a scalar from the mel scale to the frequency domain using Slaney
     119  Auditory Toolbox's implementation:
     120
     121  If \f$ f < 1000 \f$, \f$ f = 200 m/3 \f$.
     122
     123  If \f$ f \geq 1000 \f$, \f$ f = 1000 + \left(\frac{6400}{1000}\right)
     124  ^{\frac{m - 1000}{27}} \f$
     125
     126  See also
     127  --------
     128
     129  aubio_hztomel(), aubio_meltohz_htk().
     130
     131  References
     132  ----------
     133
     134  Malcolm Slaney, *Auditory Toolbox Version 2, Technical Report #1998-010*
     135  https://engineering.purdue.edu/~malcolm/interval/1998-010/
     136
     137*/
     138smpl_t aubio_meltohz (smpl_t mel);
     139
     140/** convert frequency (Hz) to mel
     141
     142  \param freq input frequency, in Hz
     143
     144  \return output mel
     145
     146  Converts a scalar from the frequency domain to the mel scale, using the
     147  equation defined by O'Shaughnessy, as implemented in the HTK speech
     148  recognition toolkit:
     149
     150  \f$ m = 1127 + ln(1 + \frac{f}{700}) \f$
     151
     152  See also
     153  --------
     154
     155  aubio_meltohz_htk(), aubio_hztomel().
     156
     157  References
     158  ----------
     159
     160  Douglas O'Shaughnessy (1987). *Speech communication: human and machine*.
     161  Addison-Wesley. p. 150. ISBN 978-0-201-16520-3.
     162
     163  HTK Speech Recognition Toolkit: http://htk.eng.cam.ac.uk/
     164
     165 */
     166smpl_t aubio_hztomel_htk (smpl_t freq);
     167
     168/** convert mel to frequency (Hz)
     169
     170  \param mel input mel
     171
     172  \return output frequency, in Hz
     173
     174  Converts a scalar from the mel scale to the frequency domain, using the
     175  equation defined by O'Shaughnessy, as implemented in the HTK speech
     176  recognition toolkit:
     177
     178  \f$ f = 700 * {e}^\left(\frac{f}{1127} - 1\right) \f$
     179
     180  See also
     181  --------
     182
     183  aubio_hztomel_htk(), aubio_meltohz().
     184
     185*/
     186smpl_t aubio_meltohz_htk (smpl_t mel);
     187
    89188/** convert frequency (Hz) to midi value (0-128) */
    90189smpl_t aubio_freqtomidi (smpl_t freq);
     
    156255*/
    157256smpl_t aubio_level_detection (const fvec_t * v, smpl_t threshold);
     257
     258/** clamp the values of a vector within the range [-abs(max), abs(max)]
     259
     260  \param in vector to clamp
     261  \param absmax maximum value over which input vector elements should be clamped
     262
     263*/
     264void fvec_clamp(fvec_t *in, smpl_t absmax);
    158265
    159266#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.