Pd > OSC > Modul8

Inside Modul8

1.Open the Global OSC Module from the online library and activate the Keyword Listener port.

2. Open the Direct Event Viewer and activate the “modulat8 keyword” button.

Inside Pd

3.Create a [sendOSC] object and copy udp port & IP address from Modul8 to address a connect message from Pd: [connect localhost 8002]

Here we have a mapping made upon the [pix_movement] object; its output inside Modul8 is interpreted as a control signal.

With this patch we got the coordinates of the movement detection using the built-in computer camera. This numbers from one patch will be readed inside the [pd modul8] abstraction from the first figure.

Use localhost 8002 in case you are running Modul8 & Pd on the same computer.

Change the “localhost” message for an IP address in case you are running Modul8 on a second computer, and they are both connected by Ethernet cable. In case you’re working in one single computer, send the [connect localhost 8002 } message throw Modul8 - which default port is 8002.

Then you can send data to each parameter at Modul8, using the proper syntax.

3. Syntaxis for Pd OSC to Modul8:

send /md8key/ctrl_layer_alpha/1 $1

This message controls the alpha channel on layer 1.

How to know the syntax for each parameter at Modul8 interface? See next step.

On Modul8

4. Direct Event Viewer Module activate

Now you can see the addresses for the controls on Modul8 console every time you change a parameter.

5. Addres the messages you need to from Pd to Modul8, in an abstraction like the [pd modul8] from the first figure. Here is a picture:

figure 2

In the picture above we control from Pd several parameters of Modul8; from the top of the picture: alpha channel, speed factor, x & y planes on the camera rotation. This is the inside of the [pd modul8] abstraction that appears on Figure 1.

Example:

 

control the speed factor of videos on layer 1. scale 0 to 1

1. create a number box

2. connect its output to a message box

3. put the message syntaxis on the address box for the Modul8 parameter you want to control.

example:

control the speed factor of videos on layer 1. scale 0 to 1

message on message box:

send /md8key/ctrl_layer_movie_speedFactor/1 $1

Now you can control from the number box on Pd the addressed parameter on Modul8. The float values are represented by the $ number in the box message.

On the Modul8 DirectEventViewer Module it will appear messages for every control you modify from the Modul8 console of effects and everything. So, we can learn from the address that appears on the console to addresse the messages from Pd.

figure 1

We just change from the syntaxis above the: ctrl_layer_movie_speedFactor for the message that appears on the Modul8 console.

Sergio Granada Moreno, Nov 2011