First time here? Check out the FAQ!
x

how do i manipulate radio buttons and lists with osc?

0 votes
1,048 views
if i have a radio button or list widget with multiple elements, how do i address those elements individually using osc?

thanks!
asked Apr 18, 2015 in Controllers, OSC & MIDI by dustin-camilleri (190 points)

1 Answer

0 votes
Radio buttons have a single "index" that selects a button.  The range of the "index" is from the min value to the max value that you set in the VCS for that control.  You can map to an OSC control using learn (ctrl+click on the radio button or list and use the pop menu to select Learn or connect to an existing OSC message).
answered Apr 18, 2015 by ssc (Savant) (116,410 points)
so a radio button group or list in kyma is expecting a single OSC message with a single argument - an index that selects the button within the group or item within the list?

that makes sense.. however, it seems at odds with the way many of the OSC control surface editors are built.

as far as i can tell, in both touchosc and lemur, the switch modules (which would be the logical choice for mapping to a kyma radio button group or list) emit a unique OSC message for every switch with the group (/switch/x/1, /switch/x/2, etc). you can work around this with some scripting in either the editors or using OSCulator to rewrite the messages, but that's a clunky solution. you could even use individual pads, but you'd still have to do some work to get them to respond to either other in the expected way (as they aren't 'exclusive switches' - i.e. without some additional effort, when a single switch goes to one, the others don't automatically go to zero).

am i thinking about this the right way? has anyone else used touchosc/lemur or another custom control surface editor to select button or list items in kyma?
If your device is sending separate values from separate switches, you could use a SoundToGlobalController in Kyma to transform those switches to an index value.  For example, something like:

(!osc_switch_x_1 + (2 * !osc_switch_x_2) + .. + (n * !osc_switch_x_n))

for an expression that generates indexes from 1 through n.  The index would be 0 when no button is pressed (but if the device is a radio button, then there should always be one button pressed).

Also, the new version of Kyma Control (currently under review by Apple) includes radio buttons.
what's the format of the message the radio button or list is expecting? i'm currently sending:

/message 1
/message 2
/message 3
etc.

.. and not having any luck.
I would open a Constant, click in the Value field, press the ESC key (for learn) and touch one of your radio buttons to see what it is sending to Kyma.
using that method doesn't seem to show the arguments? output is:

!osc_1_multitoggle1

testing with other button types produces similar results.

i know arguments are being sent, as verified by other third party OSC monitoring tools. in this case i am sending just a single integer value.

.. but i still don't even know what the properly formatted message for the radio buttons/list is supposed to look like!

is there an OSC reference for kyma somewhere? the OSC section of the user guide is empty (lots of missing info in the new manual :( )
i figured it out!

by default, the radio button/list isn't expecting an integer, but a float between 0 and 1.

i used osculator to rewrite the OSC messages to suit and now everything is working as expected.

thanks for the help...  and that OSC reference sure would be handy!
...