Commit dda94227 authored by Saskia Wepner's avatar Saskia Wepner

removed hard-coded file paths and names. added some comments and made some...

removed hard-coded file paths and names. added some comments and made some minor improvements. should be continued one day.
parent f68fb707
......@@ -13,6 +13,14 @@ function ita_listeningtest_JND(soundPath, soundPathTrain, fileType)
% ita_write(morseNumbers(iNumber), fullfile(soundPath, sprintf('Morse Code Number %i.ita', rem(iNumber, 10))));
% end
% Usage:
% ita_listeningtest_JND(soundPath, soundPathTrain, fileType)
% soundPath is the path with your sound files are of file type fileType
% soundPathTrain is the path containing your training files
% BE AWARE that files will be taken pair wise; means that always two
% subsequent files will be taken as a couple that is compared during the
% experiment.
%%
%%% INITIALIZATION OF GUI INPUT DATA
br = newline;
......@@ -249,19 +257,25 @@ switch gData.nextPhase
end
close(wbh)
% show text
set( gData.h.text , 'string', gData.ltData.compareQuestion)
% show buttons and disable them
set([gData.h.buttonA gData.h.buttonB gData.h.text ] , 'visible', 'on');
set([gData.h.buttonA gData.h.buttonB] , 'enable', 'off');
% % play A
% currSounds(1).play
% % pause
% pause(gData.ltData.pauseBetween)
% % play B
% currSounds(2).play
% set colour of currently played sound to green
set(gData.h.buttonA, 'BackgroundColor', 'g');
% play stimulus
ita_portaudio_run(currSounds(1), 'OutputChannels', 1:2, 'Block')
ita_portaudio_run(currSounds(2), 'OutputChannels', 1:2, 'Block')
% reset colour again
set(gData.h.buttonA, 'BackgroundColor', [0.94 0.94 0.94]);
set([gData.h.buttonA gData.h.buttonB gData.h.text ] , 'visible', 'on');
set( gData.h.text , 'string', gData.ltData.compareQuestion)
% ... and the same for the second stimulus / button
set(gData.h.buttonB, 'BackgroundColor', 'g');
ita_portaudio_run(currSounds(2), 'OutputChannels', 1:2, 'Block')
set(gData.h.buttonB, 'BackgroundColor', [0.94 0.94 0.94]);
% enable both buttons
set([gData.h.buttonA gData.h.buttonB] , 'enable', 'on');
gData.currentSet = gData.currentSet + 1;
end
......@@ -337,19 +351,22 @@ switch gData.nextPhase
close(wbh)
% % play A
% currSounds(1).play
% % pause
% pause(gData.ltData.pauseBetween)
% % play B
% currSounds(2).play
set( gData.h.text , 'string', gData.ltData.compareQuestion)
set([gData.h.buttonA gData.h.buttonB gData.h.text ] , 'visible', 'on');
set([gData.h.buttonA gData.h.buttonB] , 'enable', 'off');
% first stimulus
set(gData.h.buttonA, 'BackgroundColor', 'g');
ita_portaudio_run(currSounds(1), 'OutputChannels', 1:2, 'Block')
ita_portaudio_run(currSounds(2), 'OutputChannels', 1:2, 'Block')
set(gData.h.buttonA, 'BackgroundColor', [0.94 0.94 0.94]);
% second stimulus
set(gData.h.buttonB, 'BackgroundColor', 'g');
ita_portaudio_run(currSounds(2), 'OutputChannels', 1:2, 'Block')
set(gData.h.buttonB, 'BackgroundColor', [0.94 0.94 0.94]);
set([gData.h.buttonA gData.h.buttonB gData.h.text ] , 'visible', 'on');
set( gData.h.text , 'string', gData.ltData.compareQuestion)
% enable both buttons
set([gData.h.buttonA gData.h.buttonB] , 'enable', 'on');
gData.currentSet = gData.currentSet + 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment