Modify python

Job ID: 36040674

Budget: $30 – $50 USD

I am looking for someone with any experience in psychopy to help me with two assignments that are being presented simultaneously. In your comment, if you have any psychotherapy experience, please include it.
A participant responds to a visual timer by pressing a key, and the ISI for this task is variable and depends on the participant's response time as well as a built-in waiting period that is variable. 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).

Although my code is functional, there are a few glitches in it. I keep getting the following error:
PsychPortAudio-WARNING: Playback on audiodevice 1 has not yet fully ceased, despite the invocation to the 'Start' method. Forced restart with potential timing hiccups or audible abnormalities.

Because the timing of this experiment must be quite accurate, I hear something that is unmistakably an audio artifact on my operating system.
I've experimented with changing the script to prevent the loop from forcing the sound to play when it has already started playing, but when I do that, the regular cadence it is supposed to have (every 3s for 200ms) stops playing, and there is only one beep that plays at the beginning—I don't know what I'm doing wrong. In a perfect world, I would also change the code to allow the aural beeps to play on a configurable ISI.

The visual stimuli is functioning flawlessly and may probably be left alone.

I will have to supply the code after the work is accepted because the code goes above the allowed number of characters.

Deliverables include code that plays beeps at the proper intervals (and prints the time that each beep began, stopped, and how much time has passed) while also not raising that error.