SlicerIGT / SlicerSoundControl

3D Slicer extension to generate sound for feedback during navigation
BSD 2-Clause "Simplified" License
6 stars 2 forks source link

Windows only? #8

Open soundsleit opened 3 years ago

soundsleit commented 3 years ago

Hi - new to 3d slicer. I'm working with a team on a sonification project in conjunction with some MRI scans. I've been fiddling around with SlicerSoundControl, being a long time Pd programmer. However, I work on MacOS, and it looks to me like the plugin is geared for Windows only, yes?

lassoan commented 3 years ago

The module is pure Python, works on all platforms. You need to install pure-data to generate the sound - it is available on Windows/Linux/Mac.

soundsleit commented 3 years ago

Yes - I’m very familiar with Pd. But the python code seems to have PC-specific file paths that don’t work on MacOS.

soundsleit commented 3 years ago

PS: this is the error we are getting when we try to run the plug-in:

self.oscClient = OSC.OSCClient()

AttributeError: module 'OSC' has no attribute 'OSCClient'

We are using Pd 0.51-1 (vanilla - since extended is no longer maintained...)

lassoan commented 3 years ago

Probably this error is due to Python2/3 differences in relative imports. The module was developed when Slicer used Python2 but now it uses Python3. You can fix the issue by modifying OpenSoundControl\OSC__init__.py (maybe changing its content to from .OSC import * is sufficient).

However, now Slicer can also install any Python package from PyPI, so if you have any trouble with making the bundled OpenSoundControl\OSC\OSC.py interface work then you can install python-osc or similar packages and use that (pip_install('python-osc')).