Hi there
Sorry in advance for the lengthy post, I’m just trying to avoid any ambiguity so any readers can get right down to the question at hand.
I’m in the process of constructing an N-back task, and am attempting to integrate some music which will play in the background while the task is occurring. It’s otherwise complete, I just need to figure out how to integrate the music in the random manner that I need.
Basically I have three different n-back condition blocks, 1 back, 2 back and 3 back, which are made up of a ‘n-back target’ routine that presents the first couple of targets without asking for response, followed by the ‘n-back’ routine consisting of one trial with a trials loop around it to make up the necessary number of trials, followed by a ‘rest’ routine to allow a brief 10-second pause between blocks.
I have randomised the order of each block, using a block loop set to n reps encompassing the full block (ie 1backtarget, 1backroutine and rest, etc) and a Block Select routine in front of the block loops, which itself is enclosed in a loop running the full way from Blockselect to the end of the third and final block. The block select routine picks a number either 1, 2 or 3 corresponding to the block loops for each n-back block, and specifies for one rep of the selected block and zero reps of the others. Obviously this repeats twice with block select choosing another number each time until each block has run.
I have three different music conditions, (song 1, song 2 and silence) and wish for each one to play continuously for the duration of the trials from each block (eg song 1 starts at the beginning of the 1-back trials and plays continuously through until they are all complete, and the same for the next two n-back conditions with the other two music conditions. However what I am uncertain about is how to do this in a manner in which the order of the music conditions is itself randomised independently from the random order of the n-back conditions.
There was a recent post explaining how to add code to ensure a song played through a set of trials without the trials being interrupted, but as far as I could tell, using the proposed method would restrict me to either associating a single song with an individual routine (eg song1 with 1back block, song 2 with 2back block, etc), or making the music condition fully random each time, meaning that I could potentially have song1 and 1back, followed by song1 again and 3back (etc, hopefully you get the idea), whereas I just want regular randomness, eg if song1 and silence played during the first 2 blocks then song2 has to play during the third block.
I’m wondering is there an easy way to add some code to achieve what I want without having radically change how I have the experiment set up in builder so far. Any help would be greatly appreciated.
Thanks in advance
Joe