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