Home > voicebox > mel2frq.m

mel2frq

PURPOSE ^

MEL2FRQ Convert Mel frequency scale to Hertz FRQ=(MEL)

SYNOPSIS ^

function [frq,mr] = mel2frq(mel)

DESCRIPTION ^

MEL2FRQ  Convert Mel frequency scale to Hertz FRQ=(MEL)
    frq = mel2frq(mel) converts a vector of Mel frequencies
    to the corresponding real frequencies.
   mr gives the corresponding gradients in Hz/mel.
    The Mel scale corresponds to the perceived pitch of a tone

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [frq,mr] = mel2frq(mel)
0002 %MEL2FRQ  Convert Mel frequency scale to Hertz FRQ=(MEL)
0003 %    frq = mel2frq(mel) converts a vector of Mel frequencies
0004 %    to the corresponding real frequencies.
0005 %   mr gives the corresponding gradients in Hz/mel.
0006 %    The Mel scale corresponds to the perceived pitch of a tone
0007 
0008 %    The relationship between mel and frq is given by:
0009 %
0010 %    m = ln(1 + f/700) * 1000 / ln(1+1000/700)
0011 %
0012 %      This means that m(1000) = 1000
0013 %
0014 %    References:
0015 %
0016 %      [1] S. S. Stevens & J. Volkman "The relation of pitch to
0017 %        frequency", American J of Psychology, V 53, p329 1940
0018 %      [2] C. G. M. Fant, "Acoustic description & classification
0019 %        of phonetic units", Ericsson Tchnics, No 1 1959
0020 %        (reprinted in "Speech Sounds & Features", MIT Press 1973)
0021 %      [3] S. B. Davis & P. Mermelstein, "Comparison of parametric
0022 %        representations for monosyllabic word recognition in
0023 %        continuously spoken sentences", IEEE ASSP, V 28,
0024 %        pp 357-366 Aug 1980
0025 %      [4] J. R. Deller Jr, J. G. Proakis, J. H. L. Hansen,
0026 %        "Discrete-Time Processing of Speech Signals", p380,
0027 %        Macmillan 1993
0028 %      [5] HTK Reference Manual p73
0029 %
0030 
0031 
0032 
0033 %      Copyright (C) Mike Brookes 1998
0034 %      Version: $Id: mel2frq.m 713 2011-10-16 14:45:43Z dmb $
0035 %
0036 %   VOICEBOX is a MATLAB toolbox for speech processing.
0037 %   Home page: http://www.ee.ic.ac.uk/hp/staff/dmb/voicebox/voicebox.html
0038 %
0039 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0040 %   This program is free software; you can redistribute it and/or modify
0041 %   it under the terms of the GNU General Public License as published by
0042 %   the Free Software Foundation; either version 2 of the License, or
0043 %   (at your option) any later version.
0044 %
0045 %   This program is distributed in the hope that it will be useful,
0046 %   but WITHOUT ANY WARRANTY; without even the implied warranty of
0047 %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0048 %   GNU General Public License for more details.
0049 %
0050 %   You can obtain a copy of the GNU General Public License from
0051 %   http://www.gnu.org/copyleft/gpl.html or by writing to
0052 %   Free Software Foundation, Inc.,675 Mass Ave, Cambridge, MA 02139, USA.
0053 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0054 persistent k
0055 if isempty(k)
0056     k=1127.01048;
0057 end
0058 frq=700*sign(mel).*(exp(abs(mel)/k)-1);
0059 mr=(700+abs(frq))/k;
0060 if ~nargout
0061     plot(mel,frq,'-x');
0062     xlabel(['Frequency (' xticksi 'Mel)']);
0063     ylabel(['Frequency (' yticksi 'Hz)']);
0064 end

Generated on Thu 02-Feb-2012 09:15:04 by m2html © 2003