Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Stone committed Nov 3, 2021
2 parents 5d78555 + d4ba30f commit 13d83bc
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions stimuli/pair_comparison_interface.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
## pairs, the indexes of the pairs (1 to num of pairs), the index
## of the pair currently tested, the data to save in the csv file

testMode = true;
testMode = false;

if testMode
## To test the interface with a minimal number of stimuli
Expand Down Expand Up @@ -214,13 +214,13 @@ function rateSon1MostNatural(hObject, eventdata)
set(hObject, "backgroundcolor", [0/255 85/255 212/255], "fontweight", "bold");
set(st.hSon2MostNatural, "backgroundcolor", [1 1 1], "fontweight", "normal");

## go to next pair
st.currTrainingPair;
if st.currTrainingPair < 3
nextPairTraining(hObject, eventdata);
else
nextPair(hObject, eventdata);
end
## ## go to next pair
## st.currTrainingPair;
## if st.currTrainingPair < 3
## nextPairTraining(hObject, eventdata);
## else
## nextPair(hObject, eventdata);
## end
end

# # # # # # # # # # # # # # # # # # # # # # # #
Expand All @@ -240,13 +240,13 @@ function rateSon2MostNatural(hObject, eventdata)
set(hObject, "backgroundcolor", [0/255 85/255 212/255], "fontweight", "bold");
set(st.hSon1MostNatural, "backgroundcolor", [1 1 1], "fontweight", "normal");

## go to next pair
st.currTrainingPair;
if st.currTrainingPair < 3
nextPairTraining(hObject, eventdata);
else
nextPair(hObject, eventdata);
end
## ## go to next pair
## st.currTrainingPair;
## if st.currTrainingPair < 3
## nextPairTraining(hObject, eventdata);
## else
## nextPair(hObject, eventdata);
## end
end

# # # # # # # # # # # # # # # # # # # # # # # #
Expand Down Expand Up @@ -342,9 +342,9 @@ function nextPairTraining(hObject, eventdata)

guidata(hObject, dataStruct);

## play sounds
playSound1 (hObject, eventdata);
playSound2 (hObject, eventdata);
## ## play sounds
## playSound1 (hObject, eventdata);
## playSound2 (hObject, eventdata);

## reset selected buttons highlight
set(dataStruct.hSon2MostNatural, "backgroundcolor", [1 1 1], "fontweight", "normal");
Expand All @@ -370,9 +370,9 @@ function nextPairTraining(hObject, eventdata)
set(dataStruct.next, "callback", @nextPair);
guidata(hObject, dataStruct);

## play sounds
playSound1 (hObject, eventdata);
playSound2 (hObject, eventdata);
## ## play sounds
## playSound1 (hObject, eventdata);
## playSound2 (hObject, eventdata);

## reset selected buttons highlight
set(dataStruct.hSon2MostNatural, "backgroundcolor", [1 1 1], "fontweight", "normal");
Expand Down Expand Up @@ -494,9 +494,9 @@ function nextPair (hObject, eventdata)
dataStruct.pairTested, dataStruct.nPairs));
guidata(hObject, dataStruct);

## play sounds
playSound1 (hObject, eventdata);
playSound2 (hObject, eventdata);
## ## play sounds
## playSound1 (hObject, eventdata);
## playSound2 (hObject, eventdata);

else

Expand Down Expand Up @@ -649,7 +649,7 @@ function nextPair (hObject, eventdata)
dataStruct.next = uicontrol (h, "string", "Paire suivante", ...
"units","normalized","position",[0.65 0.18 0.25 0.08],...
"callback", @nextPairTraining, "fontunits","normalized","fontsize", normFtSize,...
"visible", "off");
"visible", "on");


guidata(h, dataStruct);
Expand Down

0 comments on commit 13d83bc

Please sign in to comment.