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