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

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1 function varargout = mirhcdf(orig,varargin)
Daniel@0 2 % df = mirhcdf(x) calculates the Harmonic Change Detection Function
Daniel@0 3 % related to x.
Daniel@0 4 %
Daniel@0 5 % C. A. Harte and M. B. Sandler, Detecting harmonic change in musical
Daniel@0 6 % audio, in Proceedings of Audio and Music Computing for Multimedia
Daniel@0 7 % Workshop, Santa Barbara, CA, 2006.
Daniel@0 8
Daniel@0 9 specif.defaultframelength = .743;
Daniel@0 10 specif.defaultframehop = .1;
Daniel@0 11 varargout = mirfunction(@mirhcdf,orig,varargin,nargout,specif,@init,@main);
Daniel@0 12
Daniel@0 13
Daniel@0 14 function [df type] = init(orig,option)
Daniel@0 15 if isamir(orig,'mirscalar')
Daniel@0 16 df = orig;
Daniel@0 17 else
Daniel@0 18 if isframed(orig)
Daniel@0 19 tc = mirtonalcentroid(orig);
Daniel@0 20 else
Daniel@0 21 tc = mirtonalcentroid(orig,'Frame');
Daniel@0 22 end
Daniel@0 23 df = mirflux(tc);
Daniel@0 24 end
Daniel@0 25 type = 'mirscalar';
Daniel@0 26
Daniel@0 27
Daniel@0 28 function df = main(df,option,postoption)