Description of the problem: I have two sound stimuli that are set to play at the same time, for the same duration, at different volumes during “practice” and “test” routines. The same issue happens in both routines: The high-volume sounds (high_amp_prac and high_amp_test) are set in PsychoPy Builder to play at Volume 2 while the low-volume sounds (low_amp_prac and low_amp_test) are set to play at Volume 1. This works perfectly when I run the program locally, but it does not work when I run the program on Pavlovia. Looking at the .log files, it looks like both sounds play at Volume 1 no matter what. Is there any way for me to fix this?
I have tested it with volumes of .5 and 1, and both volumes still get corrected to 1. Since this issue is only occurring on Pavlovia, could it be some type of JavaScript error?
So I just had a go replicating this, but setting one sound to be 0.5 and the other to be 1 and the volumes appear OK online for my demo (but it uses wav files) Here is a link to that https://gitlab.pavlovia.org/lpxrh6/doublevolcheck
I had a fork of your task (you should be able to see the edits I tried in my fork) and I am not sure the volume is the issue, changing the volume of the low amp from 0.5 to 0.7 audibly alters the sound as expected. However, the frequencies sound slightly different locally to online, is it possible that this is the issue rather than the volume? or have you had a printout of the vol?
cool task by the way! incase this is an issue with version I am also running psychopy version 2020.2.4
Thank you! We’re using the same version of PsychoPy it seems. I’m sure it’s the volume that’s the issue because in the .log files output when I run on Pavlovia, I get the following lines:
So it seems that both tones are generated with the same volume, these snippets appear all throughout the log file where I would expect to see the tones being played.
Ok I see! So, interestingly, if we use console.log(low_amp_prac.volume) that does print out the correct volume in the console online (suggesting that the volume is being set correctly).
I think the volume is fine and it being set correctly - but I just don’t know enough about how toneplayer interacts with sound and why it would read volume as 1