annotate aim-mat/tools/moviescript.m @ 4:537f939baef0 tip

various bug fixes and changed copyright message
author Stefan Bleeck <bleeck@gmail.com>
date Tue, 16 Aug 2011 14:37:17 +0100
parents 20ada0af3d7d
children
rev   line source
tomwalters@0 1 % tool
tomwalters@0 2 %
tomwalters@0 3 % INPUT VALUES:
tomwalters@0 4 %
tomwalters@0 5 % RETURN VALUE:
tomwalters@0 6 %
tomwalters@0 7 %
bleeck@3 8 % This external file is included as part of the 'aim-mat' distribution package
bleeck@3 9 % (c) 2011, University of Southampton
bleeck@3 10 % Maintained by Stefan Bleeck (bleeck@gmail.com)
bleeck@3 11 % download of current version is on the soundsoftware site:
bleeck@3 12 % http://code.soundsoftware.ac.uk/projects/aimmat
bleeck@3 13 % documentation and everything is on http://www.acousticscale.org
tomwalters@0 14
tomwalters@0 15
tomwalters@0 16 function moviescript()
tomwalters@0 17 % makes movies for all sound files in this directory
tomwalters@0 18
tomwalters@0 19 modelfile='aim.spf';
tomwalters@0 20 framespersecond='12';
tomwalters@0 21 graphicstyle='log';
tomwalters@0 22 graphictype='sumonly';
tomwalters@0 23 sound_sample_rate='20000';
tomwalters@0 24 sound_endian='l';
tomwalters@0 25 minimum_time_interval='2.0';
tomwalters@0 26 % input_scale='default'; % that makes problems!!
tomwalters@0 27 input_scale='1.0';
tomwalters@0 28 output_normalization='1.0';
tomwalters@0 29
tomwalters@0 30 dircont=dir;
tomwalters@0 31 nr_files=size(dircont);
tomwalters@0 32
tomwalters@0 33 fileid=fopen('movie_log.txt','w');
tomwalters@0 34
tomwalters@0 35 for i=1:nr_files
tomwalters@0 36 fullname=dircont(i).name;
tomwalters@0 37 [path,name,ext,versn] = fileparts(fullname);
tomwalters@0 38
tomwalters@0 39
tomwalters@0 40 if strcmp(ext,'') & exist(fullname)~=7 % not directorys
tomwalters@0 41 fprintf('\n\nMaking Movie from soundfile %s\n',fullname);
tomwalters@0 42
tomwalters@0 43 outname=sprintf('%s.mov',fullname);
tomwalters@0 44 dostring=sprintf('makemovie(''modelfile'',''%s'',''soundfile'',''%s'',''outfile'',''%s'',''framespersecond'',''%s'',''graphicstyle'',''%s'',''graphictype'',''%s'',''sound_sample_rate'',''%s'',''sound_endian'',''%s'',''minimum_time_interval'',''%s'',''input_scale'',''%s'',''output_normalization'',''%s'')',...
tomwalters@0 45 modelfile,fullname,outname,framespersecond,graphicstyle,graphictype,sound_sample_rate,...
tomwalters@0 46 sound_endian,minimum_time_interval,input_scale,output_normalization);
tomwalters@0 47
tomwalters@0 48 fprintf('%s\n',dostring);
tomwalters@0 49 fprintf(fileid,'%s\n',dostring);
tomwalters@0 50 eval(dostring);
tomwalters@0 51
tomwalters@0 52 end
tomwalters@0 53 end
tomwalters@0 54
tomwalters@0 55 fclose(fileid);