TSPS + Processing

Setup

  1. Download Processing: http://processing.org/download/
  2. Download TSPS examples: TSPS Examples
  3. Install the TSPS examples:
    a. Navigate to examples/processing/library
    b. Copy the folder called "TSPS" to the libraries folder in your Processing sketchbook
        i. This should be a folder called "Processing" in your Documents folder
       ii. If there is no folder called "libraries", create it and then copy TSPS
  4. Open Processing (or restart it if you already had it open)
  5. Click "Import Library" from the Sketch menu in Processing
    a. You should see "TSPS" under contributed libraries
  6. If you don't see TSPS, try some of the tips mentioned in this guide: http://wiki.processing.org/w/How_to_Install_a_Contributed_Library

Starting a New Project

Each Processing TSPS app you create must:

  • import the TSPS library
  • create a TSPS object

Importing the TSPS Library

Add the import code to the top of your app:

import tsps.*;

Creating the TSPS Object

First, declare the TSPS Receiver object at the top of your app. Then, in your setup function, connect to TSPS. You must pass in your app (this). If you have changed the OSC Port from the default (12000) in the TSPS GUI. you also have to tell TSPS what port to listen to. 

// Declare the TSPS Receiver
TSPS tspsReceiver;

// create the receiver in your setup() function
void setup(){
tspsReceiver= new TSPS(this);
}

// IF you have changed the port in TSPS, for example to 12001
void setup(){
tspsReceiver= new TSPS(this, 12001);
}

From there, you can:

  • listen to TSPS Events
  • access TSPS People objects at each frame

Listening to TSPS Events

Accessing TSPS People Objects

Documentation

Documentation for the TSPS Processing library can be found here: http://labatrockwell.github.com/openTSPS/processing/

Published on by Brett Renfer.