annotate toolboxes/MIRtoolbox1.3.2/MIRToolbox/mirhcdf.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
rev   line source
wolffd@0 1 function varargout = mirhcdf(orig,varargin)
wolffd@0 2 % df = mirhcdf(x) calculates the Harmonic Change Detection Function
wolffd@0 3 % related to x.
wolffd@0 4 %
wolffd@0 5 % C. A. Harte and M. B. Sandler, Detecting harmonic change in musical
wolffd@0 6 % audio, in Proceedings of Audio and Music Computing for Multimedia
wolffd@0 7 % Workshop, Santa Barbara, CA, 2006.
wolffd@0 8
wolffd@0 9 specif.defaultframelength = .743;
wolffd@0 10 specif.defaultframehop = .1;
wolffd@0 11 varargout = mirfunction(@mirhcdf,orig,varargin,nargout,specif,@init,@main);
wolffd@0 12
wolffd@0 13
wolffd@0 14 function [df type] = init(orig,option)
wolffd@0 15 if isamir(orig,'mirscalar')
wolffd@0 16 df = orig;
wolffd@0 17 else
wolffd@0 18 if isframed(orig)
wolffd@0 19 tc = mirtonalcentroid(orig);
wolffd@0 20 else
wolffd@0 21 tc = mirtonalcentroid(orig,'Frame');
wolffd@0 22 end
wolffd@0 23 df = mirflux(tc);
wolffd@0 24 end
wolffd@0 25 type = 'mirscalar';
wolffd@0 26
wolffd@0 27
wolffd@0 28 function df = main(df,option,postoption)