Select the speaker to present the sound for every trial
Hi!
I am preparing a very simple experiment. I have two sounds and two speakers (connected by bluetooth to my computer). In every trial, the program should play one of the two sounds ONLY in one of the two speakers. That is, in trial 1=sound 1 in speaker 1, trial 2= sound 2 in speaker 1, trial 3=sound 1 in speaker 2...and so on
My question is, how you can tell OpenSesame to use one specific speaker in each trial?
I have seen this similar question before:
From this, I assume I need to do it with an in line script. My problem is that, when I see those examples, they always map the channels (left or right). My two speakers are both independent speakers, they both play the left and right channel at the same time. So I think this solution is not for me.
I am very bad at coding and a beginner with OpenSesame (I used it before, but for very simple things). I would like to know if it is possible to do what I want, and if someoene can direct me to some package or documentation where I can learn how to do it.
Thank you very much!
Comments
Hi Mayte,
My two speakers are both independent speakers, they both play the left and right channel at the same time. So I think this solution is not for me.
I think it could still work for you, if you use a single speaker set? That all depends of course on what you want to accomplish, but if just want to have different locations of sound, using two speakers from the same setup and accessing left/right channel separately would be the easiest solution (Two make sure that the full sound is played, you would need to use mono sounds and not stereo ones).
If you really need to different audio devices, you won't be able to use the sampler I believe, but will have to use directly Python's sound libraries. For example, sounddevice. The details of how this works, I can't tell you out of the box, I would need to google myself first. The good thing though, is that sounddevice is a general Python package that is used much more frequently that Opensesame, so there is a good chance that you will find information on stackoverflow, and other places if you google.
Hope this helps,
Eduard