OS (e.g. Win10): Mac (Monterey 12.1)
PsychoPy version (e.g. 1.84.x): v2021.2.3
Standard Standalone? (y/n) If not then what?: Y
What are you trying to achieve?: I am trying to create an experiment in builder that has some complicated counterbalancing. Here is the specific design:
Participants see a sequence of shapes (selected from cloud, moon, star, square). For one block (8 trials) two shapes appear in a predictable sequence (AAAB). For the other block (8 trials) the other two shapes appear in an unpredictable sequence (i.e., DCCC, CDCC, CCDC). Each “shape” appears for 2.5 seconds so that one trial lasts for 10 seconds in total. For both blocks, between each of the 8 trials a short video plays (need to jitter the timing of this video between 10-15 seconds). Within a block, each shape is associated with a sound (S1, S2, S3, S4) and a direction (left, right, up, down). For each participant, the shape, sound, and direction should be randomized and the block order should be counterbalanced.
Example of what a participant might see:
Predictable sequence (AAAB) first where A is a square that moves left to right and appears with S2 and B is a moon that moves up and down and appears with S4.
Unpredictable sequence second (8 trials that are pseudo-random- the same order, such as AABA does not appear twice in a row) where A is the star that moves down to up and appears with S3 and B is a cloud that moves right to left and appears with S1.
So from above, we see that for a single participant a sound and direction are paired with one shape consistently across the trials.
What did you try to make it work?:
I have tried to build this in builder but I am completely lost with how to create such a randomization using loops. I also do not know how to get the shape to move at one rate (i.e., starts at (.30,0) and ends at (-.30,0) for the right to left movement) while the sound plays at another (i.e., the sound plays for the entire 2.5 seconds while the shape moves across the screen). I thought about making little videos of the shapes but this makes it more difficult to counterbalance shape and direction and also the videos were not loading fast enough.
This experiment was originally designed by someone else in MATLAB and I have tried to adjust the code to move it to Python but I have no familiarity with Python so I got stuck when it came to converting MATLAB struct to Python.