Problems with presenting short tone sequences

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10): Win 7
PsychoPy version (e.g. 1.84.x): 3.1.0 (64bit)
Standard Standalone? (y/n) Y

Hello!

I have a problem with presenting short tone sequences. Imagine the following situation: Subjects hear two consecutive pure tones (30 ms each) with a short blank pause (30 ms) in between. When a set of consecutive stimuli (i.e., tone, pause, and tone) are repeated twice, I observed that the first tone in the first repetition is not delivered to a headphone.

I tried different combinations of tone durations and pauses. The capability of delivering short consecutive tones seems to depend on a tone duration and pause duration.

I suspect this is a hardware problem (soundcard: Realtek® audio) and/or a stimulus loading problem?

Thanks for any help.

Best
M

Hello!

Does anybody have an advice to may problem above?
Is there a possibility to generate a sound for just e.g. 4 ms with PsychoPy?
If yes, how can I measure whether the sound was presented for 4 ms?

Thank you very much!
Best,
M

Hi @M11, using Windows 10 I can get the 4ms sound to play in a loop using Builder (see attachment below) using the default settings. This may be a soundcard issue. Also, it is worth noting that the new low latency sound library from PsychToolBox will be implemented in PsychoPy the coming month.

How long the sound is actually playing for will need external hardware for testing, for example the BlackBox ToolKit, which is something we use for measuring audio/visual and response time latencies.

importsDemo.psyexp (5.2 KB)

Great! Thank you @dvbridges for the response! It really helped me a lot!
When I open your attachment I just see a text component (+ a JS code) and no loop.
Was this the correct file?

Ah sorry I removed the loop just before sending it, it works either way. All you need to to is add a loop around the routine in the flow, and by default it should loop 5 times.

Hi @dvbridges, when I added a loop I still can not hear something.
Is it correct that there is no sound component?

Apolgies, I appear to have uploaded the incorrect file. See attached. shortTone.psyexp (5.7 KB) .

So, I can hear a very short blip. I am using Windows 10, and RealTek HD audio default device.

Hi @dvbridges, thank you very much again. I can also hear the blips.
However, when I create a sequence of two tones (see attachment) then I hear just one.
I suppose it has something to do with my sound card (as you suggested) or should I wait until Psychtoolbox is implemented in PsychoPy?shortdoubletonesequence.psyexp (4.8 KB)

@M11, this looks like the trial ends before the sound is played. As your sound is so short (less than a screen refresh), is synced with the screen refresh, and it attempts to play at the end of the trial, the trial ends before the sound is played, perhaps due to latency issues. The easiest solution is to move the sounds to the beginning of the routine instead of the end. Or, if you want the sounds at the end of the routine, add a keyboard component that ensures that the trial duration is set to allow both sounds to play (keyboard with a duration of 1.1 seconds), you should get your desired effect e.g., two short sounds in quick succession before the end of the trial.

If you want superfast sound latency, then I would await the new PsychToolBox sound backend. In the meantime, we performed some sound latency tests with current sound libraries and reported them here, if you want to get an idea of how they perform currently. See PsychoPy 2 Sound Latency - an update.

1 Like