Multi-Button Text via OSC Message

Have a six button Multi-button element, /selFactorsHF and a label /SelFactorsText

Using multi-button address: /selFactorsHF/4/OSCpilot/Text
I am having trouble getting anything other than numbers to display on the OSCPilot UI in the text field. The label works fine.

Works:
ADDRESS(/selFactorsHF/1/OSCpilot/Text) INT32(6) >> Displays 6.0 on first button
ADDRESS(/selFactorsHF/3/OSCpilot/Text) FLOAT(9) >> Displays 9.0 on third button
ADDRESS(/SelFactorsText) STRING(Jump0) >> (a label, displays Jump0)

Doesn’t work:
ADDRESS(/selFactorsHF/2/OSCpilot/Text) STRING(new_Text) >> nothing changes on button 2
ADDRESS(/selFactorsHF/4/OSCpilot/Text) STRING(Trippy) >> nothing changes on button 4

Below is the logged packet traffic.

RECEIVE | ENDPOINT([::ffff:127.0.0.1]:62796) ADDRESS(/selFactorsHF/1/OSCpilot/Text) INT32(6)
RECEIVE | ENDPOINT([::ffff:127.0.0.1]:62796) ADDRESS(/selFactorsHF/2/OSCpilot/Text) STRING(Demo)
RECEIVE | ENDPOINT([::ffff:127.0.0.1]:62796) ADDRESS(/selFactorsHF/3/OSCpilot/Text) FLOAT(9)
RECEIVE | ENDPOINT([::ffff:127.0.0.1]:62796) ADDRESS(/selFactorsHF/4/OSCpilot/Text) STRING(Trippy)
RECEIVE | ENDPOINT([::ffff:127.0.0.1]:62796) ADDRESS(/SelFactorsText) STRING(Jump7)

Solution: Setting Button Text in OSC Pilot Multi-Button Widgets

Problem: I was trying to set the text labels on a multi-button widget in OSC Pilot by sending string messages to /widgetName/buttonNumber/OSCpilot/Text, but the text wasn’t appearing. Interestingly, sending integer strings worked, but actual text strings (like directory names) did not display.

Root Cause: The /OSCpilot/Text sub-address appears to be primarily for Label widgets. For Button widgets (including multi-button arrays), you need to use the Custom In Args feature instead.

Correct Solution:

  1. In OSC Pilot, select your multi-button widget (e.g., /renderSetList)

  2. Set the Custom In Args property to:

    # T
    
    

    Where:

    • # = Use the first argument as the button value

    • T = Use the second argument to set the button’s Text label

  3. In your code, send a message with TWO arguments to the main button address:

    // Example: Setting text for button 1
    OscMessage msg = new OscMessage("/renderSetList/1");
    msg.add(1);              // First argument: value (integer)
    msg.add("My Text Here"); // Second argument: text (string)
    oscP5.send(msg, targetAddress);
    
    

Key Points:

  • Send to the main button address (e.g., /renderSetList/1), NOT to /renderSetList/1/OSCpilot/Text

  • The message must contain both a value argument and a text argument

  • The Custom In Args format # T tells OSC Pilot how to interpret these two arguments

  • This works for any text strings, including directory names, file names, etc.

Custom In Args Format Reference:

  • ? - Ignore this argument

  • # - Use this as the value argument

  • T - Use this to set the Text

  • C - Use this to set the Color

  • R - Use this to set the Read-Only property

You can combine these as needed (e.g., ? # T would ignore the first argument, use the second as value, and third as text).

1 Like