bci-workshop
bci-workshop copied to clipboard
Fix sound in exercise 2 on Mac
Bleeps are not bleeping correctly
maybe we should look into python libraries like this? https://pypi.python.org/pypi/playsound/1.2.1
ok I tested playsound on windows 10 and osx 10.10.5 (both python 3.6). windows worked out of the box, but osx didn't, I needed to install pyobjc separately (https://github.com/TaylorSMarks/playsound/issues/5)
To avoid installing extra libraries, is it possible to call (from Python) piece of software already existent in OSX to play sounds? Similar to the approach followed in the Windows version?
@rcassani I understand your point but the problem is that the current exercise script tried to do it and it is not working right now. I think we should add a dependency so we don't have to solve cross platform sound related issue again...
It looks like if we used a requirements file we could throw conditional logic after a semicolon in a python requirements file to only install packages on certain platforms.
Something like: playsound; sys_platform == 'darwin'
Either that or we could just make a note in the instructions for MAC users to install playsound. I'm leaning towards a seperate requirements file
@jdpigeon great idea, actually I was thinking about packaging bci-workshop as a pip package so you only need to pip install bci-workshop
to install dependencies. In my opinion we're already using lsl and other 3rd party libraries, so adding playsound won't be a problem.