Daniel@0: function varargout = mirauditory(x,varargin) Daniel@0: % Produces the output based on an auditory modelling, of the signal x, Daniel@0: % using a gammatone filterbank. Daniel@0: % Optional argument: Daniel@0: % mirtempo(...,'Filterbank',b) indicates the number of channels in Daniel@0: % the filterbank decomposition. Daniel@0: % Default value: b = 40. Daniel@0: Daniel@0: fb.key = 'Filterbank'; Daniel@0: fb.type = 'Integer'; Daniel@0: fb.default = 40; Daniel@0: option.fb = fb; Daniel@0: Daniel@0: specif.option = option; Daniel@0: Daniel@0: varargout = mirfunction(@mirauditory,x,varargin,nargout,specif,@init,@main); Daniel@0: Daniel@0: Daniel@0: function [x type] = init(x,option) Daniel@0: if isamir(x,'miraudio') Daniel@0: x = mirfilterbank(x,'NbChannels',option.fb); Daniel@0: x = mirenvelope(x,'Center','Diff','Halfwave','Center'); Daniel@0: end Daniel@0: type = 'mirenvelope'; Daniel@0: Daniel@0: Daniel@0: function x = main(x,option,postoption)