Getting response time with audio stimulus using psychtoolbox

I am designing an EMG experiment in which we have a series of stimuli/ tasks that we would like to record participants’ movements, such as repeating words. I am wondering rather than using a keyboard or mouse to use as input responses, is it possible to record the audio as responses (for the reaction time) if we sycn a mic? Could you give me some directions/suggestions?

BasicSoundInputDemo.m would be a starting point for that. Recording audio, finding voice onset via simple thresholding, using the audio drivers timestamping to translate that into actual voice response time, and also recording the response into a vector. Ofc. one could use more clever analysis than simple thresholding. But a standard microphone connected to a standard sound chip will probably be good enough for about millisecond accurate timestamping of recorded sound.

It does not seem to get what I want at the moment. I have tried the BasicSoundInputDemo.m and just called the function with something like BasicSoundInputDemo(’(low)1.wav’, 1). The program is running infinitely it seems and the plots popped up but it is neither playing the audio or saving it? Did I miss something?

I just set it BasicSoundInputDemo(’(low)1.wav’, 0). I have the participant recorded but the audio is not playing…Do I have to load the audio myself?

the audio data has maximum value 1, use a trigger less than 1, like .5 or whatever works for the gain of your microphone

Thanks, is it possbile to have the stimulus(audio) running and record and at the same time write it to the .xls or csv to identify which stimulus it is? I know it’s possbile for keyboard or mouse stimulus but I am not too sure how to “mark” that event here for my stimulus, such as reading a word, open the mouth…

Its the trigger bit from that demo that you want to use. So yeah, its possible, you’ll just have to program it yourself.

I guess you need to explain your paradigm in more detail, also the operating system and sound hardware you are about to use etc.

It can record in the background, playback in the background, or do recording and playback (full-duplex) at the same time, also in the background if needed. They way full-duplex is handled is dependent on the operating system and sound hardware capabilities, and time stamping also depends on that. It all depends on your paradigm and your setup on how to do this optimally. There are various BasicXXXXXDemo.m demos for various XXXXX tasks related to audio.