Mercurial > hg > simscene-py
comparison simScene.m @ 24:2abd1116ae14
add automatic background generation
author | Gregoire Lafay <gregoire.lafay@irccyn.ec-nantes.fr> |
---|---|
date | Fri, 15 Jan 2016 17:19:09 +0100 |
parents | 8d33767e070a |
children | 8ce78cacb5cb |
comparison
equal
deleted
inserted
replaced
23:0163f857f13f | 24:2abd1116ae14 |
---|---|
159 % | 159 % |
160 % Uses Mark Paskin's process_options.m from KPMtools | 160 % Uses Mark Paskin's process_options.m from KPMtools |
161 | 161 |
162 addpath(genpath('nonExposed')); | 162 addpath(genpath('nonExposed')); |
163 | 163 |
164 [timeMode,ebrMode,instanceAnnotFile,instanceAudioFile,figuresOption,sampleChoice,outputFileName,minSpace,endCut,eventInfoPath,norm,channelsOption]=process_options(varargin,'timeMode','generate','ebrMode','generate','instanceAnnotFile','none','instanceAudioFile','none','figure',0,'sampleChoice','random','outputFileName','simulatedScene','minSpace',-1,'endCut',0,'eventInfoPath','','norm',.75,'channel',0); | 164 [timeMode,ebrMode,instanceAnnotFile,instanceAudioFile,figuresOption,sampleChoice,outputFileName,minSpace,endCut,eventInfoPath,norm,channelsOption,noiseLevel,noiseFiltMaxFreq,noiseFiltOrder]=process_options(varargin,'timeMode','generate','ebrMode','generate','instanceAnnotFile','none','instanceAudioFile','none','figure',0,'sampleChoice','random','outputFileName','simulatedScene','minSpace',-1,'endCut',0,'eventInfoPath','','norm',.75,'channel',0,'noiseLevel',-24,'noiseFiltMaxFreq',0,'noiseFiltOrder',12); |
165 | 165 |
166 sr=44100; | 166 sr=44100; |
167 | 167 |
168 check_options(timeMode,ebrMode,score) | 168 check_options(timeMode,ebrMode,score) |
169 | 169 |
188 load(eventInfoPath); | 188 load(eventInfoPath); |
189 else | 189 else |
190 eventInfo(1).query='null'; | 190 eventInfo(1).query='null'; |
191 end | 191 end |
192 | 192 |
193 [sceneSchedule,sceneObjects]=getBackground(inputPath,score,eventInfo,sr); | 193 [sceneSchedule,sceneObjects,score]=getBackground(inputPath,score,eventInfo,sr,noiseLevel,noiseFiltMaxFreq,noiseFiltOrder); |
194 [sceneSchedule,sceneObjects]=getEvent(sceneSchedule,sceneObjects,inputPath,score,timeMode,ebrMode,sampleChoice,eventInfo,sr); | 194 [sceneSchedule,sceneObjects]=getEvent(sceneSchedule,sceneObjects,inputPath,score,timeMode,ebrMode,sampleChoice,eventInfo,sr); |
195 | 195 |
196 %% Manage overlapping | 196 %% Manage overlapping |
197 if minSpace>=0 | 197 if minSpace>=0 |
198 [sceneSchedule] = manageOverlapping(sceneSchedule,minSpace); | 198 [sceneSchedule] = manageOverlapping(sceneSchedule,minSpace); |