view listeningTest/reportTest.m @ 4:b28ffd29e6e1

Audio file preparation for listening test
author Brecht De Man <b.deman@qmul.ac.uk>
date Wed, 19 Nov 2014 18:59:51 +0000
parents 5e72201496c8
children
line wrap: on
line source
function fid=reportTest(sesDat,rsl,typeTst)
% write report

fidInd=['responses/' sesDat.id,'_',sesDat.sesScript];
if (~sesDat.reREAD && (sesDat.noTst==1)) % if first time, just write
   fid=fopen(fidInd,'w');
else   
   fid=fopen(fidInd,'a');                % if not first time, append
end
eol(fid);

% title
fprintf(fid,'%%%%%%%%%%%% Module #%d : %s \t ID: %s  \t DATE: %s ',sesDat.noTst,typeTst,sesDat.id,date);eol(fid);eol(fid);

% elapsed time
min=floor(rsl.duration/60);
sec=floor(rsl.duration-min*60);
fprintf(fid,'%%%% ELAPSED TIME : %d min %d sec ',min,sec);eol(fid);
fprintf(fid,'Song: %s\n', sesDat.cuSndListFile);