[solved] Using "soundrecording" to control the duration of a sketchpad object
Hi!
I'm writing here after looking at all other posts without finding any answers.
I am doing a number-naming experiment, where I show a number
and participants need to name it into a microphone. I need the number to disappear
as soon as a vocal response started.
Is that at all possible to do using the sound recording plugin?
I tried it and it records sound but does not affect the duration of the sketchpad.
Thank you so much for reading!
Tali

Comments
Hi Tali,
The sound recorder plug-in only records sound, but doesn't allow you to do anything sound-contingent. However, it's quite easy to implement a vocal key with a simple inline script. There quite a few examples floating around on the forum (search for "voicekey"). For example:
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan
Thanks for the response!
I looked at the discussion you sent, and I noticed that there were issues
with how accurate response times are (from the onset of the picture to the first sound participants make). This can be problematic for me, because I use several computers for my experiment.
I apologize, maybe I'm missing something, but these RT problems
are because you also try to record sound? in this case it shouldn't be a problem if I don't want to record any sound.
Is there a way to modify the voice key code so it:
1. Only capture response time without recording
2. Allow participants to respond in more than one sketchpad? (like what the "parallel" plugin is doing?)
Thanks again!
Tali =:)
No, the main source of latency is the sound card/ drivers itself, and this doesn't depend on how you process the sound when it comes in. If you're concerned about the timing, it's best to benchmark your system. For example, you can show a picture and play a sound at the same time, and then use this sound to trigger the voicekey. This way you can get an idea of the temporal variability of the voicekey. Does that make sense?
Yes, there is an example of that at the top of the same discussion ;-)
I'm not sure what you mean exactly. You can simply repeat the voicekey script after several sketchpads, just like you could with a keyboard_response. Or is that not what you have in mind?
Check out SigmundAI.eu for our OpenSesame AI assistant!
Thanks Sebastiaan!
That's a great idea to test my system! I'll do that!
About the multiple responses - I didn't explain myself well.
The experiment goes like this:
-slide 1: picture (300 ms)
-slide 2: Slide saying "how many?" that should disappear once
participants responded.
Is it possible to get a single measure of RT if participants
responded during the first or the second slide?
Maybe not very elegant, but you could always calculate reaction times yourself by taking the time at the beginning of the period to be measured and at the end. Just add an
inline_scriptat the respective position in thesequence, take the time (t0/t1 = self.time) and take the difference as estimate of your reaction time. Does this help?Eduard
Hi Eduard
Yes! Thank you very much!!