This code allows the haptic (and visual) display of image-based textures. It also sends force interaction information as OSC messages to Pure Data, in vectors of 10 samples each. The Pure Data patch then plays this information through a bank of modal resonators to give it a more interesting sound quality.
The code for this little application can be downloaded here. You can also clone the git repo here:
git clone http://idmil.org/git/texture.git
It makes use of CHAI 3D for interfacing with the haptic device hardware, but the haptic algorithm is entirely contained in the provided source. Run “bootstrap.sh” before compiling to automatically download and compile CHAI 3D, LibLo, and any other dependencies. On Windows, it expects to be compiled in the MSYS/MingW environment.
It has been tested with the SensAble Phantom Omni and the Novint Falcon.