Daniel@0: function varargout = mirfluctuation(orig,varargin) Daniel@0: % f = mirfluctuation(x) calculates the fluctuation strength, indicating the Daniel@0: % rhythmic periodicities along the different channels. Daniel@0: % Optional arguments: Daniel@0: % mirfluctuation(...,'MinRes',mr) specifies the minimal frequency Daniel@0: % resolution of the resulting spectral decomposition, in Hz. Daniel@0: % Default: mr = .01 Hz Daniel@0: % mirfluctuation(...,'Summary') returns the summary of the fluctuation, Daniel@0: % i.e., the summation along the critical bands. Daniel@0: % Daniel@0: % E. Pampalk, A. Rauber, D. Merkl, "Content-based Organization and Daniel@0: % Visualization of Music Archives", Daniel@0: Daniel@0: sum.key = 'Summary'; Daniel@0: sum.type = 'Boolean'; Daniel@0: sum.default = 0; Daniel@0: option.sum = sum; Daniel@0: Daniel@0: mr.key = 'MinRes'; Daniel@0: mr.type = 'Integer'; Daniel@0: mr.default = .01; Daniel@0: option.mr = mr; Daniel@0: Daniel@0: specif.option = option; Daniel@0: Daniel@0: varargout = mirfunction(@mirfluctuation,orig,varargin,nargout,specif,@init,@main); Daniel@0: Daniel@0: Daniel@0: function [f type] = init(x,option) Daniel@0: if iscell(x) Daniel@0: x = x{1}; Daniel@0: end Daniel@0: if isamir(x,'miraudio') && not(isframed(x)) Daniel@0: x = mirframe(x,.023,.5); Daniel@0: end Daniel@0: m = mirspectrum(x,'Power','Terhardt','Bark','dB','Mask'); Daniel@0: f = mirspectrum(m,'AlongBands','Max',10,'Window',0,... Daniel@0: 'Resonance','Fluctuation','MinRes',option.mr); Daniel@0: if option.sum Daniel@0: f = mirsummary(f); Daniel@0: end Daniel@0: type = 'mirspectrum'; Daniel@0: Daniel@0: Daniel@0: function f = main(f,option,postoption) Daniel@0: f = set(f,'Title','Fluctuation');