URGENT: A persisting ERROR sound in online mouse-tracking experiment, not related to any audio components

URL of experiment: Pavlovia

Description of the problem:
Hi PsychoPy-community,

We have been getting a constant error (a beep) sound in our online mouse-tracking experiment.

Offline, the experiment runs smoothly as well as online (i.e., no errors are thrown) and all data is collected the way we intended. However, the difference is that after two trials, we hear a constant beep sound in the online experiment on Pavlovia. Importantly, this beep sound is NOT related to the experiment itself since we can still hear the audio components through the beep sound. This happens in Google Chrome as well as Mozilla Firefox.

Has anybody experienced the same issue when running studies online? We are kind of stuck on what to do because offline and online the experiment runs well…

Here’s the offline psychopy experiment:
TestLong1.psyexp (44.5 KB)

We used the latest version of PsychoPy3 Experiment Builder (v2020.2.4)

Here’s the GitLab link to the project, I set it to public for anyone to access:
::gitlab.pavlovia.org/Rianne/testlong3

Hoping to hear from any of you!

Hi!

I think I found the cause of your problem. To find it, I added a console.log this statement above line 1046 in the generated JavaScript:

    console.log(Comprehension_Audio);
    target_audio = new sound.Sound({
    win: psychoJS.window,
    value: Comprehension_Audio,
    secs: -1,
    });

I notice that the value undefined is printed to the browser console. In that case the Sound stimulus is constructed with it’s default value, which is an A note.

A suggestion for a quick-fix: create a sample that just plays a couple of ms of silence, and put that sample in your conditions table at the cells under Comprehension_Audio that are presently empty.

Now, on the level of PsychoJS, there is something going different than with PsychoPy, having to do with how conditions tables are parsed etc. I’ll have a chat with the team about this.

Hope this helps!
Best, Thomas

Hi @thomas_pronk,

Thank you so much for your reply!

I implemented your quick-fix suggestion and it WORKS! Glad to have the annoying sound out of the way :-). It could indeed be related to how PsychoJS scripts are loaded before the start of the experiment. I do know that JS loads the entire script all at once before the start of the experiment, while Python does this line by line, but I didn’t know it could lead to these kinds of errors too.

Thanks again!

Happy that it works! That’s indeed a difference between how Python and JS work. The issue you had is related to a difference between default behaviors: in PsychoPy, an empty sound (value None) is played as silence. In PsychoJS an empty sound (value undefined) is played as an A note. We’ll go update PsychoJS to act the same way PsychoPy does.

Hi @thomas_pronk,

Another related question: one last thing that we want to achieve in our experiment is to add a sound component which plays simultaneously together with our “target_picture” component (see .psyexp file in routine “Target_production”). We want to record onset latencies of when participants start describing the target picture (they have to record themselves during the experiment). For this reason, we added a beep sound (“latency_sound” component) so that we can calculate how long it took for the participants to start their production (we calculate the onset latencies of speech production relative to the start of the beep sound).

I added this beep sound in the offline experiment and it works, but once the experiment is synced to the online version, the beep sound doesn’t get played anymore…

Do you know what’s happening here?

Here’s the offline psychopy experiment, the routine “Target_production” is of importance to our question.

TestLong1.psyexp (45.7 KB)

Hoping you can help! We appreciate it!

I’m not sure what’s going wrong. Maybe first try to build a little test experiment that only presents an image and plays a beep that isn’t from a conditions file to see if that works? By adding complexity step-by-step you can get an idea where the problem exactly is.

Thank you for the reply!

Somehow the beep works now (strange!). But I guess it could be because synchronisation of added elements in the Builder might take a while to update online. Happy that problem solved itself :slight_smile:

Thank you for your prompt responses!

1 Like