Presenting the first condition twice

I’ve created an excel file with two columns consisting of auditory files and now I have two questions:

  1. I want the stimulus from the first condition to be presented twice (not once) and then play the second column (condition) related to that.
  2. After playing the stimulus from the first condition twice, I want psychopy to play in random either the same stimulus again or a stimulus that I’ve put on the second condition.
    How can I do these two things?

If you just want sound A to be presented twice and then either sound A or sound B then the easiest way would be to have columns in your Excel called soundA soundB and answer and have half the rows where soundB is the same as soundA.

You could then have three sound components playing $soundA $soundA and $soundB

This should be possible without any code components. If you wanted a single set of sound files which could be randomly allocated as soundA or soundB then it would require some coding similar to my Prospective Memory experiment.