annotate toolboxes/MIRtoolbox1.3.2/MIRToolbox/@mirpattern/mirplay.m @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1 function varargout = mirplay(p,varargin)
Daniel@0 2
Daniel@0 3 pat.key = 'Pattern';
Daniel@0 4 pat.type = 'Integer';
Daniel@0 5 pat.default = 0;
Daniel@0 6 option.pat = pat;
Daniel@0 7
Daniel@0 8 specif.option = option;
Daniel@0 9
Daniel@0 10 specif.eachchunk = 'Normal';
Daniel@0 11
Daniel@0 12 varargout = mirfunction(@mirplay,p,varargin,nargout,specif,@init,@main);
Daniel@0 13 if nargout == 0
Daniel@0 14 varargout = {};
Daniel@0 15 end
Daniel@0 16
Daniel@0 17
Daniel@0 18 function [x type] = init(x,option)
Daniel@0 19 type = '';
Daniel@0 20
Daniel@0 21
Daniel@0 22 function noargout = main(p,option,postoption)
Daniel@0 23 if not(option.pat)
Daniel@0 24 option.pat = 1:length(p.pattern);
Daniel@0 25 end
Daniel@0 26 n = get(p,'Name');
Daniel@0 27 for h = 1:length(n)
Daniel@0 28 for i = option.pat
Daniel@0 29 display(['Pattern # ',num2str(i)])
Daniel@0 30 for j = 1:length(p.pattern{i}.occurrence)
Daniel@0 31 display(['Occurrence # ',num2str(j)])
Daniel@0 32 a = miraudio(n{h},'Extract',p.pattern{i}.occurrence{j}.start,...
Daniel@0 33 p.pattern{i}.occurrence{j}.end);
Daniel@0 34 mirplay(a)
Daniel@0 35 end
Daniel@0 36 end
Daniel@0 37 end
Daniel@0 38 noargout = {};