Help modifying python code that runs on Psychopy

  • Job DurationLess than a week
  • Project LevelBasic Level
  • Project deadlineExpired

Project detail

I am presenting two simultaneous tasks in psychopy, and ideally would like to find someone with any experience in Psychopy. If you have experience in psychopy, please let me know in your response.
One of the tasks is an audio task (known as Oddball for psychology folks) that presents beeps and boops, and for the moment on a regular cadence (every 3s for 200ms), and the other is a visual task that presents a visual timer the participant responds to with a key press and the ISI for this visual task is variable and depends on the response time of the participant as well as a built in waiting period that’s variable.

I do have code that is working, but there’s a few things glitchy about it. It’s throwing me the following error:
‘PsychPortAudio-WARNING: ‘Start’ method on audiodevice 1 called, although playback on device not yet completely stopped. Will forcefully restart with possible audible artifacts or timing glitches.’

I hear something that is definitely an audible artifact on my OS, and I’m very concerned about timing glitches because the timing of this experiment needs to be very precise.
I have played around with modifying the script so that the loop doesn’t force the sound to override and play when it’s already been playing, but then I lose the regular cadence with which it’s supposed to be play (every 3s for 200ms) and there’s only one beep that plays at the beginning, so I can’t figure out what I’m doing wrong. I would ideally like to modify the code too so that the auditory beeps can play on a variable ISI.

The visual stimuli is working perfectly and can be left alone presumably.

The code is putting me over the character limit, so will have to supply it after job is accepted.

Deliverables
code that both plays beeps at the correct interval (and prints the time of when beep started, stopped, time elapsed) and doesn’t throw that warning.

Skills Required

Industry Categories

Freelancer type required for this project