annotate toolboxes/MIRtoolbox1.3.2/MIRToolboxDemos/mirdemo.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 %%%% SEGMENTATION
wolffd@0 2
wolffd@0 3 m = mirmfcc('valse_triste_happy','Rank',2:10,'Frame',0.05,1)
wolffd@0 4 sim = mirsimatrix(m)
wolffd@0 5 n = mirnovelty(sim,'KernelSize',150)
wolffd@0 6 p = mirpeaks(n,'Contrast',.1,'Total',Inf,'NoBegin','NoEnd')
wolffd@0 7 seg = mirsegment('valse_triste_happy',p)
wolffd@0 8 mirplay(seg)
wolffd@0 9
wolffd@0 10 display('Strike any key to continue...');
wolffd@0 11 pause
wolffd@0 12 close all
wolffd@0 13
wolffd@0 14 [seg p m a] = mirsegment('valse_triste_happy','MFCC',2:10,...
wolffd@0 15 'KernelSize',150,'Contrast',.1)
wolffd@0 16
wolffd@0 17 display('Strike any key to continue...');
wolffd@0 18 pause
wolffd@0 19 close all
wolffd@0 20
wolffd@0 21 %%%% TEMPO
wolffd@0 22
wolffd@0 23 fb = mirfilterbank('czardas')
wolffd@0 24 %mirplay(fb)
wolffd@0 25 e = mirenvelope(fb)
wolffd@0 26 de = mirenvelope(e,'Diff','Halfwave')
wolffd@0 27 s = mirsum(de,'Centered')
wolffd@0 28 f = mirframe(s,3,.2);
wolffd@0 29 ac = mirautocor(s,'Resonance','Enhanced')
wolffd@0 30 p = mirpeaks(ac,'Total',1)
wolffd@0 31 t = mirtempo(p)
wolffd@0 32
wolffd@0 33 display('Strike any key to continue...');
wolffd@0 34 pause
wolffd@0 35 close all
wolffd@0 36
wolffd@0 37 [t,p] = mirtempo('czardas','Periodicity','Frame')
wolffd@0 38 h = mirhisto(t)
wolffd@0 39
wolffd@0 40 display('Strike any key to continue...');
wolffd@0 41 pause
wolffd@0 42 close all
wolffd@0 43
wolffd@0 44 %%%% TONALITY
wolffd@0 45
wolffd@0 46 c = mirchromagram('vivaldi','Frame',2)
wolffd@0 47 k = mirkeystrength(c)
wolffd@0 48 p = mirpeaks(k,'Total',1)
wolffd@0 49
wolffd@0 50 [k,p] = mirkey('vivaldi','Frame',1)