Mercurial > hg > camir-aes2014
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/toolboxes/MIRtoolbox1.3.2/MIRToolbox/mirhcdf.m Tue Feb 10 15:05:51 2015 +0000 @@ -0,0 +1,28 @@ +function varargout = mirhcdf(orig,varargin) +% df = mirhcdf(x) calculates the Harmonic Change Detection Function +% related to x. +% +% C. A. Harte and M. B. Sandler, Detecting harmonic change in musical +% audio, in Proceedings of Audio and Music Computing for Multimedia +% Workshop, Santa Barbara, CA, 2006. + +specif.defaultframelength = .743; +specif.defaultframehop = .1; +varargout = mirfunction(@mirhcdf,orig,varargin,nargout,specif,@init,@main); + + +function [df type] = init(orig,option) +if isamir(orig,'mirscalar') + df = orig; +else + if isframed(orig) + tc = mirtonalcentroid(orig); + else + tc = mirtonalcentroid(orig,'Frame'); + end + df = mirflux(tc); +end +type = 'mirscalar'; + + +function df = main(df,option,postoption) \ No newline at end of file