Mercurial > hg > camir-aes2014
comparison toolboxes/MIRtoolbox1.3.2/MIRToolbox/@mirchromagram/set.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 cc = set(c,varargin) | |
2 % SET Set properties for the MIRchromagram object | |
3 % and return the updated object | |
4 | |
5 propertyArgIn = varargin; | |
6 pl = c.plabel; | |
7 wr = c.wrap; | |
8 cl = c.chromaclass; | |
9 cf = c.chromafreq; | |
10 or = c.register; | |
11 d = mirdata(c); | |
12 d = set(d,'Title',get(c,'Title'),'Abs',get(c,'Abs'),'Ord',get(c,'Ord')); | |
13 while length(propertyArgIn) >= 2, | |
14 prop = propertyArgIn{1}; | |
15 val = propertyArgIn{2}; | |
16 propertyArgIn = propertyArgIn(3:end); | |
17 switch prop | |
18 case 'Magnitude' | |
19 d = set(d,'Data',val); | |
20 case 'Chroma' | |
21 d = set(d,'Pos',val); | |
22 case 'ChromaClass' | |
23 cl = val; | |
24 case 'ChromaFreq' | |
25 cf = val; | |
26 case 'Register' | |
27 or = val; | |
28 case 'PitchLabel' | |
29 pl = val; | |
30 case 'Wrap' | |
31 wr = val; | |
32 otherwise | |
33 d = set(d,prop,val); | |
34 end | |
35 end | |
36 cc.plabel = pl; | |
37 cc.wrap = wr; | |
38 cc.chromaclass = cl; | |
39 cc.chromafreq = cf; | |
40 cc.register = or; | |
41 cc = class(cc,'mirchromagram',d); |