Go Down

Topic: Processing / Touch OSC / Arduino (Read 903 times) previous topic - next topic


Hi guys,

i have looked for it but i just cant seem to find it. I'm tinkering around with processing, touch osc and my arduino. I've managed to print out the osc message, but how do i output the values that are represented by the sliders ???  I can retreive the state of a toggle button, but I got that from a sparkfun tutorial and they only use the toggle and no rotary/slider. It seems that whatever I do I just can't retreive them.

Please help.


The OSC message contains a number of arguments.
Code: [Select]
float val = message.get(0).floatValue();
will get the first argument as a float (assuming that it IS a float).

Since you are sending the message(s), you should know what arguments are contained in the message.


Hey thanks for the quick answer.
Im getting the values out of TouchOSC i actually dont know what TouchOSC is sending. Thats what im trying to debug and im not getting any values. :(


Heres the answer I was looking for. I just dont know why I've never come around this in all of the tutorials and code examples.
Its VERY simple.
Code: [Select]

Will print out:
Code: [Select]

received from /192.168.2.nnn:64414
addrpattern /1/fader1
typetag f
[0] 190.54944


and then of course PaulS comment is totally right. I was using code from a tutorial where the value was casted to an int and I never got the values i was looking for. It was either '1' or '0' even if I was using slider or rotary slider.

Go Up