comparison toolboxes/MIRtoolbox1.3.2/MIRToolbox/mirfluctuation.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 function varargout = mirfluctuation(orig,varargin)
2 % f = mirfluctuation(x) calculates the fluctuation strength, indicating the
3 % rhythmic periodicities along the different channels.
4 % Optional arguments:
5 % mirfluctuation(...,'MinRes',mr) specifies the minimal frequency
6 % resolution of the resulting spectral decomposition, in Hz.
7 % Default: mr = .01 Hz
8 % mirfluctuation(...,'Summary') returns the summary of the fluctuation,
9 % i.e., the summation along the critical bands.
10 %
11 % E. Pampalk, A. Rauber, D. Merkl, "Content-based Organization and
12 % Visualization of Music Archives",
13
14 sum.key = 'Summary';
15 sum.type = 'Boolean';
16 sum.default = 0;
17 option.sum = sum;
18
19 mr.key = 'MinRes';
20 mr.type = 'Integer';
21 mr.default = .01;
22 option.mr = mr;
23
24 specif.option = option;
25
26 varargout = mirfunction(@mirfluctuation,orig,varargin,nargout,specif,@init,@main);
27
28
29 function [f type] = init(x,option)
30 if iscell(x)
31 x = x{1};
32 end
33 if isamir(x,'miraudio') && not(isframed(x))
34 x = mirframe(x,.023,.5);
35 end
36 m = mirspectrum(x,'Power','Terhardt','Bark','dB','Mask');
37 f = mirspectrum(m,'AlongBands','Max',10,'Window',0,...
38 'Resonance','Fluctuation','MinRes',option.mr);
39 if option.sum
40 f = mirsummary(f);
41 end
42 type = 'mirspectrum';
43
44
45 function f = main(f,option,postoption)
46 f = set(f,'Title','Fluctuation');