view toolboxes/MIRtoolbox1.3.2/MIRToolbox/mirauditory.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
line wrap: on
line source
function varargout = mirauditory(x,varargin)
% Produces the output based on an auditory modelling, of the signal x,
% using a gammatone filterbank.
%   Optional argument:
%       mirtempo(...,'Filterbank',b) indicates the number of channels in
%           the filterbank decomposition.
%               Default value: b = 40.

        fb.key = 'Filterbank';
        fb.type = 'Integer';
        fb.default = 40;
    option.fb = fb;

specif.option = option;

varargout = mirfunction(@mirauditory,x,varargin,nargout,specif,@init,@main);


function [x type] = init(x,option)
if isamir(x,'miraudio')
    x = mirfilterbank(x,'NbChannels',option.fb);
    x = mirenvelope(x,'Center','Diff','Halfwave','Center');
end
type = 'mirenvelope';


function x = main(x,option,postoption)