Randomising images, ITIs, with randomised musical conditions playing continuously in the background

The easiest thing to do here would be to have a conditions file with 54 rows containing your fixation duration values. Then set your loop to have nReps of 1 and to be randomised. The only issue here is that the duration values won’t be perfectly balanced across your three blocks: they will be randomly presented across the entire session. This Probably isn’t an issue if you have a reasonable number of subjects. But if your design does require balancing across blocks, then you would need to implement the duration values in code along with the other conditions.

To have a pause after each block, insert another routine and put this code in the “begin routine” tab of its code component:

if not(your_loop_name.thisN > 0 and your_loop_name.thisN % 18 == 0):
    continueRoutine = False

NB This technique is (hopefully) temporarily broken for PsychoPy versions > 3.2.0, so see here for a temporary workaround: