[open]Playing multiple background sounds in eye-tracking study
I'm new here. I'm working on a study using eye-tracking to see how music distracts reading. I have some music pieces and some articles. I want the music pieces to play in a random order while the subject is reading articles. It is important for me to synchronize the music stream and the eye tracking data, so I can identify at which point of the music the subject has an erratic eye movement. I wonder how to achieve this synchronization. I have some knowledge of python so I can write a little bit python script. I am using a Tobii 60Hz eye tracker. I know that pygame is not very accurate at precision but the 30ms jitter is not entirely unacceptable. But it would be cool to do this in pyaudio, but it seems more complicated than pygame.
So basically I'm seeking help on:
- Play sounds consecutively in random order
- stop playing as long as the subject finishes one article, start playing the music (that has not been played) as long as the next article presents.
- Synchronize each piece of music (start, stop) and the on-line eye-tracking recording. Pygaze is acceptable, pyaudio would be perfect.
Any help would be appreciated!