# doc-cache created by Octave 5.1.0
# name: cache
# type: cell
# rows: 3
# columns: 15
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
Contents


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1059
 LTFAT - Simple auditory processing

  Peter L. Soendergaard, 2011 - 2018

  Plots
     SEMIAUDPLOT      - 2D plot on auditory scale.

  Auditory scales
     AUDTOFREQ        - Auditory unit to frequency conversion.
     FREQTOAUD        - Frequency to auditory unit conversion.
     AUDSPACE         - Auditory unit spaced vector
     AUDSPACEBW       - Auditory unit spaced vector by equal bandwidth.
     ERBTOFREQ        - Erb scale to frequency conversion.
     FREQTOERB        - Frequency to erb scale conversion.
     ERBSPACE         - Equidistant points on the erb scale.
     ERBSPACEBW       - Equidistant points by equal bandwidth.
     AUDFILTBW        - Bandwidth of audiory filters.

  Range compression
     RANGECOMPRESS    - Compress range of signal (mu-law etc).
     RANGEEXPAND      - Expand range of signal.

  Auditory filters
     GAMMATONEFIR     - Gammatone FIR approximation.

  For help, bug reports, suggestions etc. please visit 
  http://github.com/ltfat/ltfat/issues

   Url: http://ltfat.github.io/doc/auditory/Contents.html



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 35
 LTFAT - Simple auditory processing



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
audfiltbw


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1826
 -- Function: audfiltbw
     AUDFILTBW  Bandwidth of auditory filter
        Usage: bw = audfiltbw(fc)
     
        AUDFILTBW(fc) returns the critical bandwidth of the auditory filter 
        at center frequency fc defined in equivalent rectangular bandwidth.
        The function uses the relation:
     
           bw = 24.7 + fc/9.265
     
        as estimated in Glasberg and Moore (1990). This function is also used
        when the original ERB scale ('erb83') is chosen.
      
        AUDFILTBW(fc,'bark') returns the critical bandwidth at fc according
        to the Bark scale using the relation:
      
           bw = 25 + 75 ( 1+1.4*10^{-6} fc^2 )^0.69
     
        as estimated by Zwicker and Terhardt (1980).
     
        For the scales 'mel', 'mel1000', 'log10' and 'semitone', no critical
        bandwidth function is usually given. Following the example of the
        equivalent rectangular bandwidth (associated with the ERB scale), we
        use the derivative of the inverse of the scale function F_{Scale},
        evaluated at F_{Scale}(fc), i.e. 
      
           bw = (F_{scale}^{-1})'(F_{scale}(fc))
     
     
        References:
          E. Zwicker and E. Terhardt. Analytical expressions for criticalband
          rate and critical bandwidth as a function of frequency. The Journal of
          the Acoustical Society of America, 68(5):1523--1525, 1980. [1]http ]
          
          B. R. Glasberg and B. Moore. Derivation of auditory filter shapes from
          notched-noise data. Hearing Research, 47(1-2):103, 1990.
          
          References
          
          1. http://scitation.aip.org/content/asa/journal/jasa/68/5/10.1121/1.385079
          
     *Url*: <http://ltfat.github.io/doc/auditory/audfiltbw.html>

     See also: freqtoerb, erbspace, freqtoaud, audtofreq.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
AUDFILTBW  Bandwidth of auditory filter
   Usage: bw = audfiltbw(fc)



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
auditoryinit


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 94
 -- Function: auditoryinit
     *Url*: <http://ltfat.github.io/doc/auditory/auditoryinit.html>


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
   *Url*: <http://ltfat.github.io/doc/auditory/auditoryinit.html>



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
audspace


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 741
 -- Function: audspace
     AUDSPACE  Equidistantly spaced points on auditory scale
        Usage: y=audspace(fmin,fmax,n,scale);
     
        AUDSPACE(fmin,fmax,n,scale) computes a vector of length n*
        containing values equidistantly scaled on the selected auditory scale
        between the frequencies fmin and fmax. All frequencies are
        specified in Hz.
     
        See the help on FREQTOAUD to get a list of the supported values of the
        scale parameter.
       
        [y,bw]=AUDSPACE(...) does the same but outputs the bandwidth between
        each sample measured on the selected scale.
       
     *Url*: <http://ltfat.github.io/doc/auditory/audspace.html>

     See also: freqtoaud, audspacebw, audfiltbw.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
AUDSPACE  Equidistantly spaced points on auditory scale
   Usage: y=audspace(...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
audspacebw


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1116
 -- Function: audspacebw
     AUDSPACEBW  Auditory scale points specified by bandwidth
        Usage: y=audspacebw(fmin,fmax,bw,hitme);
               y=audspacebw(fmin,fmax,bw);
               y=audspacebw(fmin,fmax);
               [y,n]=audspacebw(...);
     
        AUDSPACEBW(fmin,fmax,bw,scale) computes a vector containing values
        equistantly scaled between frequencies fmin and fmax on the
        selected auditory scale.  All frequencies are specified in Hz.The
        distance between two consecutive values is bw on the selected scale,
        and the points will be centered on the scale between fmin and fmax.
     
        See the help on FREQTOAUD to get a list of the supported values of the
        scale parameter.
       
        AUDSPACEBW(fmin,fmax,bw,hitme,scale) will do as above, but one of
        the points is quaranteed to be the frequency hitme.
     
        [y,n]=AUDSPACEBW(...) additionally returns the number of points n in
        the output vector y.
     
     *Url*: <http://ltfat.github.io/doc/auditory/audspacebw.html>

     See also: freqtoaud, audspace, audfiltbw.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
AUDSPACEBW  Auditory scale points specified by bandwidth
   Usage: y=audspace...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
audtofreq


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 544
 -- Function: audtofreq
     AUDTOFREQ  Converts auditory units to frequency (Hz)
        Usage: freq = audtofreq(aud);
       
        AUDTOFREQ(aud,scale) converts values on the selected auditory scale to
        frequencies measured in Hz.
     
        See the help on FREQTOAUD to get a list of the supported values of
        the scale parameter. If no scale is given, the erb-scale will be
        selected by default.
     
     *Url*: <http://ltfat.github.io/doc/auditory/audtofreq.html>

     See also: freqtoaud, audspace, audfiltbw.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
AUDTOFREQ  Converts auditory units to frequency (Hz)
   Usage: freq = audtofr...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
erbspace


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 362
 -- Function: erbspace
     ERBSPACE  Equidistantly spaced points on erbscale
        Usage: y=erbspace(fmin,fmax,n);
     
        This is a wrapper around AUDSPACE that selects the erb-scale. Please
        see the help on AUDSPACE for more information.
     
     *Url*: <http://ltfat.github.io/doc/auditory/erbspace.html>

     See also: audspace, freqtoaud.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
ERBSPACE  Equidistantly spaced points on erbscale
   Usage: y=erbspace(fmin,f...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
erbspacebw


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 465
 -- Function: erbspacebw
     ERBSPACEBW  Erbscale points specified by bandwidth
        Usage: y=erbspacebw(fmin,fmax,bw,hitme);
               y=erbspacebw(fmin,fmax,bw);
               y=erbspacebw(fmin,fmax);
     
        This is a wrapper around AUDSPACEBW that selects the erb-scale. Please
        see the help on AUDSPACEBW for more information.
     
     *Url*: <http://ltfat.github.io/doc/auditory/erbspacebw.html>

     See also: audspacebw, freqtoaud.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
ERBSPACEBW  Erbscale points specified by bandwidth
   Usage: y=erbspacebw(fmi...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
erbtofreq


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 632
 -- Function: erbtofreq
     ERBTOFREQ  Converts erb units to frequency (Hz)
        Usage: freq = erbtofreq(erb);
       
        This is a wrapper around AUDTOFREQ that selects the erb-scale. Please
        see the help on AUDTOFREQ for more information.
     
        The following figure shows the corresponding frequencies for erb
        values up to 31:
     
          erbs=0:31;
          freqs=erbtofreq(erbs);
          plot(erbs,freqs);
          xlabel('Frequency / erb');
          ylabel('Frequency / Hz');
       
     *Url*: <http://ltfat.github.io/doc/auditory/erbtofreq.html>

     See also: audtofreq, freqtoaud.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
ERBTOFREQ  Converts erb units to frequency (Hz)
   Usage: freq = erbtofreq(er...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
freqtoaud


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3217
 -- Function: freqtoaud
     FREQTOAUD  Converts frequencies (Hz) to auditory scale units
        Usage: aud = freqtoaud(freq,scale);
     
        FREQTOAUD(freq,scale) converts values on the frequency scale (measured
        in Hz) to values on the selected auditory scale. The value of the
        parameter scale determines the auditory scale:
     
          'erb'     A distance of 1 erb is equal to the equivalent rectangular
                    bandwidth of the auditory filters at that point on the
                    frequency scale. The scale is normalized such that 0 erbs
                    corresponds to 0 Hz. The width of the auditory filters were
                    determined by a notched-noise experiment. The erb scale is
                    defined in Glasberg and Moore (1990). This is the default.
     
          'mel'     The mel scale is a perceptual scale of pitches judged by
                    listeners to be equal in distance from one another. The
                    reference point between this scale and normal frequency
                    measurement is defined by equating a 1000 Hz tone, 40 dB above
                    the listener's threshold, with a pitch of 1000 mels.
                    The mel-scale is defined in Stevens et. al (1937).
     
          'mel1000'  Alternative definition of the mel scale using a break
                     frequency of 1000 Hz. This scale was reported in Fant (1968). 
     
          'bark'    The bark-scale is originally defined in Zwicker (1961). A
                    distance of 1 on the bark scale is known as a critical
                    band. The implementation provided in this function is
                    described in Traunmuller (1990).
     
          'erb83'   This is the original defintion of the erb scale given in
                    Moore. et al. (1983).
     
          'freq'    Return the frequency in Hz. 
     
        If no flag is given, the erb-scale will be selected.
     
     
        References:
          S. Stevens, J. Volkmann, and E. Newman. A scale for the measurement of
          the psychological magnitude pitch. J. Acoust. Soc. Am., 8:185, 1937.
          
          E. Zwicker. Subdivision of the audible frequency range into critical
          bands (frequenzgruppen). J. Acoust. Soc. Am., 33(2):248--248, 1961.
          [1]http ]
          
          G. Fant. Analysis and synthesis of speech processes. In B. Malmberg,
          editor, Manual of phonetics. North-Holland, 1968.
          
          B. R. Glasberg and B. Moore. Derivation of auditory filter shapes from
          notched-noise data. Hearing Research, 47(1-2):103, 1990.
          
          H. Traunmuller. Analytical expressions for the tonotopic sensory scale.
          J. Acoust. Soc. Am., 88:97, 1990.
          
          B. Moore and B. Glasberg. Suggested formulae for calculating
          auditory-filter bandwidths and excitation patterns. J. Acoust. Soc.
          Am., 74:750, 1983.
          
          References
          
          1. http://link.aip.org/link/?JAS/33/248/1
          
     *Url*: <http://ltfat.github.io/doc/auditory/freqtoaud.html>

     See also: freqtoaud, audspace, audfiltbw.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
FREQTOAUD  Converts frequencies (Hz) to auditory scale units
   Usage: aud = ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
freqtoerb


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 371
 -- Function: freqtoerb
     FREQTOERB  Converts frequencies (Hz) to erbs
        Usage: erb = freqtoerb(freq);
     
        This is a wrapper around FREQTOAUD that selects the erb-scale. Please
        see the help on FREQTOAUD for more information.
     
     
     *Url*: <http://ltfat.github.io/doc/auditory/freqtoerb.html>

     See also: freqtoaud, demo_audscales.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 77
FREQTOERB  Converts frequencies (Hz) to erbs
   Usage: erb = freqtoerb(freq);



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
gammatonefir


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2763
 -- Function: gammatonefir
     GAMMATONEFIR  Gammatone filter coefficients
        Usage: b = gammatonefir(fc,fs,n,betamul);
               b = gammatonefir(fc,fs,n);
               b = gammatonefir(fc,fs);
     
        Input parameters:
           fc    :  center frequency in Hz.
           fs    :  sampling rate in Hz.
           n     :  max. filter length.
           beta  :  bandwidth of the filter.
     
        Output parameters:
           b     :  FIR filters as an cell-array of structs.
     
        GAMMATONEFIR(fc,fs,n,betamul) computes the filter coefficients of a
        digital FIR gammatone filter with length at most n, center 
        frequency fc, 4th order rising slope, sampling rate fs and 
        bandwith determined by betamul. The bandwidth beta of each filter
        is determined as betamul times AUDFILTBW of the center frequency
        of corresponding filter. The actual length of the inpulse response
        depends on fc (the filter is longer for low center frequencies),
        fs and betamul but it is never bigger than n.
     
        GAMMATONEFIR(fc,fs,n) will do the same but choose a filter bandwidth
        according to Glasberg and Moore (1990).  betamul is choosen to be 1.0183.
     
        GAMMATONEFIR(fc,fs) will do as above and choose a sufficiently long
        filter to accurately represent the lowest subband channel.
     
        If fc is a vector, each entry of fc is considered as one center
        frequency, and the corresponding coefficients are returned as column
        vectors in the output.
     
        The inpulse response of the gammatone filter is given by
     
            g(t) = a*t^(4-1)*cos(2*pi*fc*t)*exp(-2*pi*beta*t)
     
        The gammatone filters as implemented by this function generate
        complex valued output, because the filters are modulated by the
        exponential function. Using real on the output will give the
        coefficients of the corresponding cosine modulated filters.
     
        To create the filter coefficients of a 1-erb spaced filter bank using
        gammatone filters use the following construction:
     
          g = gammatonefir(erbspacebw(flow,fhigh),fs);
     
     
       
        References:
          A. Aertsen and P. Johannesma. Spectro-temporal receptive fields of
          auditory neurons in the grassfrog. I. Characterization of tonal and
          natural stimuli. Biol. Cybern, 38:223--234, 1980.
          
          B. R. Glasberg and B. Moore. Derivation of auditory filter shapes from
          notched-noise data. Hearing Research, 47(1-2):103, 1990.
          
     *Url*: <http://ltfat.github.io/doc/auditory/gammatonefir.html>

     See also: erbspace, audspace, audfiltbw, demo_auditoryfilterbank.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
GAMMATONEFIR  Gammatone filter coefficients
   Usage: b = gammatonefir(fc,fs,...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
rangecompress


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1172
 -- Function: rangecompress
     RANGECOMPRESS   Compress the dynamic range of a signal 
        Usage: [outsig, sigweight] = rangecompress(insig,mu);
        
        [outsig, sigweight]=RANGECOMPRESS(insig,mu) range-compresss the input
        signal insig using mu-law range-compression with parameter mu.
     
        RANGECOMPRESS takes the following optional arguments:
     
          'mulaw'  Do mu-law compression, this is the default.
     
          'alaw'   Do A-law compression.
     
          'mu',mu  mu-law parameter. Default value is 255.
     
          'A',A    A-law parameter. Default value is 87.7.
     
        The following plot shows how the output range is compressed for input
        values between 0 and 1:
     
          x=linspace(0,1,100);
          xc=rangecompress(x);
          plot(x,xc);
          xlabel('input');
          ylabel('output');
          title('mu-law compression');
       
        References:
          S. Jayant and P. Noll. Digital Coding of Waveforms: Principles and
          Applications to Speech and Video. Prentice Hall, 1990.
          
     *Url*: <http://ltfat.github.io/doc/auditory/rangecompress.html>


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
RANGECOMPRESS   Compress the dynamic range of a signal 
   Usage: [outsig, si...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
rangeexpand


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 843
 -- Function: rangeexpand
     RANGEEXPAND  Expand the dynamic range of a signal
        Usage:  sig = rangeexpand(insig,mu,sigweight);
     
        RANGEEXPAND(insig,mu,sigweight) inverts a previously
        applied mu-law companding to the signal insig. The parameters
        mu and sigweight must match those from the call to RANGECOMPRESS
     
        RANGEEXPAND takes the following optional arguments:
     
          'mulaw'   Do mu-law compression, this is the default.
     
          'alaw'    Do A-law compression.
     
          'mu',mu   mu-law parameter. Default value is 255.
       
        References:
          S. Jayant and P. Noll. Digital Coding of Waveforms: Principles and
          Applications to Speech and Video. Prentice Hall, 1990.
          
     *Url*: <http://ltfat.github.io/doc/auditory/rangeexpand.html>


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
RANGEEXPAND  Expand the dynamic range of a signal
   Usage:  sig = rangeexpan...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
semiaudplot


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 912
 -- Function: semiaudplot
     SEMIAUDPLOT  2D plot on auditory scale
        Usage: h=semiaudplot(x,y);
     
        SEMIAUDPLOT(x,y) plots the data (x,y) on an auditory scale. By
        default the values of the x-axis will be shown on the Erb-scale.
     
        SEMIAUDPLOT takes the following parameters at the end of the line of input
        arguments:
     
          'x'       Make the x-axis use the auditory scale. This is the default.
     
          'y'       Make the y-axis use the auditory scale.
     
          'opts',c  Pass options stored in a cell array onto the plot
                    function.
     
        In addition to these parameters, the auditory scale can be
        specified. All scales supported by FREQTOAUD are supported. The default
        is to use the erb-scale.     
     
     *Url*: <http://ltfat.github.io/doc/auditory/semiaudplot.html>

     See also: freqtoaud.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
SEMIAUDPLOT  2D plot on auditory scale
   Usage: h=semiaudplot(x,y);





