Home > fcn > DIVA_GUI_toolbox > produceMovie.m

produceMovie

PURPOSE ^

SYNOPSIS ^

function produceMovie(y,fs,motor,name)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function produceMovie(y,fs,motor,name)
0002   h=figure('position',[50 50 640 480],'menubar','none','doublebuffer','on');
0003   wh=waitbar(0,sprintf('%d%% complete',0),'position',[50 700 300 70]);
0004   figure(h);
0005   if(~exist(fullfile('RESULTS','movies',['Session_',DIVA('SessionName')])))
0006     mkdir(fullfile('RESULTS','movies',['Session_',DIVA('SessionName')]));
0007   end
0008   pname = fullfile('RESULTS','movies',['Session_',DIVA('SessionName')]);
0009   if(nargin==4)
0010     fname=[name,'.mov'];
0011   else
0012     fname = 'lastheard.mov';
0013   end
0014   if(~isempty(fname))
0015     MakeQTMovie('start',[pname,filesep,fname]);
0016     MakeQTMovie('size',[640 480]);
0017     MakeQTMovie('quality',0.8);
0018     for n=1:5:length(motor),
0019       figure(h);
0020       DIVA('VocalTract','plot',motor(:,n)); axis equal; axis off;
0021       MakeQTMovie('addaxes');
0022       waitbar(n/length(motor),wh,sprintf('%d%% complete',round(100*n/length(motor))));
0023     end
0024     MakeQTMovie('frameRate',200);
0025     MakeQTMovie('addsound',y,fs);
0026     MakeQTMovie('finish');
0027   end
0028   close(h);
0029   close(wh);
0030 
0031   %web(['file:///',pwd,filesep,pname,filesep,fname],'-browser');
0032   %web(['file:///',pwd,filesep,'RESULTS',filesep,'movies',filesep,fname],'-browser');

Generated on Tue 27-Mar-2007 12:06:24 by m2html © 2003