Sensors2OSC

Open Sound Control (OSC) is a protocol for networking sound synthesizers, computers, and other multimedia devices for purposes such as musical performance or Show control. Bringing the benefits of modern networking technology to the world of electronic musical instruments, OSC’s advantages include interoperability, accuracy, flexibility, and enhanced organization and documentation.
Wikipedia

This is an Android app for sending sensor data via Open Sound Control (OSC).

Download and Installation

The app is available for Android version 4.0 and up at F-Droid

Get it on F-Droid

For Android versions from 2.3 up to 3.2.6, Sensors2OSC 0.3.0 can be downloaded as APK for installation. Sorry for being a debug build, but this build cannot be reproduced with modern tools.

Basics

Depending on your Android version and your device, a number of sensors are available for apps to read. This app enables you to selectively send this data as float over OSC to any receiver.

Use the settings dialog to set the host, that should receive the data, as well as the UDP port, that the receiver is listening to. The rate of sensor readings is settable too.

The switches on the main screen are used to toggle sending of data.

The main switch toggles sending the data as a whole. Only when this switch is set to “on” will the app send data over the network.

Different sensors have different number of ranges and different number of values. Each sensor type has a corresponding OSC address, that is shown to the right of the sensor name.

If a sensor has only one value, then the value will be sent as:
/<osc_prefix> ,<n times f> <values separated by space>
Example for one dimensional data: /proximity ,f 9.
Example for three dimensional data: /acceleration ,fff 0.001 -0.001 9.790.

The numerical values all correspond to real physical values, for details about these and possible ranges, see the Android developer documentation.

Tapping on multitouch while sending data is enabled will enable sending touch data. Each finger touching the phone will send a two dimensional data corresponding to Cartesian coordinates, normalized to a range of 0 to 1, starting from bottom left. Lifting the finger will result in a message of -1 on both axes.

Usage Examples

An example of a working Pd patch that displays typical sensors for most devices and multi-touch:

The phone is lying flat on the desk, so only the gravity is showing as the acceleration value. Shaking the phone violently will show much higher absolute values. NB: negative values are possible as well.

Three fingers are still touching the phone. Values range from 0 to 1. Finger 1 has been lifted from the phone, so it reports both X and Y as -1. There were never more than 4 fingers on the multi-touch page, so touch5 and higher show constant 0. NB: finger 1 has been lifted, but the other touches are not renumbered.

Talk at Linux Audio Conference 2025

At the Linux Audio Conference 2025 in Lyon I gave a presentation about Sensors2OSC, and talked about availability usability of different sensors on Android devices and gave a demonstration.

Get Involved

Development is done over at Codeberg.

If you want to report a bug, please first have a look at the issue tracker. If you already have a Codeberg account, please report your bug there.

You can also send bug reports or feature requests to osc-bugs@sensors2.org. Please try to be as specific about your problem as possible.

If you want to help with translating: Translation is currently coordinated via weblate.

Translation State