| Reference | Downloads | Github

Best way to structure RSVP format with synchronous audio presentation

OS (e.g. Win10): Window 10
PsychoPy version (e.g. 1.84.x): v2020.2.5
What are you trying to achieve?:
I am trying to design an experiment that uses an audio component combined with an RSVP presentation that is in sync with each other.
What did you try to make it work?:
I previous designed two separate experiments, one with an RSVP format, the other with an audio presentation format. However, I did my RSVP format as a loop, where the excel file contained the individual words and their respective display times. With this type of structuring I cannot add the continuous audio file in, as the stimuli routine is just a series of loops.
Is there a way I can cycle through an excel spreadsheet in one single routine without doing loops within the builder? Or do I need to custom coding in order to allow the audio presentation to continuously play during that routine? (In addition this will be on pavlovia/prolific so the coding itself would need to be translated to Java)

You can have an audio file play across several routines by setting it up in a previous routine with 0 volume and then setting the volume to 1 before starting it again in code.

Alternatively you can preload a spreadsheet into a list.

The best option may depend on the nature of your audio and visual stimuli.

Dear wakecarter,

I have my loops like this:

The “outer” is what calls on an excel folder with two parameters. One parameter regarding the “response” question for each loop. The other is a path to an excel spreadsheet containing the individual words and their presentation duration for the “inner” loop (which is similar to some kind of list as it goes through the spreadsheet sequentially).

With this type of setup currently, I am assuming restructuring the current design so that my inner loop is just a list instead of a series of loops would be most appropriate? If so, I am unfamiliar of the best way to do that. I would guess it would be two sets of lists, one for words and one for the duration of each word? From there, how would I integrate each list into the experiment itself? Or am I misunderstanding your advice.

Sorry – I think I misunderstood your design. Do you want the stimuli routine to present either a visual or audio word? If so, then you could simply have two versions of the routine and two versions of the inner loop – with a column in the outer loop setting the nReps as 0 or 1 for the appropriate inner loop.

Sound files are best left with no duration, but you might need the duration if you want to present the visual word for the same length. If you are doing this then you could put everything through a single stimuli routine and have volume set to 0 for the visual words and change the location of the visual word to off screen for the audio words.

The stimuli simultaneously presents the audio and RVSP at the same time.

Do you have a separate audio file for each word?

No, it was going to be my one of my fallbacks if there was no way to have the audio file playing over the RSVP words. My other fallback was to use the movie stimuli and just incorporate the sound file overtop of a recording of the RSVP. My concern with that is the amount of downloading participants would have to do for online experiments.

In that case that’s what I first thought. Yes you can set up an audio file with the whole set of words and start them playing using sound.setVol(1) and just before the RSVP loop starts.