Question about setting up a wav file to repeat throughout experiment

107 views
Skip to first unread message

Vanja Vlajnic

unread,
Jul 10, 2014, 10:18:47 PM7/10/14
to e-p...@googlegroups.com
Hi all,

First off thank you for setting up this group - it's been a lot of help reading through.

I'm having some trouble figuring out how to make a sound file repeat itself every certain amount of seconds in EP1. Basically, I want to set this loop to play a beep in the background while other things are going on (stimuli being presented on the screen). I would need the sound to repeat itself during most of the experiment and was thinking that instead of ending the loop during the intermittent times I need it not to play, I would just mute the sound output (if possible from E-Prime) during these sections and just resume it after the section is completed.

What would you all recommend as the best way of succeeding this?

Thank you in advance for all the help.

Cognitology

unread,
Jul 14, 2014, 9:55:09 AM7/14/14
to e-p...@googlegroups.com

Hi,

Did you succeed yet?

I thought this wasn’t possible, actually, thinking that whatever you create the sound object as will be permanent. But, not so; the sounddevice itself (turn on sound device in experiment settings, will create global “sound” object) can be adjusted. For example, if you have a soundout object (let’s call it soundout1, and make it play windows critical stop or some such, set it to loop, turn on volume control, and delete it/make it unreferenced), this will work:

 

Dim i As Integer

soundout1.Play

For i = -10000 To 0 Step 100

      sound.Volume = i

      debug.print i

      sleep 100

Next i

sleep 2000

 

It looks better if you use a dual monitor setup and check the debug screen.

Hope that helps.

Best,

Michiel

--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+u...@googlegroups.com.
To post to this group, send email to e-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/4f243f8e-e653-490a-89c1-d22d3b0c2560%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages