annotate toolboxes/MIRtoolbox1.3.2/MIRToolboxDemos/mirtest.m @ 0:cc4b1211e677 tip

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