murthylab / fly-vr

FlyVR is code for design and control of multisensory virtual reality experiments for flies.
https://github.com/murthylab/fly-vr
3 stars 5 forks source link

Adding 2 channel (stereo) audio delivery to FlyVR #21

Open davidt0x opened 2 years ago

davidt0x commented 2 years ago

Adding 2 channel (stereo) audio delivery to FlyVR. This involves modifying soundserver mostly on the backend side. This shouldn't be too difficult. I think the stimulus code already handles mixing multiple signals into one buffer for sending to the device. This was working for the DAQ previously at least. There is a question of what the user interface for specifying multiple channels should be? Should stimulus entries have an optional channel field?

mwangq commented 2 years ago

hardware: a pair of earbuds plugged into the sound card

Example of why we want 2 channel (stereo) audio: the male fly moves around during courtship, so I might want that song to also "move" from left earbud to right earbud (so, one playlist item, with different sound on each earbud). A second example is simply testing for neural responses that come from the left, or from the right (so these would be separate playlist items; maybe even the exact same playlist item, but played only thru one earbud speaker).

I wonder if a good solution is for the user to always provide 2 columns of audio data (left earbud, right earbud). I like your idea of having an optional channel field (channel 1, channel 2, or both).