In order to test the presence of a delay during the emission of sounds in my protocol, I ran it with a Black Box Toolkit V2.
The protocol is quite trivial and consists in the following code (the complete script is attached):
sound.py (3.0 KB)
delay = 1 mySound = sound.Sound('A', secs=0.5) for i in range (50): send_message("DSCM",1) # init capture in bbtk send_message("TIML") # define capture duration send_message(str(delay*1000000+1000000), 1) # delay+1 second now = ptb.GetSecs() mySound.play(when=now+delay) # play in EXACTLY delay ser_bbtk.write(("RUDS\r\n").encode()) # start capturing
I used the ptb library with the 3 Aggressive exclusive mode for this test, and consistantly observed a 90 ms delay on sound emission, as detected by the BBTK, with standard deviation around 2 ms.
This is surprising to me given the results mentioned in Bridges et al. 2020 (The timing mega-study: comparing a range of experiment generators, both lab-based and online [PeerJ]), but could be due to the hardware I am using (more details below).
But hat is more surprising for me is the following phenomenon:
If I use mode 0: Latency not important, the delay detected by the BBTK is now about 0 ms with standard deviation between 0 and 1 ms!
Do you have any idea what could cause this?
Below are the details of my setup
DELL Precision 7560
OS : Windows 10 Pro Build 19044.2130
32 Go RAM
Processor 11th Gen Intel(R) Core™ i7-11850H
No dedicated soundcard
PsychoPy version : 2022.2.4 for 64 bits Windows, using Python 3.8
Regarding BBTK setup, I used the microphone included with BBTK, and a Plantronics BackBeat Pro 2 headset for sound emission (I tried with a Bose headset as well, and got same results).
(Also, I don’t know if this is related but when I try to use mode 1 : Share low-latency access, I get the error “Stream” object has no attribute “handle”. I checked that everything in my audio setup was set to 48000hz but I couldn’t debug it)
Thanks for your help !