My goal is to play background sound during a directrt task. My first thought was to tell directrt to play the sound file continuously across the stimuli in each trial by assigning a 0 to the sound file time column. Unfortunately, this didn't seem to work as I got error messages and the file did not run correctly. Particularly, the sound would play, but the other stimuli in a trial would not be presented (e.g., sound with no stimuli presented). Maybe I was doing something wrong and you can offer advice on this method.
Next, I tried embedding the directrt file into medialab. I told medialab to play the background sound while running the directrt file. This worked pretty well. My only issue was that the sound file continued to play after the directrt file ended. What I want is for the sound file to stop when the directrt file is run to completion (i.e., I only want the sound file to play during the directrt session and at no other time).
Is there any way I can do this? For example, is there a way I can use the d parameter to stop the sound file when the directrt file is completed?? What makes this complex is that each participant will finish the directrt trials at different times so I want medialab/directrt to adjust to these different times and stop the sound at different points.