Mercurial > hg > camir-aes2014
annotate toolboxes/MIRtoolbox1.3.2/MIRToolbox/@mirdata/set.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 a = set(a,varargin) |
wolffd@0 | 2 % SET Set properties for the MIRdata object |
wolffd@0 | 3 % and return the updated object |
wolffd@0 | 4 |
wolffd@0 | 5 propertyArgIn = varargin; |
wolffd@0 | 6 while length(propertyArgIn) >= 2, |
wolffd@0 | 7 prop = propertyArgIn{1}; |
wolffd@0 | 8 val = propertyArgIn{2}; |
wolffd@0 | 9 propertyArgIn = propertyArgIn(3:end); |
wolffd@0 | 10 switch prop |
wolffd@0 | 11 case 'Pos' |
wolffd@0 | 12 a.pos = val; |
wolffd@0 | 13 case {'Data','ChunkData'} |
wolffd@0 | 14 if strcmp(prop,'ChunkData') |
wolffd@0 | 15 val = {{val}}; |
wolffd@0 | 16 end |
wolffd@0 | 17 a.data = val; |
wolffd@0 | 18 case 'Unit' |
wolffd@0 | 19 a.unit = val; |
wolffd@0 | 20 case 'FramePos' |
wolffd@0 | 21 a.framepos = val; |
wolffd@0 | 22 case 'Sampling' |
wolffd@0 | 23 a.sr = val; |
wolffd@0 | 24 case 'NBits' |
wolffd@0 | 25 a.nbits = val; |
wolffd@0 | 26 case 'Name' |
wolffd@0 | 27 a.name = val; |
wolffd@0 | 28 case 'Name2' |
wolffd@0 | 29 a.name2 = val; |
wolffd@0 | 30 case 'Label' |
wolffd@0 | 31 a.label = val; |
wolffd@0 | 32 case 'Channels' |
wolffd@0 | 33 a.channels = val; |
wolffd@0 | 34 case 'Clusters' |
wolffd@0 | 35 a.clusters = val; |
wolffd@0 | 36 case 'MultiData' |
wolffd@0 | 37 a.multidata = val; |
wolffd@0 | 38 case 'Title' |
wolffd@0 | 39 a.title = val; |
wolffd@0 | 40 case 'Abs' |
wolffd@0 | 41 a.abs = val; |
wolffd@0 | 42 case 'Ord' |
wolffd@0 | 43 a.ord = val; |
wolffd@0 | 44 case 'PeakPos' |
wolffd@0 | 45 a.peak.pos = val; |
wolffd@0 | 46 case 'PeakVal' |
wolffd@0 | 47 a.peak.val = val; |
wolffd@0 | 48 case 'PeakPrecisePos' |
wolffd@0 | 49 a.peak.precisepos = val; |
wolffd@0 | 50 case 'PeakPreciseVal' |
wolffd@0 | 51 a.peak.preciseval = val; |
wolffd@0 | 52 case 'PeakMode' |
wolffd@0 | 53 a.peak.mode = val; |
wolffd@0 | 54 case 'AttackPos' |
wolffd@0 | 55 a.attack.pos = val; |
wolffd@0 | 56 case 'ReleasePos' |
wolffd@0 | 57 a.release.pos = val; |
wolffd@0 | 58 case 'TrackPos' |
wolffd@0 | 59 a.track.pos = val; |
wolffd@0 | 60 case 'TrackVal' |
wolffd@0 | 61 a.track.val = val; |
wolffd@0 | 62 case 'TrackPrecisePos' |
wolffd@0 | 63 a.track.precisepos = val; |
wolffd@0 | 64 case 'TrackPreciseVal' |
wolffd@0 | 65 a.track.preciseval = val; |
wolffd@0 | 66 case 'InterChunk' |
wolffd@0 | 67 a.interchunk = val; |
wolffd@0 | 68 case 'TmpIdx' |
wolffd@0 | 69 a.tmpidx = val; |
wolffd@0 | 70 case 'AcrossChunks' |
wolffd@0 | 71 a.acrosschunks = val; |
wolffd@0 | 72 case 'Interpolable' |
wolffd@0 | 73 a.interpolable = val; |
wolffd@0 | 74 case 'TmpFile' |
wolffd@0 | 75 a.tmpfile = val; |
wolffd@0 | 76 case 'Index' |
wolffd@0 | 77 a.index = val; |
wolffd@0 | 78 otherwise |
wolffd@0 | 79 error(['Unknown MIRdata property: ' prop]) |
wolffd@0 | 80 end |
wolffd@0 | 81 end |