b2renger / processing_osc_controller

MIT License
1 stars 0 forks source link

processing_osc_controller

EDIT : if you want a hands on tutorial on how to use this => https://github.com/LucieMrc/Processing_Android_OSC (Thanks LucieMRC)

The goal is to build osc compliant applications with processing but streamlining the process. Those application are compatible with the android mode of processing, thus enabling to create custom on the fly osc controller applications for android.

The process will consist of using Pure-Data as a WYSIWYG editor for interfaces. This program distributed here will parse the pd patch to create the rigthfull gui elements in a processing application.

Wireframe with pure-data :


Final processing application (connection page + interface):

As a user you would essentially care for :

How to run ?

Software dependencies

What's what ?

What are all those files ?

What is OSC ?

OSC is a way to format messages for wireless communication over the UDP protocol. That means that you can send messages from one device to another using a naming convention. This naming convention will be used to parse the message on the client side (receiver of the information).

What is Pure-data and why ?

Pure-Data is an awesome piece of software it is the swiss-knife of real time audio programming in a visual fashion and it's completly free. You can find it here Pure-Data.

In this project it's just used for its graphical interface : you can create gui elements, name them, and place them; nothing more. The fact is that pd stores its patches in a text file format with all the information we need; so it's easy to parse and easy to generate a coded interface without having to actually code everything.

The result will be responsive interface on you screen if you respect more or less the given aspect ratio. Elements should be placed and scaled according to your initial interface in you final program.

How to use Pure-data ?

Once installed Pure-Data, will open up a blank canvas for you. I sugget you open the "pd_template_600x800.pd" to start with.

You can create elements (with the "Put" menu)

You can then move and re-arrange them. You can also right click on them and access their "properties". Which will enable you to change their scale, the range of values they will send etc.

It's important to name your elements will the label field in their properties. This name will be used to configure the sending pattern of the value behind each gui element.

For instance if you name a button "toggle1" the osc message will use the pattern "/toggle1" to send the value of this gui element.

What can I customize without coding ?

Anrdoid How-to

Processing has an android mode and it's pretty nice ! => processing-android

That means that once installed you can easily build and android app for your controller. The android version also supports an additional (optional) tab to send the data from most common embeded sensors.

Here is a snapshot of the sensor tab :

Code breakdown

Architecture

How to add new guis

Adding callback to a gui element

the pd parser

send data

Auto-discovery : how does it work

What should be supported ?

GUI

Features

Examples