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