Mercurial > hg > camir-aes2014
comparison toolboxes/MIRtoolbox1.3.2/MIRToolbox/@mirpattern/mirplay.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 varargout = mirplay(p,varargin) | |
2 | |
3 pat.key = 'Pattern'; | |
4 pat.type = 'Integer'; | |
5 pat.default = 0; | |
6 option.pat = pat; | |
7 | |
8 specif.option = option; | |
9 | |
10 specif.eachchunk = 'Normal'; | |
11 | |
12 varargout = mirfunction(@mirplay,p,varargin,nargout,specif,@init,@main); | |
13 if nargout == 0 | |
14 varargout = {}; | |
15 end | |
16 | |
17 | |
18 function [x type] = init(x,option) | |
19 type = ''; | |
20 | |
21 | |
22 function noargout = main(p,option,postoption) | |
23 if not(option.pat) | |
24 option.pat = 1:length(p.pattern); | |
25 end | |
26 n = get(p,'Name'); | |
27 for h = 1:length(n) | |
28 for i = option.pat | |
29 display(['Pattern # ',num2str(i)]) | |
30 for j = 1:length(p.pattern{i}.occurrence) | |
31 display(['Occurrence # ',num2str(j)]) | |
32 a = miraudio(n{h},'Extract',p.pattern{i}.occurrence{j}.start,... | |
33 p.pattern{i}.occurrence{j}.end); | |
34 mirplay(a) | |
35 end | |
36 end | |
37 end | |
38 noargout = {}; |