Mercurial > hg > camir-aes2014
annotate toolboxes/MIRtoolbox1.3.2/MIRToolboxDemos/demo9retrieval.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 function demo9retrieval(query) |
wolffd@0 | 2 |
wolffd@0 | 3 if nargin<1 |
wolffd@0 | 4 query = 'vivaldi'; |
wolffd@0 | 5 end |
wolffd@0 | 6 |
wolffd@0 | 7 %% |
wolffd@0 | 8 % 1. Timbre |
wolffd@0 | 9 |
wolffd@0 | 10 cc0 = mirmfcc(query,'frame',.025,'s',.01,'s','Rank',8:30) |
wolffd@0 | 11 cl0 = mircluster(cc0,16) |
wolffd@0 | 12 |
wolffd@0 | 13 cc = mirmfcc('Folder','frame',.025,'s',.01,'s','Rank',8:30); |
wolffd@0 | 14 cl = mircluster(cc,16); |
wolffd@0 | 15 |
wolffd@0 | 16 d1 = mirdist(cl0,cl) |
wolffd@0 | 17 mirquery(cl0,cl) |
wolffd@0 | 18 mirplay(ans,'Sequence',1:6) |
wolffd@0 | 19 |
wolffd@0 | 20 pause |
wolffd@0 | 21 |
wolffd@0 | 22 %% |
wolffd@0 | 23 % 2. Rhythm |
wolffd@0 | 24 |
wolffd@0 | 25 [bs0 sm0] = mirbeatspectrum(query) |
wolffd@0 | 26 bs = mirbeatspectrum('Folder'); |
wolffd@0 | 27 |
wolffd@0 | 28 d2 = mirdist(bs0,bs) |
wolffd@0 | 29 mirquery(bs0,bs) |
wolffd@0 | 30 mirplay(ans,'Sequence',1:6) |
wolffd@0 | 31 |
wolffd@0 | 32 % Variant |
wolffd@0 | 33 |
wolffd@0 | 34 [tp0,ac0] = mirtempo(query) |
wolffd@0 | 35 [tp,ac] = mirtempo('Folder'); |
wolffd@0 | 36 ac0 = purgedata(ac0); |
wolffd@0 | 37 ac = purgedata(ac); |
wolffd@0 | 38 d2bis = mirdist(ac0,ac) |
wolffd@0 | 39 mirquery(ac0,ac) |
wolffd@0 | 40 mirplay(ans,'Sequence',1:6) |
wolffd@0 | 41 |
wolffd@0 | 42 pause |
wolffd@0 | 43 |
wolffd@0 | 44 %% |
wolffd@0 | 45 % 3. Structure |
wolffd@0 | 46 |
wolffd@0 | 47 pk0 = mirpeaks(mirnovelty(query)) |
wolffd@0 | 48 pk = mirpeaks(mirnovelty('Folder')); |
wolffd@0 | 49 |
wolffd@0 | 50 d3 = mirdist(pk0,pk) |
wolffd@0 | 51 mirquery(pk0,pk) |
wolffd@0 | 52 mirplay(ans,'Sequence',1:6) |
wolffd@0 | 53 |
wolffd@0 | 54 pause |
wolffd@0 | 55 |
wolffd@0 | 56 %% |
wolffd@0 | 57 % 4. Combination |
wolffd@0 | 58 |
wolffd@0 | 59 d = d1*.6 + d2*.3 + d3*.1 |
wolffd@0 | 60 mirquery(d) |
wolffd@0 | 61 mirplay(ans,'Sequence',1:6) |
wolffd@0 | 62 |
wolffd@0 | 63 dbis = d1*.6 + d2bis*.3+ d3*.1 |
wolffd@0 | 64 mirquery(dbis) |
wolffd@0 | 65 mirplay(ans,'Sequence',1:6) |