How many sound files can we put on the spreadsheet without getting problem in loading and playing them on Pavlovia?

Hi everybody. For my project I need to put at least 270 files of rhythmic sounds with the average size of 350 kb on a excel file. Do you think I will get problem while loading them and playing them in Pavlovia or it will goes smoothly?
I just need to know this before starting to create those sounds and programming for playing them.
Thank you.

That would be about 100MB of sound. Pavlovia can handle that, but it might be that the computers on which your experiment runs have a hard time with it. I’m not sure though; we’ve never tested where the limits are (and it’s a bit hard to do also, given how many different devices are out there). You could consider splitting up your experiment into smaller “sub-experiments” and chain those together?

Hi @thomas_pronk . Thanks for your answer. Could you please explain a little more about splitting my experiment into smaller sub-experiments and then chaining them together? Cause these are all trials of one block and I don’t know how I can do that.

If all your trials are randomised over one block, this probably won’t work. Only if you can organise them in different blocks, each with their own set of sounds

I see! And another question is that can I put mp3 files to the spreadsheet? My audio files get some clicks when I play them in the .wav format.

Yes, mp3’s can go in the spreadsheet. As a test, try it out it a single sound-file. About the clicks: might be a production thing? Perhaps you also hear them if you play them with a local media player?

Yes I hear the last tone of a sequence that have clicks and I’ve tested it in three computers!

It’s likely because the sample ends suddenly. In PsychoPy you can correct for that using a Hamming window, but it’s not implemented in PsychoJS yet.

The way around is via some processing in your audio editing software. For instance, you can add a little fade-in and fade-out. If you’d like to be precise, you could cut the start and end of the sound such that both are at 0 amplitude.

Thank you @thomas_pronk . If I put ramps at the start and end of my stimuli and correct them, I won’t have any problems online?
And I have another question from you. I have two versions of each music I’m gonna use. one slow and one fast. At the moment I’ve put them all in a column. If the slow version is selected I want the fast one be ignored and not to be played and vice versa. Do you know what is the way for that?
my simple stimuli.xlsx (11.8 KB)

Sounds good. I’d say: try out the ramp to see how it sounds. For the fast and slow sounds, my guess is that if they are in the same column, only one should play each trial.

Yes one is played in each trial but I want the other one to be completely ignored and not to be played in the entire experiment.

Maybe make two experiments? One with the fast sounds and one with slow sounds?

In fact they should be played at random in one experiment and when one is selected the other should be ignored.

To recap:

  1. You’ve got two sets of samples (sounds)
  2. Each participation only one of the two sets is played.

How is decided which set is selected for a participation?

Maybe I didn’t explain so clearly but for example let’s imagine in my spreadsheet the fast version of music A is selected, then we want the slow version of music A be ignored and then the slow version of music B will be selected and then the fast version of music B should be ignored and the end of experiment. So in this case the fast version of music A and the slow version of music B was played. So it’s not like for a specific participant always the slow or fast version would be played, it can be the combination of both. The point is that when slow version is selected the fast one be ignored and vice versa.
my simple stimuli (1).xlsx (11.8 KB)

Ah, thanks for clearing up! On the logic level perhaps something with a code component that selects either column A or column B (fast/slow sound). Then you’d still need to download all the stimuli though. But read on for a way to make it a bit lighter.

You could download resources “on the fly”, which means that you download sounds while your experiment is running.This way you could download the sound you need just before you present it, thus halving the number of downloads. I looked around on the forum to see if there are any threads that cover this already and added my solution to it: https://discourse.psychopy.org/t/loading-sounds-on-the-fly/13393/15

Beware though, this is quite technical, so it could take you some effort. If you take this route. Develop your experiment in small steps, testing every step, so that if something goes wrong, you know where to look. These tutorials could help you with debugging: https://gitlab.pavlovia.org/tpronk/assignment_stroop/