Mercurial > hg > ape
diff listeningTest/pairComp/PCpush.m @ 0:4fd284285159
Adding listening test plus some helpful functions and scripts.
author | Brecht <b.deman@qmul.ac.uk> |
---|---|
date | Thu, 24 Apr 2014 23:53:31 +0100 |
parents | |
children | 5e72201496c8 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/listeningTest/pairComp/PCpush.m Thu Apr 24 23:53:31 2014 +0100 @@ -0,0 +1,27 @@ +function PCpush(hf,but) + +dat=get(hf,'userdata'); +noComb=dat.noComb; +comb=dat.comb; +ha=dat.ha; +hb=dat.hb; +butCol=dat.butCol; + +switch but +case 1 % A + set(ha,'backgroundcolor','r'); + set(hb,'backgroundcolor',butCol); + fidInd=[dat.sesDat.id,'_',dat.sesDat.sesScript]; %print 'A' + fid=fopen(fidInd,'a'); + fprintf(fid,'A'); + playSound(dat.sesDat.cuSndList(comb(noComb,1))); +case 2 % Stop + wavplay(0); +case 3 % B + set(hb,'backgroundcolor','r'); + set(ha,'backgroundcolor',butCol); + fidInd=[dat.sesDat.id,'_',dat.sesDat.sesScript];%print 'B' + fid=fopen(fidInd,'a'); + fprintf(fid,'B'); + playSound(dat.sesDat.cuSndList(comb(noComb,2))); +end \ No newline at end of file