annotate toolboxes/MIRtoolbox1.3.2/MIRToolboxDemos/tutorial.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 help mirtoolbox
wolffd@0 2 help miraudio
wolffd@0 3
wolffd@0 4
wolffd@0 5 a = miraudio('ragtime','Center','Sampling',11025,'Normal')
wolffd@0 6 mirplay(a)
wolffd@0 7 a = miraudio('ragtime','Extract',0,1)
wolffd@0 8 mirplay(a)
wolffd@0 9 miraudio('ragtime','Trim')
wolffd@0 10 a1 = miraudio('pianoA4');
wolffd@0 11 a2 = miraudio('pianoF4');
wolffd@0 12 a3 = a1+a2;
wolffd@0 13 mirplay(a3)
wolffd@0 14 mirsave(a3)
wolffd@0 15
wolffd@0 16 f = mirframe('ragtime',1,.5)
wolffd@0 17 mirplay(f)
wolffd@0 18
wolffd@0 19 mirenvelope('ragtime')
wolffd@0 20 mirenvelope('ragtime','Tau',.05)
wolffd@0 21 mirenvelope('ragtime','Diff')
wolffd@0 22 mirenvelope('ragtime','HalfwaveDiff')
wolffd@0 23
wolffd@0 24 s = mirspectrum('pianoF4')
wolffd@0 25 mirspectrum(s,'Max',3000)
wolffd@0 26 mirspectrum('pianoF4','dB')
wolffd@0 27 mirspectrum('pianoF4','Mel')
wolffd@0 28 mirspectrum('trumpet')
wolffd@0 29 mirspectrum('trumpet','Prod',2:6)
wolffd@0 30
wolffd@0 31 c = mircepstrum('pianoA4')
wolffd@0 32 mircepstrum(c,'Freq')
wolffd@0 33
wolffd@0 34 mirautocor('trumpet')
wolffd@0 35 ac = mirautocor('Amin3','Freq')
wolffd@0 36 mirautocor(ac,'Halfwave')
wolffd@0 37 mirautocor(ac,'Enhanced')
wolffd@0 38 mirautocor(ac,'Enhanced',2:10)
wolffd@0 39
wolffd@0 40 as = mirautocor(mirspectrum('Amin3'))
wolffd@0 41 ac = mirautocor('Amin3','Freq')
wolffd@0 42 cp = mircepstrum('Amin3','Freq')
wolffd@0 43 ac*as
wolffd@0 44 ac*cp
wolffd@0 45 as*cp
wolffd@0 46
wolffd@0 47 mirspectrum('ragtime','frame')
wolffd@0 48 mirflux(ans)
wolffd@0 49 mircepstrum('ragtime','frame')
wolffd@0 50 mirflux(ans)
wolffd@0 51
wolffd@0 52 fb = mirfilterbank('ragtime','Gammatone')
wolffd@0 53 mirsum(fb)
wolffd@0 54 s = mirspectrum(fb)
wolffd@0 55 mirsummary(s)
wolffd@0 56 mirauditory('ragtime')
wolffd@0 57 mirauditory('ragtime','Filterbank',20)
wolffd@0 58
wolffd@0 59 mirpeaks(mirspectrum('ragtime','mel'))
wolffd@0 60 mirpeaks(mirspectrum('ragtime','mel','frame'),'total',1)
wolffd@0 61
wolffd@0 62
wolffd@0 63 r1 = mirrms('movie1','Frame')
wolffd@0 64 r2 = mirrms('movie2','Frame')
wolffd@0 65 mirlowenergy(r1)
wolffd@0 66 mirlowenergy(r2)
wolffd@0 67
wolffd@0 68 s = mirspectrum('ragtime','Frame',.023,.5,'Mel', 'dB')
wolffd@0 69 s2 = mirspectrum(s,'AlongBands','Max',10,'Window', 0,'Resonance', 'Fluctuation')
wolffd@0 70 mirsum(s2)
wolffd@0 71
wolffd@0 72 mironsets('ragtime')
wolffd@0 73 mironsets('ragtime','Detect',0)
wolffd@0 74 mironsets('ragtime','Diffenvelope')
wolffd@0 75 mironsets('ragtime','diffenvelope','Contrast',.1)
wolffd@0 76 mironsets('ragtime','SpectralFlux')
wolffd@0 77 mironsets('ragtime','SpectralFlux','Inc','off')
wolffd@0 78 mironsets('ragtime','SpectralFlux','Complex')
wolffd@0 79
wolffd@0 80 [t,a] = mirtempo('ragtime')
wolffd@0 81 [t,a] = mirtempo('ragtime','spectrum')
wolffd@0 82 [t,a] = mirtempo('ragtime','frame')
wolffd@0 83
wolffd@0 84 %[p s] = mirpulseclarity('ragtime')
wolffd@0 85
wolffd@0 86 mirattacks('ragtime')
wolffd@0 87 mirattacktime('ragtime')
wolffd@0 88 mirattackslope('ragtime')
wolffd@0 89
wolffd@0 90 t = mirtempo('czardas','frame')
wolffd@0 91 st = mirstat(t)
wolffd@0 92 h = mirhisto(t)
wolffd@0 93 mirexport('result.txt',t)