HenryJFlynn / mouse2afc

The Mouse2AFC experimental neuroscience protocol.
GNU General Public License v3.0
0 stars 0 forks source link

Enable use of sound on Bpod rig #57

Open HenryJFlynn opened 1 year ago

HenryJFlynn commented 1 year ago

Experiments types auditory and sound intensity depend on the use of sound. Speakers have not yet been tested with pybpod. The goal is to enable the use of speakers so sound queues can be used during experimentation.

TODO:

HenryJFlynn commented 1 year ago

Just plugging the speakers in, they make no sound

HenryJFlynn commented 1 year ago

how do they know to make a sound? is there a sound file somewhere?

HenryJFlynn commented 1 year ago

It is likely we can't use the waveplayer, at least with the current rig. The plugin expects an audio input from the Bpod but the speakers are plugged into the PC, not the Bpod

HenryJFlynn commented 1 year ago

the output action BNCState triggers sound. I do not know what sounds nor how

HenryJFlynn commented 1 year ago

it seems that it maps to the firmware which is way beyond my current understanding

HenryJFlynn commented 1 year ago

the matlab Sound Protocol settings option is causing the sound. BNC ports by themselves don't seem to do anything

HenryJFlynn commented 1 year ago

The sound file used is in the folder audstim inside Mouse2AFC. It may configure the sounds using audstim.py in /Mouse2AFC/report/py_Mouse2AFC. Not sure why its python, maybe something to do with Psychtoolbox

maachkaa commented 3 months ago

A library called PsychportAudio is used by Matlab. This library was written using GStreamer open source codes. I think that since we do not have the PsychportAudio library on the Python side, there is no sound coming from the computer. I guess it might be a challenging step, but I will look into this issue. If there is any development, I will write it as a comment.

maachkaa commented 3 months ago

There is a PsychPy library on the Python side, similar to the PsychportAudio library. I will try to apply it by downloading this library. Although they say in their statements that they do not support all sound cards, they say that they support most of the new sound cards. I will try using this library.