view nonExposed/getBackground.m @ 22:06e845616cae

fix visualization
author gregoire lafay <gregoirelafay@sfr.fr>
date Thu, 14 Jan 2016 21:17:11 +0100
parents 92f73423eb37
children 2abd1116ae14
line wrap: on
line source
function [sceneSchedule,sceneObjects]=getBackground(inputPath,score,eventInfo,sr)

% This program was written by Mathias Rossignol & Grégoire Lafay
% is Copyright (C) 2015 IRCAM <http://www.ircam.fr>
%
% This program is free software: you can redistribute it and/or modify it
% under the terms of the GNU General Public License as published by the Free
% Software Foundation, either version 3 of the License, or (at your option)
% any later version.
%
% This program is distributed in the hope that it will be useful, but
% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
% or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
% for more details.
%
% You should have received a copy of the GNU General Public License along
% with this program.  If not, see <http://www.gnu.org/licenses/>.

for i=1:length(score.backgrounds)
    sceneObjects(i) = getSampleInfo(score.backgrounds{i}{1},score.backgrounds{i}{2},'background',inputPath,score.sceneDuration,eventInfo,sr);
    sceneSchedule(i).classId=i;
    sceneSchedule(i).classLabel=score.backgrounds{i}{2};
    sceneSchedule(i).position=0;
    sceneSchedule(i).instance=1;
    sceneSchedule(i).isBackground = 1;
    sceneSchedule(i).duration = score.sceneDuration;
    if (i==1)
        sceneSchedule(i).ebr=1;
    else
        sceneSchedule(i).ebr= score.backgrounds{i}{3};
    end
end
end