Changeset ff9c62a
- Timestamp:
- Nov 17, 2018, 1:53:28 AM (6 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master
- Children:
- bc66f1d
- Parents:
- 6551a683
- Location:
- src
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/musicutils.h
r6551a683 rff9c62a 87 87 smpl_t aubio_freqtobin (smpl_t freq, smpl_t samplerate, smpl_t fftsize); 88 88 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 */ 110 smpl_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 */ 138 smpl_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 */ 166 smpl_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 */ 186 smpl_t aubio_meltohz_htk (smpl_t mel); 187 89 188 /** convert frequency (Hz) to midi value (0-128) */ 90 189 smpl_t aubio_freqtomidi (smpl_t freq);
Note: See TracChangeset
for help on using the changeset viewer.