Feedback not working correctly--Always incorrect or just not working at all

Hello and thanks for any help!

I’ve created a feedback routine for a listening task where participants can see a name on the screen and hear an audio clip, and will press the ‘1’ key to indicate that the voice matches the name, and ‘0’ to indicate the voice and name do not match. It’s fairly simple feedback, so I’m unsure where I’m going wrong. I’ve looked through many of the other forums about similar issues, and tried moving the code from ‘begin routine’ to ‘end routine,’ and have tried switching between saving only one key responses and saving all key responses, and I’m continuing to have the same issue.

When it was set to ‘begin routine’, it always responded ‘incorrect.’ Now, it’s set to ‘end routine,’ and it displays the error message that I initialized in ‘begin experiment’ for the first trial, and ‘incorrect’ for every trial after. There’s also a strange problem now where during the second trial, the audio does not play.

I have no coding experience outside of R, so I’m not sure how to fix this. I would appreciate any help you can give!!

image_2024-03-17_200246753
image_2024-03-17_200325832

(I’m only allowed to upload two images, but I’ll try to upload the rest in a reply?)

image_2024-03-17_200426182

Where is your code component? For End Routine to work it should be at the top of Training1

My code component is currently at the top of my feedback routine. I’ll adjust this as soon as I get home and let you know if it fixed everything. Thanks!

I moved the code block to the top of training1, but it’s still having the issue where every feedback is ‘incorrect.’ There is also still the weird issue of every other audio completely cutting out.

I was able to resolve the issue by replacing ‘1’ and ‘0’ with ‘y’ and ‘n.’ I think the problem was that the excel file had indicated them as numeric, and for some reason the string() function in python wasn’t resolving this. The problem where the audio is cutting out for some trials is still persisting however.

Actually I was able to resolve this issue by changing the start time to ‘condition’ instead of time.