the time of the 'beep' function

197 views
Skip to first unread message

hangue jo

unread,
Apr 20, 2012, 4:42:53 AM4/20/12
to e-p...@googlegroups.com
Hi there,

Is there anybody figure out how to measure the onset time of the beep?
Is this code below report the exact onset time of beep in milisecond unit (with trigger signal to sync to the recording computer)?

Beep
WritePort &H378, 1
BeepTime = Clock.Read

I can't use Slide object because of my whole stimuli was conducted in InLine (made an animation using Canvas).
Thank you.

Best,
HanGue Jo.

Michiel Sovijarvi-Spape

unread,
Apr 20, 2012, 9:08:32 AM4/20/12
to e-p...@googlegroups.com

Hi,

No. In fact, it will say explicitly in your e-basic help file that the Beep function *should never be used* for stimulus presentation. This is because E-Prime cannot guarantee the onset time of the beep - the only thing your function below does is measuring when E-Prime starts to send the call to beep to Windows (if I'm not mistaken). It will then take X ms until your internal speaker starts beeping. For that matter, what beep is it? How long in ms? Is there a fade in or does it start at full amplitude? What frequency? dB? If you can't know this (and you'd have to measure it with a microphone), it is exactly the same as saying "Somewhere around the 3rd second, maybe, a picture of unknown quality, size and colour was shown to the subjects for a bit", literally.

Anyway, so you might find out, with an electronic ear and such, but you could take the easy path and just record a precise tone using something like cooledit. PST can, given conditions, guarantee ('ish) accurate timing for sound-files, just not for beeps (correct me if I'm wrong).

 

To be fair, I don't know why they don't just provide an inbuilt function to play a 1s 1000 Hz sine wave tone and name the sub to play("MichsCoolTone.wav") beep. I think people can spare the few bytes of memory involved in keeping that permanently in memory.

Cheers,

Michiel

--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To view this discussion on the web visit https://groups.google.com/d/msg/e-prime/-/OXzsxaF3bjoJ.
To post to this group, send email to e-p...@googlegroups.com.
To unsubscribe from this group, send email to e-prime+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.

Michiel Sovijarvi-Spape

unread,
Apr 20, 2012, 9:25:03 AM4/20/12
to e-p...@googlegroups.com

Scientists,

Well, there we go. Here's the very ultimate in timing: 100 ms 16bit/stereo (which is useless)/44.1Khz wave-form with envelope of 10 ms stochastic fade in/fade out (to avoid clicks). Please use this if you want a real beep or want some sound to demarcate an event or something.

Hope it'll be actually attached after i send it to g-groups.

Best,

Michiel

MichsCoolTone.zip

Peter Quain

unread,
Apr 20, 2012, 9:36:23 AM4/20/12
to e-p...@googlegroups.com

that is a cool tone

Michiel Sovijarvi-Spape

unread,
Apr 20, 2012, 9:46:02 AM4/20/12
to e-p...@googlegroups.com

Thanks for the heads up, glad you enjoyed the listening experience and I'm happy it got through. It did take about 4 minutes to generate, including download of the demo version of syntrillium cooledit, so I expect to be included as co-author!*

Michiel

 

*Really? No, not really.

hangue.jo

unread,
Apr 22, 2012, 9:06:08 AM4/22/12
to e-p...@googlegroups.com
Thank you

I decide to use SoundBuffer.Play method hoping that its presents the sound on precise time, I have no good electronic ear (device) to measure.
Truly, I don't need so high resolution of tone. Anyway thank you for the attachment.


HanGue.

On Friday, April 20, 2012 3:46:02 PM UTC+2, Michiel Sovijärvi-Spapé wrote:

Thanks for the heads up, glad you enjoyed the listening experience and I'm happy it got through. It did take about 4 minutes to generate, including download of the demo version of syntrillium cooledit, so I expect to be included as co-author!*

Michiel

 

*Really? No, not really.

 

 

From: e-p...@googlegroups.com [mailto:e-prime@googlegroups.com] On Behalf Of Peter Quain
Sent: 20 April 2012 16:36
To: e-p...@googlegroups.com
Subject: RE: the time of the 'beep' function

 


that is a cool tone

At 11:25 PM 20/04/2012, you wrote:

Scientists,
Well, there we go. Here's the very ultimate in timing: 100 ms 16bit/stereo (which is useless)/44.1Khz wave-form with envelope of 10 ms stochastic fade in/fade out (to avoid clicks). Please use this if you want a real beep or want some sound to demarcate an event or something.
Hope it'll be actually attached after i send it to g-groups.
Best,
Michiel
 

To unsubscribe from this group, send email to e-prime+unsubscribe@googlegroups.com.


For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-p...@googlegroups.com .

To unsubscribe from this group, send email to e-prime+unsubscribe@googlegroups.com.


For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.

--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-p...@googlegroups.com.

To unsubscribe from this group, send email to e-prime+unsubscribe@googlegroups.com.


For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.

--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-p...@googlegroups.com.

To unsubscribe from this group, send email to e-prime+unsubscribe@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages