Post by drjonathankim on Apr 21, 2021 12:07:49 GMT
Hi all,
I wanted to make an experiment to show the use of sound in combination with an existing experiment, with a bitmap and a sound presented simultaneously, but I found that, after coding, every so often a sound doesn't play when it should. Is there something wrong with my code (which I provide underneath), is this possibly something with my computer, or is this currently an issue with sound in PsyToolkit? The experiment I'm playing around with here is a version of the IAT using bitmaps, but without informing the participant of whether their responses were correct.
I wanted to make an experiment to show the use of sound in combination with an existing experiment, with a bitmap and a sound presented simultaneously, but I found that, after coding, every so often a sound doesn't play when it should. Is there something wrong with my code (which I provide underneath), is this possibly something with my computer, or is this currently an issue with sound in PsyToolkit? The experiment I'm playing around with here is a version of the IAT using bitmaps, but without informing the participant of whether their responses were correct.
bitmaps
Instructions
BlockReady
Finish
Fixation
MFGeir
MFRobert
MFEspen
MFIda
MFSandra
MFNina
FMGeir
FMRobert
FMEspen
FMIda
FMSandra
FMNina
ACIndividualistic
ACCompetitive
ACIndependent
ACChallenging
ACSelfSufficient
ACAutonomous
ACCommunal
ACConnected
ACCommitment
ACTogether
ACKinship
ACSupportive
mixedGeir
mixedRobert
mixedEspen
mixedIda
mixedSandra
mixedNina
mixedIndividualistic
mixedCompetitive
mixedIndependent
mixedChallenging
mixedSelfSufficient
mixedAutonomous
mixedCommunal
mixedConnected
mixedCommitment
mixedTogether
mixedKinship
mixedSupportive
mixedreversedGeir
mixedreversedRobert
mixedreversedEspen
mixedreversedIda
mixedreversedSandra
mixedreversedNina
mixedreversedIndividualistic
mixedreversedCompetitive
mixedreversedIndependent
mixedreversedChallenging
mixedreversedSelfSufficient
mixedreversedAutonomous
mixedreversedCommunal
mixedreversedConnected
mixedreversedCommitment
mixedreversedTogether
mixedreversedKinship
mixedreversedSupportive
sounds
beep Beep.mp3
boop Boop.mp3
table MF
MFGeir beep "MF Left Name Male Geir" 1 2
MFRobert beep "MF Left Name Male Robert" 1 2
"MF Left Name Male Espen" MFEspen beep 1 2
"MF Right Name Female Ida" MFIda boop 2 1
"MF Right Name Female Sandra" MFSandra boop 2 1
"MF Right Name Female Nina" MFNina boop 2 1
table FM
"FM Right Name Male Geir" FMGeir boop 2 1
"FM Right Name Male Robert" FMRobert boop 2 1
"FM Right Name Male Espen" FMEspen boop 2 1
"FM Left Name Female Ida" FMIda beep 1 2
"FM Left Name Female Sandra" FMSandra beep 1 2
"FM Left Name Female Nina" FMNina beep 1 2
table AC
"AC Left Attr Agen Individualistic" ACIndividualistic beep 1 1
"AC Left Attr Agen Competitive" ACCompetitive beep 1 1
"AC Left Attr Agen Independent" ACIndependent beep 1 1
"AC Left Attr Agen Challenging" ACChallenging beep 1 1
"AC Left Attr Agen SelfSufficient" ACSelfSufficient beep 1 1
"AC Left Attr Agen Autonomous" ACAutonomous beep 1 1
"AC Right Attr Comm Communal" ACCommunal boop 2 2
"AC Right Attr Comm Connected" ACConnected boop 2 2
"AC Right Attr Comm Commitment" ACCommitment boop 2 2
"AC Right Attr Comm Together" ACTogether boop 2 2
"AC Right Attr Comm Kinship" ACKinship boop 2 2
"AC Right Attr Comm Supportive" ACSupportive boop 2 2
table mixed
"mixed Left Name Male Geir" mixedGeir beep 1 2
"mixed Left Name Male Robert" mixedRobert beep 1 2
"mixed Left Name Male Espen" mixedEspen beep 1 2
"mixed Right Name Female Ida" mixedIda boop 2 1
"mixed Right Name Female Sandra" mixedSandra boop 2 1
"mixed Right Name Female Nina" mixedNina boop 2 1
"mixed Left Attr Agen Individualistic" mixedIndividualistic beep 1 1
"mixed Left Attr Agen Competitive" mixedCompetitive beep 1 1
"mixed Left Attr Agen Independent" mixedIndependent beep 1 1
"mixed Left Attr Agen Challenging" mixedChallenging beep 1 1
"mixed Left Attr Agen SelfSufficient" mixedSelfSufficient beep 1 1
"mixed Left Attr Agen Autonomous" mixedAutonomous beep 1 1
"mixed Right Attr Comm Communal" mixedCommunal boop 2 2
"mixed Right Attr Comm Connected" mixedConnected boop 2 2
"mixed Right Attr Comm Commitment" mixedCommitment boop 2 2
"mixed Right Attr Comm Together" mixedTogether boop 2 2
"mixed Right Attr Comm Kinship" mixedKinship boop 2 2
"mixed Right Attr Comm Supportive" mixedSupportive boop 2 2
table mixedreversed
"mixedreversed Right Name Male Geir" mixedreversedGeir boop 2 1
"mixedreversed Right Name Male Robert" mixedreversedRobert boop 2 1
"mixedreversed Right Name Male Espen" mixedreversedEspen boop 2 1
"mixedreversed Left Name Female Ida" mixedreversedIda beep 1 2
"mixedreversed Left Name Female Sandra" mixedreversedSandra beep 1 2
"mixedreversed Left Name Female Nina" mixedreversedNina beep 1 2
"mixedreversed Left Attr Agen Individualistic" mixedreversedIndividualistic beep 1 1
"mixedreversed Left Attr Agen Competitive" mixedreversedCompetitive beep 1 1
"mixedreversed Left Attr Agen Independent" mixedreversedIndependent beep 1 1
"mixedreversed Left Attr Agen Challenging" mixedreversedChallenging beep 1 1
"mixedreversed Left Attr Agen SelfSufficient" mixedreversedSelfSufficient beep 1 1
"mixedreversed Left Attr Agen Autonomous" mixedreversedAutonomous beep 1 1
"mixedreversed Right Attr Comm Communal" mixedreversedCommunal boop 2 2
"mixedreversed Right Attr Comm Connected" mixedreversedConnected boop 2 2
"mixedreversed Right Attr Comm Commitment" mixedreversedCommitment boop 2 2
"mixedreversed Right Attr Comm Together" mixedreversedTogether boop 2 2
"mixedreversed Right Attr Comm Kinship" mixedreversedKinship boop 2 2
"mixedreversed Right Attr Comm Supportive" mixedreversedSupportive boop 2 2
task MF
keys e i
table MF
show bitmap Fixation
delay 200
clear 1
show bitmap @2 @4 0
sound @3
readkey @5 5000
clear 2
clear 3
delay 500
save @1 STATUS RT BLOCKNAME
task FM
keys e i
table FM
show bitmap Fixation
delay 200
clear 1
show bitmap @2 @4 0
sound @3
readkey @5 5000
clear 2
clear 3
delay 500
save @1 STATUS RT BLOCKNAME
task AC
table AC
keys e i
show bitmap Fixation
delay 200
clear 1
show bitmap @2 @4 0
sound @3
readkey @5 5000
clear 2
clear 3
delay 500
save @1 STATUS RT BLOCKNAME
task mixed
keys e i
table mixed
show bitmap Fixation
delay 200
clear 1
show bitmap @2 @4 0
sound @3
readkey @5 5000
clear 2
clear 3
delay 500
save @1 STATUS RT BLOCKNAME
task mixedreversed
keys e i
table mixedreversed
show bitmap Fixation
delay 200
clear 1
show bitmap @2 @4 0
sound @3
readkey @5 5000
clear 2
clear 3
delay 500
save @1 STATUS RT BLOCKNAME
block Instructions
message Instructions
block MF
set &order 1 ## order 1 means: male=left,female=right
tasklist
MF 6 all_before_repeat
end
block AC
message BlockReady
tasklist
AC 12 all_before_repeat
end
block mixed
message BlockReady
set &order 1 ## order 1 means: male=left,female=right
tasklist
mixed 18 all_before_repeat
end
block FM
message BlockReady
set &order 2 ## order 2 means: male=right,female=left
tasklist
FM 6 all_before_repeat
end
block mixedreverse
message BlockReady
set &order 2 ## order 2 means: male=right,female=left
tasklist
mixed 18 all_before_repeat
end
block Finish
message Finish
blockorder
Instructions
MF
AC
mixed
FM
mixedreverse
Finish
blockorder
Instructions
FM
AC
mixedreverse
MF
mixed
Finish