receiving OSC stems

edited March 2018 in Library Questions

hello Everybody, I have been using Processing for just 3 months but I am loving it. I have a question about the OSCP5 library. so I am using Processing to create graphics for sounds generated in Kyma. Receiving single messages is smooth and work properly. But I dont understand if there is an efficient way to handle stems of messages coming from Kyma. so, for example if Kyma is sending: /position1 /position2 /position3 ..../position20 messages, is there a way to deal with them in Processing without creating 20 variables and 20 OSC functions? it would be great to put them all directly in an array. thanks for help. peace. d

Tagged:

Answers

  • edited March 2018 Answer ✓

    Yes, you can. You need to use the oscEvent method, which gives you the ability to parse your osc path. I use processing's match() extensively in conjunction with regular expressions - and match gives you all your groups as a String array so it's really easy to grab those values from the osc path. Note that when using oscEvent you should test for the incoming data types, as if you try to get the wrong one you'll throw an error. Let me know if you need an example.

  • thanks DoctorCrispy. as I am pretty new to Processing an example would be very very welcome. thanks. d

Sign In or Register to comment.