annotate toolboxes/MIRtoolbox1.3.2/MIRToolboxDemos/demo5export.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 demo5export
wolffd@0 2 % Example of use of the export function.
wolffd@0 3 % For more examples, cf. mirfeatures.
wolffd@0 4
wolffd@0 5 s = mirspectrum('Folder');
wolffd@0 6 if not(isempty(get(s,'Data')))
wolffd@0 7 ch = mirchromagram(s);
wolffd@0 8 k = mirkeystrength(ch);
wolffd@0 9 %h = mirhisto(k);
wolffd@0 10 e = mirenvelope('Folder');
wolffd@0 11 d = mirenvelope(e,'Diff');
wolffd@0 12 mirexport('NoFrameNoPeaks.txt',ch,k);
wolffd@0 13
wolffd@0 14 ch = mirpeaks(ch,'Total',1);
wolffd@0 15 k = mirpeaks(k,'Total',1);
wolffd@0 16 %h = mirpeaks(h);
wolffd@0 17 e = mirpeaks(e,'Total',1);
wolffd@0 18 d = mirpeaks(d,'Total',1);
wolffd@0 19 mirexport('NoFrameButPeaks.txt',ch,k,e,d);
wolffd@0 20 clear ch k e d
wolffd@0 21
wolffd@0 22 ac = mirautocor('Folder','Frame',.5,.2);
wolffd@0 23 s = mirspectrum('Folder','Frame',.5,.2);
wolffd@0 24 sf = mirflux(s);
wolffd@0 25 ms = mirspectrum(s,'Mel');
wolffd@0 26 m = mirmfcc(ms);
wolffd@0 27 ch = mirchromagram(s);
wolffd@0 28 k = mirkeystrength(ch);
wolffd@0 29 %h = mirhisto(k);
wolffd@0 30 e = mirenvelope('Folder','Frame',.5,.2);
wolffd@0 31 d = mirenvelope(e,'Diff');
wolffd@0 32 mirexport('FrameNoPeaks.txt',ms,m,ch,k);
wolffd@0 33
wolffd@0 34 ac = mirpeaks(ac,'Total',1,'NoBegin');
wolffd@0 35 s = mirpeaks(s,'Total',1);
wolffd@0 36 sf = mirpeaks(sf,'Total',1);
wolffd@0 37 ms = mirpeaks(ms,'Total',1);
wolffd@0 38 m = mirpeaks(m,'Total',1,'Interpol',0);
wolffd@0 39 ch = mirpeaks(ch,'Total',1);
wolffd@0 40 k = mirpeaks(k,'Total',1);
wolffd@0 41 %h = mirpeaks(h)
wolffd@0 42 e = mirpeaks(e,'Total',1);
wolffd@0 43 d = mirpeaks(d,'Total',1);
wolffd@0 44 mirexport('FrameAndPeaks.txt',ac,s,sf,ms,m,ch,k,e,d);
wolffd@0 45 end