Random presentation of audio tones - Auditory CTET

Hi everyone,

I’m new to PyschoPy and I need to convert a visual continuous temporary expectancy task (CTET) to an auditory version, so I need to change a few lines of the script in the visual CTET.

For the auditory CTET, I need to write a piece of code that will allow me to continuously present 4 different audio tones that only differ in terms of frequency (500, 600, 700, 800 Hz) in a random order. This is what I need help with.

To explain the task, the 4 different audio tones are played continuously in a random order. Every 7-15 trials (tones) the duration of one of the audio tones (i.e., target tone) will be 40% longer (1120ms) than the standard tones (800ms). The participants need to respond to the target stimuli by pressing the space bar. There are ten blocks each block contains 18-22 stimuli (audio tones).

Because I am converting an already made visual CTET (that has used script/code to implement the presentation and timing of the visual stimuli), I only really need a piece of code for the random presentation of the auditory stimuli (tones). Can anyone help me with this?

Any help would be greatly appreciated and I’m happy to answer any questions in case I wasn’t clear!


I’m unclear from you post whether you are trying to do this yourself, and need help, or are looking for someone who can do it for you. It sounds like a fairly simple task (though sound files can be more difficult to work with than images). Please email consultancy@opensciencetools.org if you’d like to chat to our science team about it.


Thank you for getting back to me and offering support, I will email your science team about it now.

Regarding the task, I am trying to convert the visual CTET to an auditory version by myself, but I am using a visual CTET that was previously made a former colleague. That’s why I can use the visual CTET as a template and work to change the pieces of code for the visual stimuli to make it compatible for the auditory version.

1 Like