SuperCollider Haptic Server
Description
The SuperCollider Haptic Server provides a simple framework for the haptic playback of sound files across the massively multichannel haptic actuation system used for the NIW floor. Once the Haptic Server is running, haptic sound files can be "drawn" on the floor as a means of specializing the feedback. By using the simple OSC protocol, a simple shape, a column, a row or a point can be specified within which or at which a selected sound file will play back at a selected amplitude.
The SuperCollider Haptic is designed to run simultaneously on multiple machines, each one controlling the actuation of one row of tiles within a large floor. Given this, it can currently be somewhat tedious to install/update/boot the SuperCollider Haptic Server.
Installation and Setup
Make sure you have downloaded the latest release.
- Copy the source code to each machine serving a row of the floor and make sure SuperCollider 3 is installed.
- Adjust the settings of each script (follow the comments in the source code for more details):
- Set the filepaths to all the sound files you will be using. For multiple machines, the same sound files should appear in the same order in every copy of the Haptic Server.
- Set the row number being served by each instance of the Haptic Server.
- Boot SuperCollider. You may have to change the audio interface settings and output mappings and reboot. (See source code comments for more details).
- Execute the main SuperCollider program. (See source code comments for more details).
OSC Protocol
Note 1: All coordinates and sizes in the SuperCollider Haptic Server are in tile units. For instance, the point (0;0) represents the upper left corner of the floor, while the point (1.5;3.5) represent the middle the 2nd tile from the left, 4th tile from the top
Note 2: The parameter buffer specifies which sound file to play. It is the position of the sound file in the array of sound file loaded by the SuperCollider Haptic Server instances. For instance suppose you loaded the following sound files:
b = [Buffer.read(s, "/sound1.aiff"), Buffer.read(s, "/sound2.wav"), Buffer.read(s, "/sound3.wav")];
Sending /column 0 0 1 would play sound1.aiff on the 0th column, whereas sending /column 0 2 1 would play sound3.wav on the 0th column.
-
/column [int]column [int]buffer [float]amplitude
Plays the sound file specified by buffer at the specified amplitude on all the tiles in the column number column.
-
/ellipse [float]x [float]y [float]width [float]height [int]buffer [float]amplitude
Plays the sound file specified by buffer at the specified amplitude on all the tiles intersecting the ellipse centered at (x, y) with the given width and height.
-
/point [float]x [float]y [int]buffer [float]amplitude
Plays the sound file specified by buffer at the specified amplitude on the tile containg the point (x, y).
-
/rect [float]x [float]y [float]width [float]height [int]buffer [float]amplitude
Plays the sound file specified by buffer at the specified amplitude on all the tiles intersecting the rectangle centered at (x, y) with the given width and height.
-
/row [int]row [int]buffer [float]amplitude
Plays the sound file specified by buffer at the specified amplitude on all the tiles in the row number row.
-
/silence
Ends all playback on the floor immediately.