[solved] response time timing
Hello,
Love open sesame, super easy to use. Having a little trouble though.
I'm trying to program a response time task to an audio beep. What I want to have is a series of beeps times 1200ms apart (with 300ms jitter), where Ps press the Space bar as quickly as possible when they hear the tone. I need that timing I've chosen to remain consistent. Here's my setup
-Loop
-Sequence
-Advanced Delay
-Synth
-Keyboard Response
-Logger
In my loop I have it set to cycle as many times as the study calls for. My synth is 100ms in duration, my advanced delay is set to 1200ms with 300ms jitter. my keyboard response is set so SPACE is an allowed response. Here's my problem:
-If i have the timeout on the keyboard response left blank or set to infinite, when I run the experiment, the computer will wait until I press SPACE, then start the next advanced delay, which screws up the timing.
- If I have the timeout set to 0, the beeps follow the timing perfectly, but no data is recorded. In my data set under response time, it just reads NA over and over.
I could set the timeout to something like 900ms and then subtract that out of the advanced delay, but then the audio beeps are going to be spaced out different for all my participants. Basically I want the beeps to be performing like the timeout is set to 0 (and all the beeps are set about 1200ms apart) but to be recording the data.
Is there a way to do this? Or a setup I can use that will work better for this?
Look forward to getting a response.
Comments
Here's a screen cap of the setup
![image](http://img.cogsci.nl/uploads/534d69cc2599b.jpg)
Hi,
You're close. What I would do is define the interval+jitter already in audio_loop. To do this, you can make use of the fact that you can define your variables using Python, by prepending an
=
sign, like so:See also:
Then you can set the timeout of your
keyboard_response
to[interval]
. Next, directly after thekeyboard_response
, you use a simpleinline_script
to pad the time that remains after the participant has responded:Does that make sense?
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
OK I've tried that, I have created the variable 'interval' and set it to =900+randint(0,600). i set the timeout on my keyboard response to that, but what do I put as the interval in the advanced delay? When I set it to 'interval' my beeps sound much further apart, almost twice as far apart as they should.
I did a quick run and I've noticed that it still lists response times when I don't respond. Under response it will say none, but it will have a reaction time listed.
OK I got it working, I had forgotten to include spaces in the inline script (I'm such a n00b). You guys are so helpful!
![image](http://img.cogsci.nl/uploads/534e54f109ab8.jpg)
I'm still have the issue in the data though. I've included a screen shot of my data table. Where the response is listed as "none" should I assume the RT listed is the timeout?
Right, just to clarify. You are now using the
keyboard_response
plusinline_script
to do all the sleeping. So you don't need theadvanced_delay
anymore and you can remove it from your trial sequence. Does that solve the issue?Check out SigmundAI.eu for our OpenSesame AI assistant!
That seems to have done the trick! thank you!
Hello!
I am trying to achieve something similar as the original query. My participants will pay attention to a word loop, but also click the spacebar whenever they hear a click sound. However, my click sounds are randomly distributed throughout my word loop with no defined interval between them (there just is a specific number of them). I am not entirely sure how to tackle this issue with the solution above. Here is my full code so far: https://pastebin.com/PTyKaQzM
I would like it so that each word in the word loop is shown for 240ms (as I have set in the sketchpad duration).
In my inline script for the keyboard, if I set the timeout to 0 it does not record response times at all (NAs throughout). When I set it to 450ms (like it is now) it slows down the duration between words in the word loop, but records the RTs. Ideally, I would like to set the keyboard timeout to 1000ms without affecting the 240ms duration of the words displayed. That is, we will not analyse any response that takes more than 1000ms. Is this possible?
The current set up:
![](http://forum.cogsci.nl/uploads/editor/oo/j1kk2ozfvm5g.png)
Thanks for your time![:) :)](https://forum.cogsci.nl/plugins/emojiextender/emoji/twitter/smile.png)
Hi,
For some reason, your pasted code doesn't load into Opensesame. Can you also share the experiment? Anyway, I wrote a little script that should do what you are looking for. You just have to adapt it to your needs.
Eduard
Btw. Which version of Opensesame are you using? From your screenshot it appears to me that it isn't the latest one.
Hi, I've an issue with a task I don't know if you've already encontered the problem...
I perform a time-to-contact task.
participants hear a sound coming towards them and press "space" when they feel the sound is close.
then, if the participant has responded in time (if response time = sound time), a green cross appears; if it's too late, a red cross; and if it's too early, a blue cross.
However, I can't create conditional feedback linking response time to audio file presentation time.
Hi,
However, I can't create conditional feedback linking response time to audio file presentation time.
What have you tried? Please provide some context, share your experiment, explain your implementation, etc. Otherwise you are essentially asking us to build this experiment for you. If you have a rough sketch of the experiment we can try to help tweak it until the result is satisfactory.
Eduard
sorry I forgot to upload the images ...
here are the instructions of the task : the participant is watching a white cross and hearing a sound coming towards him.
then, when the participant "feels" the sound near him he push 'space'.
after that, there is a feedback :
1- if the participant respond on time : the feedback is a green cross
2- if the participant respond too early : the feedback is a blue cross
3- if the participant respond too late : the feedback is a red cross
my problem is that I don't know how to create this conditional feedback because there is always example with correct = 0 or 1 but not with 3 possibilities and not relative to the time response
hope that is better explained...
For that you need to do Python coding inside an
inline_script
.You need to define your own "correct" response, or rather response categorization. Importantly, you need to do this after the response in the run phase of the inline_script. For example:
Then you can put as
run_if`
statement in the feedback items:`[resp_category] == 'too_early'` or one of the other cases, respectively.
Please note, this example won't work right away. I don't fully understand how you implemented the logic of stimulus presentation and response collection. Assuming that this part works and you have a "proper" response_time, the above code is good enough, I guess. But given your design description, I can imagine the response collection part, also being somewhat intricate.
Hope this helps,
Eduard