OSC - realtime display

Hello Everyone,

I am new to processing and I am working on a program to receive data from a third party software through OSC. I can successfully receive OSC messages and print them with the following code. Messages I receive have the typetag - iffffffff.

The OSC messages are received continuously during a session. I want the sketch to be modified to display the values of the floats continuously updating on the screen. As an example value of v2. The values are changing with time and I cant figure out how to show these values on the screen. In addition I want the sketch to display the max value of v2 in the session. The max value of v2 changes randomly during the session.

import oscP5.*;
import netP5.*;

OscP5 oscP5;
NetAddress myRemoteLocation;

void setup() {
  OscProperties myProperties = new OscProperties();
  // increase the datagram size to 10000 bytes
  // by default it is set to 1536 bytes
  oscP5 = new OscP5(this,myProperties);
void draw() {

void oscEvent(OscMessage theOscMessage) {
  /* check if theOscMessage has the address pattern we are looking for. */
    if(theOscMessage.checkAddrPattern("/ring_base_R")==true) {
   int v1 = theOscMessage.get(0).intValue();
   float v2 = theOscMessage.get(1).floatValue();
   float v3 = theOscMessage.get(2).floatValue();
   float v4 = theOscMessage.get(3).floatValue();
   float v5 = theOscMessage.get(4).floatValue();
   float v6 = theOscMessage.get(5).floatValue();
   float v7 = theOscMessage.get(6).floatValue();
   float v8 = theOscMessage.get(7).floatValue();
   float v9 = theOscMessage.get(8).floatValue();

   println(" values: "+v1+", "+v2+", "+v3+", "+v4+","+v5+","+v6+","+v7+","+v8+","+v9 );
      print("### received an osc message /test with typetag ifs.");

This is the output.
values: 1513, 52.834133, 16.743656, 148.06131,408.28983,187.30704,-177.20099,-16.029522,112.448715

I appreciate some of your helps to modify the sketch to my above requirement.

Welcome to the forums! Don’t forget to read the guidelines :grinning:

What do you mean by “the display”? The canvas? Some external display?

Hello Tony,

Thanks for the welcome and reading my post.

What I wanted to say is, I want to show the values of v2 on the screen. The value of v2 is continuously changing.

I have modified the original post to make it clearer. I appreciate if you can share some of your knowledge on how to achieve this.

Have you looked into the text() function?