In running online, just the first sound of many sounds is presented

URL of experiment: https://pavlovia.org/Zhaleh/seq_audi

Description of the problem: In my experiment, I’ve included two code components to present audio stimuli. They are supposed to be rhythmic auditory patterns but while running in Pavlovia, just the first sound is played, and then nothing happens (even not an error message).
I’m wondering why Pavlovia doesn’t present my whole experiment and if something is wrong why it doesn’t show an error message. Where can we see errors in running experiments in Pavlovia?
I’m a beginner to psychopy and Pavlovia and any detailed response is much appreciated.

Hey @Zhaleh, sorry to hear your online study is acting weird! Would it be possible to upload your .psyexp here? I was unable to access the repo you link to. Here to help, thanks, s.

Hi,
Thank you for your attention.
Yes, of course. I upload my file here.
Seq_auditory.psyexp (24.4 KB)

No worries, let me take a look and I’ll get back to you, thanks, s.

Hey @Zhaleh, that ‘stop(ran)’ function call inside the duration field in your ‘sound_1’ stimulus is the culprit I believe. Could you remove that before exporting for HTML? That should do it I believe, x

Hi. Thank you so much. I think you are right. Do you mean I remove it totally?! Because it does what I want to my experiment which is producing sounds in the duration I want. So I can’t understand how can I remove it!
I put the function “stop(ran)” into a variable called “stopvar” but I keep getting the reference error: stopvar is not defined.
I’m a beginner at programming and working with psychopy and pavlovia so any detailed response is very much appreciated.
The other thing I don’t understand is that when I change my code in psychopy, export html and then sync it, I don’t see the changes in js file in pavlovia. Why is that?
Thanks again.
Zhaleh

No worries, please allow me some time to consult with the rest of our team on the best way to handle dynamically choosing sound duration.

As to JS edits not reflecting on Pavlovia, it could be git related, but I would need more information to know for sure. I created a project on Pavlovia using the .psyexp you sent me, made a few cosmetic changes and was able to re-sync as normal, so it’s hard for me to tell where the problem lies.

Would it be OK to turn your project public for a minute for me to investigate a bit more? Thanks, s.

Hi @sotiri, Thank you so much. Yes of course. I made it public now. However, if you look at it now I’ve also made some changes in the js file manually. At the moment it still produces the first sound of many sounds that are supposed to be played.

OK great, let me take a look, is the syncing through PsychoPy working as expected then?

I found that while exporting to html I have some errors in the console.
As for syncing, when I hit the sync button and look at the js file in pavlovia, I don’t see my changes there.

Alright thanks, just to be sure, the list below is incomplete? I need to do some more digging, but I’m thinking if you have errors in the console, it could be they are preventing the syncing from going through somehow?

Hi @sotiri, I think this is complete, I mean I made the latest changes around 17 hours ago. So it seems to be complete.

Alright, cool, let me first try to tackle choosing the sound durations dynamically then. Many thanks for your patience while I look for a solution, s.

I’m the person who should thank you. Your help is very much appreciated.

Please, no trouble at all :blush:

Hi @Zhaleh, as it happens PsychoPy requires a dollar sign ($) prefix for variable parameters like ‘start’ and ‘duration’. I was able to get the experiment to run and export to HTML by changing durationvar[c] to $durationvar[c] and list[a][b][c]*0.250 to $list[a][b][c]*0.250. You can preview the result below:

Hope that makes sense, please let me know if it fails to address the problem. Here to help, s.

Hi @sotiri, Thanks for your time. I run the experiment via link you sent me but it again just play one single sound and then I just have a gray screen!

Alright, OK, but at least we have something that will export without errors! I believe now it’s mostly a matter of getting the durations right, non? s.

Yes, we at least have something presented. That’s cool.
But you know, in my experiment, I’m supposed to have three rhythmic sequences and in each sequence 6 or 7 sounds should be played in a rhythmic manner. Then participants should judge which one is different from others. And then the next three sequence and so on.

Yes OK I understand. However, it’s not immediately clear to me just by looking at those code components how exactly e.g., ‘list[a][b][c]’ is meant to work. In any case, please rest assured I’m committed to helping you implement the design you have in mind in PsychoPy and online. Please allow me some time to see if I can come up with a result that comes closer to your description, thanks, s.