Hapticlabs Studio directly interfaces with TouchDesigner through its TCP port, and you can also connect TouchDesigner directly to the satellite after uploading tracks to the satellite. To facilitate the setup and usage of these connections, we created a TouchDesigner demo project, available here.

Setup

Installation

  1. Download the Hapticlabs Demo project from https://github.com/HapticlabsIO/TouchDesignerDemo.
  2. Import the "hapticlabsTouchDesignerDemo.hptl" in Hapticlabs Studio using the menu (File -> Export/Import).
  3. Open the TouchDesigner project!

Configuration

You can interface with Hapticlabs in two ways: via TCP to Hapticlabs Studio, or via Serial directly to the satellite.

TCP connection to Hapticlabs Studio

Make sure to turn off the "serial" block when using this mode. Other than this, all you need to do is open Hapticlabs Studio.

Serial connection to the Hapticlabs Satellite

Make sure to turn the "serial" block on to use this mode. Additionally, disconnect from the Satellite within Hapticlabs Studio or close Hapticlabs Studio.

Usage

Once you have the connection properly set up, you can start including haptics in your TouchDesigner project!

For that, anywhere in your project you can call the following functions:

op('hapticlabsSerial' / 'hapticlabsTCP').module.startTrack(trackName, amplitudeScale)

With this command, you can start the track with the specified track name.

  • trackName: a string containing the name of a track in the currently opened project in Hapticlabs Studio or the name of a track that has been uploaded to the satellite.
  • amplitudeScale: with this parameter, you can scale the amplitude of the track to be played back. Values larger than 1 result in more intense haptic effects, values smaller than 1 result in less intense haptic effects. Note that you cannot exceed 100% of total intensity, that is, if your track features e.g. a vibration with 50% amplitude, the maximum scale you can use is 2.0, if your track features e.g. a vibration with 100% amplitude, the maximum scale you can use is 1.0.

Example:

op('hapticlabsTCP').module.startTrack("Slow pulses", 0.7)

starts the track called "Slow pulses" in the currently opened project in Hapticlabs Studio while scaling down the intensity to 70%.

op('hapticlabsSerial' / 'hapticlabsTCP').module.setAmplitudeScale(amplitudeScale);

With this command, you can adjust the amplitude of the playback.

  • amplitudeScale: with this parameter, you can scale the amplitude of the playback. Values larger than 1 result in more intense haptic effects, values smaller than 1 result in less intense haptic effects. Note that you cannot exceed 100% of total intensity, that is, if your track features e.g. a vibration with 50% amplitude, the maximum scale you can use is 2.0, if your track features e.g. a vibration with 100% amplitude, the maximum scale you can use is 1.0.

Example:

op('hapticlabsTCP').module.setAmplitudeScale(1.2)

increases the intensity of the playback by 20%.

op('hapticlabsSerial' / 'hapticlabsTCP').module.stop();

With this command, you can terminate any haptic playback.

Example:

op('hapticlabsSerial').module.stop()

stops the playback on the satellite connected through Serial.

By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.