Daniel@0: function mirtest(audio) Daniel@0: Daniel@0: if not(nargin) Daniel@0: audio = 'ragtime'; Daniel@0: end Daniel@0: Daniel@0: %% Version 1.0 Daniel@0: Daniel@0: mirpeaks(mirspectrum(audio,'Mel')) Daniel@0: f = mirframe(audio,.5,.5) Daniel@0: mirpeaks(mirspectrum(f,'Mel'),'Total',1) Daniel@0: mirpeaks(mirautocor(f),'Total',1,'NoBegin') Daniel@0: mirpeaks(mirspectrum(f),'Total',1,'NoBegin') Daniel@0: mirpeaks(mirchromagram(f),'Total',1) Daniel@0: mirpeaks(mirkeystrength(f),'Total',1) Daniel@0: %mirpeaks(mirfluctuation(f),'Total',1,'NoBegin') %Not implemented yet.. Daniel@0: [a,b,c] = mirkey(audio) Daniel@0: Daniel@0: %% Daniel@0: %pause Daniel@0: clear a b c f Daniel@0: close all Daniel@0: Daniel@0: f = mirfeatures(audio); Daniel@0: sf = mirstat(f); Daniel@0: Daniel@0: f.dynamics.rms{1} Daniel@0: f.fluctuation.peak{1} Daniel@0: f.fluctuation.centroid{1} Daniel@0: f.rhythm.tempo{:} Daniel@0: f.rhythm.attack.time{:} Daniel@0: f.rhythm.attack.slope{1} Daniel@0: sf.dynamics.rms Daniel@0: sf.fluctuation.peak Daniel@0: sf.fluctuation.centroid Daniel@0: sf.rhythm.tempo Daniel@0: sf.rhythm.attack.time Daniel@0: sf.rhythm.attack.slope Daniel@0: Daniel@0: %pause Daniel@0: close all Daniel@0: Daniel@0: f.timbre.zerocross{:} Daniel@0: f.spectral.centroid{:} Daniel@0: f.spectral.brightness{:} Daniel@0: f.spectral.spread{:} Daniel@0: f.spectral.skewness{:} Daniel@0: f.spectral.kurtosis{:} Daniel@0: f.spectral.rolloff95{:} Daniel@0: f.spectral.rolloff85{:} Daniel@0: f.spectral.spectentropy{:} Daniel@0: f.spectral.flatness{:} Daniel@0: sf.timbre.zerocross Daniel@0: sf.spectral.centroid Daniel@0: sf.spectral.brightness Daniel@0: sf.spectral.spread Daniel@0: sf.spectral.skewness Daniel@0: sf.spectral.kurtosis Daniel@0: sf.spectral.rolloff95 Daniel@0: sf.spectral.rolloff85 Daniel@0: sf.spectral.spectentropy Daniel@0: sf.spectral.flatness Daniel@0: Daniel@0: %pause Daniel@0: close all Daniel@0: Daniel@0: f.spectral.roughness{:} Daniel@0: f.spectral.irregularity{:} Daniel@0: %f.timbre.inharmonicity{:} Daniel@0: f.spectral.mfcc{:} Daniel@0: f.spectral.dmfcc{:} Daniel@0: f.spectral.ddmfcc{:} Daniel@0: f.timbre.lowenergy{:} Daniel@0: sf.spectral.roughness Daniel@0: sf.spectral.irregularity Daniel@0: %sf.timbre.inharmonicity Daniel@0: sf.spectral.mfcc Daniel@0: sf.spectral.dmfcc Daniel@0: sf.spectral.ddmfcc Daniel@0: sf.timbre.lowenergy Daniel@0: Daniel@0: %pause Daniel@0: close all Daniel@0: Daniel@0: f.timbre.spectralflux{:} Daniel@0: %f.pitch.salient{:} Daniel@0: f.tonal.chromagram.peak{:} Daniel@0: f.tonal.chromagram.centroid{:} Daniel@0: f.tonal.keyclarity{:} Daniel@0: f.tonal.mode{:} Daniel@0: f.tonal.hcdf{:} Daniel@0: sf.timbre.spectralflux Daniel@0: %sf.pitch.salient Daniel@0: sf.tonal.chromagram.peak Daniel@0: sf.tonal.chromagram.centroid Daniel@0: sf.tonal.keyclarity Daniel@0: sf.tonal.mode Daniel@0: sf.tonal.hcdf Daniel@0: Daniel@0: mirexport('resultdemo.txt',sf) Daniel@0: mirexport('resultdemo.arff',f) Daniel@0: Daniel@0: %% Version 1.1 Daniel@0: Daniel@0: %pause Daniel@0: clear f Daniel@0: close all Daniel@0: Daniel@0: mirlength(audio) Daniel@0: s = mirspectrum(audio,'cents','Min',50) Daniel@0: s = mirspectrum(s,'Collapsed') Daniel@0: mirspectrum(s,'Gauss') Daniel@0: ss = mirspectrum(s,'Smooth') Daniel@0: p = mirpeaks(ss,'Extract') Daniel@0: mirkurtosis(p) Daniel@0: [le,f] = mirlowenergy(audio,'ASR') Daniel@0: p = mirpitch(audio,'frame') Daniel@0: mirpitch(p,'median') Daniel@0: mirauditory(audio) Daniel@0: mirroughness('ragtime') Daniel@0: Daniel@0: %% Daniel@0: %pause Daniel@0: clear s ss p le f Daniel@0: close all Daniel@0: Daniel@0: fb = mirfilterbank('Design','NbChannels',5) Daniel@0: f = mirfeatures(fb); Daniel@0: %sf = mirstat(f); Daniel@0: f = mireval(f,audio) Daniel@0: Daniel@0: f.dynamics.rms{1} Daniel@0: f.fluctuation.peak{1} Daniel@0: f.fluctuation.centroid{1} Daniel@0: f.rhythm.tempo{:} Daniel@0: f.rhythm.attack.time{:} Daniel@0: f.rhythm.attack.slope{1} Daniel@0: Daniel@0: %pause Daniel@0: close all Daniel@0: Daniel@0: f.timbre.zerocross{:} Daniel@0: f.spectral.centroid{:} Daniel@0: f.spectral.brightness{:} Daniel@0: f.spectral.spread{:} Daniel@0: f.spectral.skewness{:} Daniel@0: f.spectral.kurtosis{:} Daniel@0: f.spectral.rolloff95{:} Daniel@0: f.spectral.rolloff85{:} Daniel@0: f.spectral.spectentropy{:} Daniel@0: f.spectral.flatness{:} Daniel@0: Daniel@0: %pause Daniel@0: close all Daniel@0: Daniel@0: f.spectral.roughness{:} Daniel@0: f.spectral.irregularity{:} Daniel@0: %f.timbre.inharmonicity{:} Daniel@0: f.spectral.mfcc{:} Daniel@0: f.spectral.dmfcc{:} Daniel@0: f.spectral.ddmfcc{:} Daniel@0: f.timbre.lowenergy{:} Daniel@0: Daniel@0: %pause Daniel@0: close all Daniel@0: Daniel@0: f.timbre.spectralflux{:} Daniel@0: %f.pitch.salient{:} Daniel@0: f.tonal.chromagram.peak{:} Daniel@0: f.tonal.chromagram.centroid{:} Daniel@0: f.tonal.keyclarity{:} Daniel@0: f.tonal.mode{:} Daniel@0: f.tonal.hcdf{:}