annotate toolboxes/MIRtoolbox1.3.2/MIRToolbox/mirauditory.m @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1 function varargout = mirauditory(x,varargin)
Daniel@0 2 % Produces the output based on an auditory modelling, of the signal x,
Daniel@0 3 % using a gammatone filterbank.
Daniel@0 4 % Optional argument:
Daniel@0 5 % mirtempo(...,'Filterbank',b) indicates the number of channels in
Daniel@0 6 % the filterbank decomposition.
Daniel@0 7 % Default value: b = 40.
Daniel@0 8
Daniel@0 9 fb.key = 'Filterbank';
Daniel@0 10 fb.type = 'Integer';
Daniel@0 11 fb.default = 40;
Daniel@0 12 option.fb = fb;
Daniel@0 13
Daniel@0 14 specif.option = option;
Daniel@0 15
Daniel@0 16 varargout = mirfunction(@mirauditory,x,varargin,nargout,specif,@init,@main);
Daniel@0 17
Daniel@0 18
Daniel@0 19 function [x type] = init(x,option)
Daniel@0 20 if isamir(x,'miraudio')
Daniel@0 21 x = mirfilterbank(x,'NbChannels',option.fb);
Daniel@0 22 x = mirenvelope(x,'Center','Diff','Halfwave','Center');
Daniel@0 23 end
Daniel@0 24 type = 'mirenvelope';
Daniel@0 25
Daniel@0 26
Daniel@0 27 function x = main(x,option,postoption)