mathieu@14: % SimScene is a set of Matlab functions dedicated to the simulation of acoustic scenes. mathieu@14: % This tool is specifically tailored to the evaluation of machine listening systems. mathieu@14: % Thus, extensive and precise annotation of the scene content is provided together with the simulated scene. mathieu@14: % mathieu@14: % This tool is a research tool, provided as-is with the hope that it will be mathieu@14: % useful and easy to adapt to the needs of others. Do not hesitate to provide mathieu@14: % us with feedback at the following mail address: mathieu.lagrange@cnrs.fr mathieu@14: % mathieu@14: % SimScene have been tested on Matlab R2013b. The input audio files must be sampled at 44100 Hz. mathieu@14: mathieu@14: % clear all; mathieu@14: % close all; mathieu@14: mathieu@14: inputPath='./sound/'; mathieu@14: outputPath='./results/'; mathieu@14: mathieu@14: %% timeMode: 'generate' -- ebrMode: 'generate' mathieu@14: mathieu@14: timeMode='generate'; mathieu@14: ebrMode='generate'; mathieu@14: sceneDuration=15; mathieu@14: mathieu@14: score.sceneDuration=sceneDuration; gregoirelafay@25: score.backgrounds={{'forest','forest', 1}}; mathieu@14: score.events={{'alouette','alouette', 12, 0, 2, 0.1, 1, 10, 0, 0},... mathieu@14: {'bulbul' ,'bulbul' , 6 , 0, 2, 0, 3, 13, 0, 0},... mathieu@14: {'geai' ,'geai' , 6 , 0, 1, 0.25, 5, 10, 0, 0}}; mathieu@14: mathieu@14: sceneId = ['demo_forest_timeMode_' timeMode '_ebrMode_' ebrMode]; mathieu@14: disp(sceneId); mathieu@14: mathieu@14: simScene(inputPath,outputPath,score,... gregoirelafay@25: 'timeMode',timeMode,'ebrMode',ebrMode,'outputFileName',sceneId); mathieu@14: mathieu@14: %% timeMode: 'replicate' -- ebrMode: 'replicate' mathieu@14: gregoirelafay@17: % instanceAnnotFile='./scene2Replicate/forest.txt'; gregoirelafay@17: % instanceAudioFile='./scene2Replicate/forest.wav'; gregoirelafay@17: % gregoirelafay@17: % timeMode='replicate'; gregoirelafay@17: % ebrMode='replicate'; gregoirelafay@17: % sceneId = ['demo_forest_timeMode_' timeMode '_ebrMode_' ebrMode]; gregoirelafay@17: % disp(sceneId); gregoirelafay@17: % gregoirelafay@17: % score.backgrounds={{'forest','forest', 1}}; gregoirelafay@17: % gregoirelafay@17: % score.events={{'alouette','', -3, 0, 0, 0, 0, 0, 0, 0},... % Only change gregoirelafay@17: % {'bulbul','', 3, 0, 0, 0, 6, 0, 0, 0}}; % Change and gregoirelafay@17: % gregoirelafay@17: % % If score.event is of length 1 and