How to add audio and image simultaneously for a fixed time #3059
Replies: 2 comments 2 replies
-
Hi ruchirasakalle, I think the psychophysics plugin is only meant for visual stimulus display. The plugin does use the requestAnimationFrame function for controlling stimulus onset times, which gives you the best possible control for visual stimulus presentation duration. My best bet would be to extend the code of that plugin so that it also starts your audio on the first frame of the stimulus, although I can imagine that there could still be some latencies in the onset of the audio so that it will still not be exactly simultaneous. Alternative, have you tried with the audio response plugins from jsPsych (e.g. https://www.jspsych.org/7.3/plugins/audio-button-response/ )? You can include a visual stimulus in the prompt parameter and also gives you sufficient accuracy? |
Beta Was this translation helpful? Give feedback.
-
I used the psychophysics plugin and it worked for me. I can share my code
snipped with you. I basically set the same stimulus onset time. For both
audio and image.
…On Mon, 4 Dec 2023 at 19:55, kassyec ***@***.***> wrote:
I am curious if you ever found a solution to your problem and if you
wouldn't mind sharing what you did - I am currently trying to add image +
audio on the button response plugin with no success.
—
Reply to this email directly, view it on GitHub
<#3059 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQBSDBJDDETXYXH4XGSBMNTYHYTCBAVCNFSM6AAAAAAYXNF43KVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TONJXGA3TE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I want to display an image and play a sound at the same time for fixed duration. I checked the psychophysics plugin demos but still a little clueless. As two stimulus are not presented simultaneously.
Beta Was this translation helpful? Give feedback.
All reactions