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