I’m having a syncing problem with audio and text stimuli:
Notes:
• I’m playing MIDI files using a MIDI player which I made.
• The Text stimulus is a TextStim
• The following is within a while loop that keeps running win.flip() until the while conditions are met,
This sets the audio playing:
if audio_stimulus.status == NOT_STARTED:
audio_stimulus.play()
The text stimuli are timed to appear on screen at specific moments while the audio plays, for example:
if t >= 1.8 and text_stimulus.status == NOT_STARTED:
text_stimulus.setAutoDraw(True)
text_stimulus.status = STARTED
When I beta tested the code this worked fine on other computers (although only the person using MacOS worked up to the relevant part of the experiment for this particular issue), and it works fine on my own computer . However, a participant (based in Italy) has found that the stimuli are appearing out of sync. Either:
• The text is appearing early
• The audio is playing late
–
Checking the timing of commands on his computer vs mine, I found that:
For ‘if audio_stimulus.status == NOT_STARTED’
• This happens for me at t = 0.15s
• This happens for him at t =0.08s
So a small difference really
And, for if ‘t >= 1.8 and text_stimulus.status == NOT_STARTED’
• This happens for him at 0.01s after 1.8s
• This happens for me at 0.02s after 1.8s
So again a small difference really
My next thought was that maybe psychopy is giving the instruction to play the audio at the right time, but the audio isn’t actually playing at that right time on his computer. I thought, perhaps incorrectly, that testing when audio_stimulus.busy() returns ‘1’ would show this. It returned 1 at exactly the same time as ‘if audio_stimulus.status == NOT_STARTED’, so that didn’t help. Is there some other way I might be able to check this?
This is his system:
Microsoft Windows 10 Home
Version 10.0.14393 build 14393
Processor Intel(R) Core™ i5 CPU M 520 @ 2.40GHz, 2400 Mhz, 2 core, 4 processor logici
pc model: lenovo thinkpad x201
This is mine:
macOS Sierra v10.12.6
MacBook Pro (13-inch, Mid 2012)
Processor: 2.5 GHz Intel Core i5
The experiment is written in PsychoPy v1.90.2
N.B., He gets a message when PsychoPy opens, that I don’t:
pyo version 0.8.7 (uses single precision)
Any thoughts?