Randomize sound vs. no sound trials

Hi,

There’s something I’m stuck on and I hope by posting here people can help me with this problem and potentially offer more insights for people who are in similar situations as I am.

In the online study that I am building, I’m presenting an audio (wav file) and a picture simultaneously to participants in each trial (I will refer to those types of trials as “normal trials” below).
However, I want to add in some silent “catch trials” where only the picture is presented—no sound will be presented on such trials. And I want to mix in those silent picture-only trials with the “normal trials” so that participants do not know which type of trial will come next. They will reply to both the silent trials and the “normal trials” with key presses.

Right now, I only have the “normal trials” set up because I am not sure how to add in the “silent trials”. Currently, the normal trials are presented as:

  1. There’s a certain amount if jitter time between each trial. Both the picture and the audio are set to start at the Jitter time, and participants can make responses right after Jitter time starts. It looks like this in a routine:


  2. Similarly, the picture (labelled as ‘image1’ above) and response start time (labelled as ‘key_resp1’ above) all start with $Jitter.

  3. The routine is wrapped inside a loop, and the loop contains an excel file that specified which audio and picture files to present, as below:

However, the problem is, if I want to add in silent trials (as the third row in the picture above), I will put in the picture path under the column “Picture”, but what should I specify under the “Audio” column?

Any suggestions/insights would be very much appreciated. Thank you all!

Hi there!

Locally this would with using a “None” value. But if your taking this online you might actually need to load a “silent” wav file (which I know is counterintuitive, but it will work easily - “None” is a python phrase)

Becca

1 Like

Hi Becca,

Thank you so much for your reply!
The funny thing is, I actually generated a same-duration silence wav file, but this is what I got after I tried running it on Pavlovia:

Maybe I did something wrong during the silence generation?
(also, I made sure the directory is correct. The pitches/silence.wav you see in the error message above does not match the excel path but they are the same thing, I just happened to have this specific picture at hand…my apologies for the confusion)

Emma

oo that is an interesting one! not seen that before! to check it is not the file please could you try this file

Becca

Hi Becca,

The file you attached is indeed silent, but it has duration 0.
I have a 3 second silence (simply because all my other wav files’ duration is 3 sec each), which I am attaching below. But from what I can see while I’m typing, it seems like on this forum it will show up as 0 seconds :sweat_smile:

Also it seems like I can’t play back this file that I attached. Probably means there’s something wrong with this silence file. I will re-check and come back to this post.

Emma

Hi There,

It should be .5 seconds :slight_smile: but here is a 3 sec file

Becca

ooo thank you! I will try with this file first.

IT WORKS! Thank you so much!
Can I please ask what you used to generate the silence? :sweat_smile:

wooo! of course! I used audacity https://www.audacityteam.org/ (open source FTW)

Thank you!! I will try that as well.
I really appreciate your help Becca (:

Moral of the story: if this warning message pops up please check the stimulus (wav file in this case)

The silent wav file worked for me as well! Thanks so much for this tip.

-Lauren