Mercurial > hg > camir-aes2014
comparison toolboxes/MIRtoolbox1.3.2/MIRToolboxDemos/mirtest.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 function mirtest(audio) | |
2 | |
3 if not(nargin) | |
4 audio = 'ragtime'; | |
5 end | |
6 | |
7 %% Version 1.0 | |
8 | |
9 mirpeaks(mirspectrum(audio,'Mel')) | |
10 f = mirframe(audio,.5,.5) | |
11 mirpeaks(mirspectrum(f,'Mel'),'Total',1) | |
12 mirpeaks(mirautocor(f),'Total',1,'NoBegin') | |
13 mirpeaks(mirspectrum(f),'Total',1,'NoBegin') | |
14 mirpeaks(mirchromagram(f),'Total',1) | |
15 mirpeaks(mirkeystrength(f),'Total',1) | |
16 %mirpeaks(mirfluctuation(f),'Total',1,'NoBegin') %Not implemented yet.. | |
17 [a,b,c] = mirkey(audio) | |
18 | |
19 %% | |
20 %pause | |
21 clear a b c f | |
22 close all | |
23 | |
24 f = mirfeatures(audio); | |
25 sf = mirstat(f); | |
26 | |
27 f.dynamics.rms{1} | |
28 f.fluctuation.peak{1} | |
29 f.fluctuation.centroid{1} | |
30 f.rhythm.tempo{:} | |
31 f.rhythm.attack.time{:} | |
32 f.rhythm.attack.slope{1} | |
33 sf.dynamics.rms | |
34 sf.fluctuation.peak | |
35 sf.fluctuation.centroid | |
36 sf.rhythm.tempo | |
37 sf.rhythm.attack.time | |
38 sf.rhythm.attack.slope | |
39 | |
40 %pause | |
41 close all | |
42 | |
43 f.timbre.zerocross{:} | |
44 f.spectral.centroid{:} | |
45 f.spectral.brightness{:} | |
46 f.spectral.spread{:} | |
47 f.spectral.skewness{:} | |
48 f.spectral.kurtosis{:} | |
49 f.spectral.rolloff95{:} | |
50 f.spectral.rolloff85{:} | |
51 f.spectral.spectentropy{:} | |
52 f.spectral.flatness{:} | |
53 sf.timbre.zerocross | |
54 sf.spectral.centroid | |
55 sf.spectral.brightness | |
56 sf.spectral.spread | |
57 sf.spectral.skewness | |
58 sf.spectral.kurtosis | |
59 sf.spectral.rolloff95 | |
60 sf.spectral.rolloff85 | |
61 sf.spectral.spectentropy | |
62 sf.spectral.flatness | |
63 | |
64 %pause | |
65 close all | |
66 | |
67 f.spectral.roughness{:} | |
68 f.spectral.irregularity{:} | |
69 %f.timbre.inharmonicity{:} | |
70 f.spectral.mfcc{:} | |
71 f.spectral.dmfcc{:} | |
72 f.spectral.ddmfcc{:} | |
73 f.timbre.lowenergy{:} | |
74 sf.spectral.roughness | |
75 sf.spectral.irregularity | |
76 %sf.timbre.inharmonicity | |
77 sf.spectral.mfcc | |
78 sf.spectral.dmfcc | |
79 sf.spectral.ddmfcc | |
80 sf.timbre.lowenergy | |
81 | |
82 %pause | |
83 close all | |
84 | |
85 f.timbre.spectralflux{:} | |
86 %f.pitch.salient{:} | |
87 f.tonal.chromagram.peak{:} | |
88 f.tonal.chromagram.centroid{:} | |
89 f.tonal.keyclarity{:} | |
90 f.tonal.mode{:} | |
91 f.tonal.hcdf{:} | |
92 sf.timbre.spectralflux | |
93 %sf.pitch.salient | |
94 sf.tonal.chromagram.peak | |
95 sf.tonal.chromagram.centroid | |
96 sf.tonal.keyclarity | |
97 sf.tonal.mode | |
98 sf.tonal.hcdf | |
99 | |
100 mirexport('resultdemo.txt',sf) | |
101 mirexport('resultdemo.arff',f) | |
102 | |
103 %% Version 1.1 | |
104 | |
105 %pause | |
106 clear f | |
107 close all | |
108 | |
109 mirlength(audio) | |
110 s = mirspectrum(audio,'cents','Min',50) | |
111 s = mirspectrum(s,'Collapsed') | |
112 mirspectrum(s,'Gauss') | |
113 ss = mirspectrum(s,'Smooth') | |
114 p = mirpeaks(ss,'Extract') | |
115 mirkurtosis(p) | |
116 [le,f] = mirlowenergy(audio,'ASR') | |
117 p = mirpitch(audio,'frame') | |
118 mirpitch(p,'median') | |
119 mirauditory(audio) | |
120 mirroughness('ragtime') | |
121 | |
122 %% | |
123 %pause | |
124 clear s ss p le f | |
125 close all | |
126 | |
127 fb = mirfilterbank('Design','NbChannels',5) | |
128 f = mirfeatures(fb); | |
129 %sf = mirstat(f); | |
130 f = mireval(f,audio) | |
131 | |
132 f.dynamics.rms{1} | |
133 f.fluctuation.peak{1} | |
134 f.fluctuation.centroid{1} | |
135 f.rhythm.tempo{:} | |
136 f.rhythm.attack.time{:} | |
137 f.rhythm.attack.slope{1} | |
138 | |
139 %pause | |
140 close all | |
141 | |
142 f.timbre.zerocross{:} | |
143 f.spectral.centroid{:} | |
144 f.spectral.brightness{:} | |
145 f.spectral.spread{:} | |
146 f.spectral.skewness{:} | |
147 f.spectral.kurtosis{:} | |
148 f.spectral.rolloff95{:} | |
149 f.spectral.rolloff85{:} | |
150 f.spectral.spectentropy{:} | |
151 f.spectral.flatness{:} | |
152 | |
153 %pause | |
154 close all | |
155 | |
156 f.spectral.roughness{:} | |
157 f.spectral.irregularity{:} | |
158 %f.timbre.inharmonicity{:} | |
159 f.spectral.mfcc{:} | |
160 f.spectral.dmfcc{:} | |
161 f.spectral.ddmfcc{:} | |
162 f.timbre.lowenergy{:} | |
163 | |
164 %pause | |
165 close all | |
166 | |
167 f.timbre.spectralflux{:} | |
168 %f.pitch.salient{:} | |
169 f.tonal.chromagram.peak{:} | |
170 f.tonal.chromagram.centroid{:} | |
171 f.tonal.keyclarity{:} | |
172 f.tonal.mode{:} | |
173 f.tonal.hcdf{:} |