# Present visual and auditory stimuli Simultaneously

**URL:** <https://psychtoolbox.discourse.group/t/present-visual-and-auditory-stimuli-simultaneously/1082>\
**Category:** Uncategorized\
**Created:** [May 25, 2004, 6:30am UTC](https://psychtoolbox.discourse.group/t/present-visual-and-auditory-stimuli-simultaneously/1082 "2004-05-25T06:30:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [May 25, 2004, 6:30am UTC](https://psychtoolbox.discourse.group/t/present-visual-and-auditory-stimuli-simultaneously/1082/1 "2004-05-25T06:30:37Z")

</div>

Dear experts,

&nbsp;

We are going to make a task that can present visual and auditory stimuli simultaneously. 

The&nbsp;visula stimulus is that the target object moves randomly on the display. 

We would like to give&nbsp;the auditory stimuli while the target moves on the display.

Our problem is that the target stops during the auditory stimulus are presented&nbsp;(for 50 msec).

We would like to give the auditory stimuli without stopping the target.

&nbsp;

Could anyone help us in order to solve the problem ?

&nbsp;

Sincerely yours,

&nbsp;

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
Hideki MOCHIZUKI

&nbsp;

Department of Animal Models for Human Disease,  
National Institute of Neuroscience,  
National Center of Neurology and Psychiatry  
ADRESS: 4-1-1, Ogawahigashi-cho, Kodaira-shi, Tokyo, Japan  
E-mail: [motiz@...](mailto:motiz@...)  
TEL:+81-42-341-2711   
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

&nbsp;

---

<div class="post-metadata">

**Author:** ![jsbenjamins](https://avatars.discourse-cdn.com/v4/letter/j/a8b319/32.png) [@jsbenjamins](https://psychtoolbox.discourse.group/u/jsbenjamins)\
**Post date:** [May 27, 2004, 7:11am UTC](https://psychtoolbox.discourse.group/t/present-visual-and-auditory-stimuli-simultaneously/1082/2 "2004-05-27T07:11:54Z")

</div>

Hi Hideki  
  
it looks like you're using some sound playing command which halts the   
code until the sound is played and then continues. What command are   
you using? If you're using wavplay this is exactly what happens. Its   
default playing mode is the so-called 'sync' method which waits for   
the sound to stop. So either give the extra input argument 'async' to   
the wavplay command or use the SND or SOUND command both of which   
don't wait for the playing sound to stop as far as my knowledge goes.  
  
Jeroen Benjamins  
  
--- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "Hideki Mochizuki" \<motiz@n...\>   
wrote:  

> \> Dear experts,  
> \>   
> \> We are going to make a task that can present visual and auditory

stimuli  

> \> simultaneously.  
> \> The visula stimulus is that the target object moves randomly on the

display.  

> \> We would like to give the auditory stimuli while the target moves

on the  

> \> display.  
> \> Our problem is that the target stops during the auditory stimulus

are  

> \> presented (for 50 msec).  
> \> We would like to give the auditory stimuli without stopping the

target.  

> \>   
> \> Could anyone help us in order to solve the problem ?  
> \>   
> \> Sincerely yours,  
> \>   
> \> \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
> \> Hideki MOCHIZUKI  
> \>   
> \> Department of Animal Models for Human Disease,  
> \> National Institute of Neuroscience,  
> \> National Center of Neurology and Psychiatry  
> \> ADRESS: 4-1-1, Ogawahigashi-cho, Kodaira-shi, Tokyo, Japan  
> \> E-mail: motiz@n...  
> \> TEL:+81-42-341-2711  
> \> \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

---

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [June 1, 2004, 5:13am UTC](https://psychtoolbox.discourse.group/t/present-visual-and-auditory-stimuli-simultaneously/1082/3 "2004-06-01T05:13:33Z")

</div>

Hi Jeroen

&nbsp;

The probelem&nbsp;was solved by changing command from "wavplay" to "sound".&nbsp;

Thank you for giving us advice.

&nbsp;

Hideki Mochizuki

&nbsp;

\>Hi Hideki  
  

> \>it looks

like you're using some sound playing command which halts the  

> \>code until

the sound is played and then continues. What command are  

> \>you using? If

you're using wavplay this is exactly what happens. Its  

> \>default playing

mode is the so-called 'sync' method which waits for  

> \>the sound to stop. So

either give the extra input argument 'async' to  

> \>the wavplay command or

use the SND or SOUND command both of which  

> \>don't wait for the playing

sound to stop as far as my knowledge goes.  
  

> \>Jeroen

Benjamins
