| layout | default |
|---|---|
| title | Creating Tilt Gestures |
| parent | Common practices |
| nav_order | 27 |
The Puara Tilt processor is a powerful tool for interpreting real-world motion as a rotational gesture. It intelligently combines data from multiple sensors to calculate a device's forward-and-backward tilt (its "pitch" angle).
This tutorial will guide you through a complete example. We will use a smartphone as a live sensor to provide data to the Tilt processor and visualize its output. The principles apply to any hardware that provides accelerometer and gyroscope.
To see the Tilt processor in action, we first need a source of motion data. We'll use the Sensors2OSC app to stream data from a phone over Wi-Fi.
-
Configure the App: In the Sensors2OSC settings, set the Host to your computer's IP address and the Port to
9997.
-
Enable Required Sensors: On the app's main screen, enable the toggles for Accelerometer and Gyroscope. Then, enable the main Send data toggle at the top.

-
Set up OSC in score: In the Device Explorer, add a new OSC device. Set its
score listening portto9997.
-
Learn OSC Addresses: Right-click the new OSC device and select
Learn. Move your phone around until you see/accelerometerand/gyroscopeappear, then click OK.
Now that score is receiving sensor data, we can use our processor.
-
Add Processes: From the Process Library, add a
Gestures/Tiltprocessor and aMonitoring/Signal display. -
Connect Inputs: Drag the learned OSC addresses from the Device Explorer directly onto the corresponding inputs of the Tilt processor in the Inspector.
/accelerometer->Accelerationinput/gyroscope->Gyroscopeinput
-
Visualize the Output: Connect the
Outputof the Tilt processor to theSignal display. -
Run and Test! Run the scenario. As you tilt your phone forward and backward, you will see the signal display draw a curve representing the tilt angle in radians.
You can download a complete example score here: Download the score example here
